Skip to content
Snippets Groups Projects
  1. Oct 10, 2016
  2. Oct 09, 2016
  3. Oct 07, 2016
    • George Joseph's avatar
      alembic: Allow cdr, config and voicemail to exist in the same schema · 442b5979
      George Joseph authored
      cdr, config and voicemail are all separate alembic trees.  Because
      alembic's default is to use a table named 'alembic_version' to store
      the current tree revision, the 3 trees can't exist in the same schema
      without stepping on each other.
      
      Now each tree uses 'alembic_version_<tree_name>' as the version table.
      Each tree's env.py script now first checks for 'alembic_version'.  If
      it finds it AND its revision is in the tree's history, the script
      renames it to 'alembic_version_<tree_name>'.  Regardless, the script
      then continues with the migration using 'alembic_version_<tree_name>'
      and creates that table if it's not found.  The result is that if an
      existing 'alembic_version' table was found but it didn't belong to this
      tree, it's left alone and 'alembic_version_<tree_name>' is used or
      created.
      
      WARNING:  If multiple trees are using the same schema, they MUST NOT
      CRU or D any objects with names that might exist in the other trees.
      An example would be 'yesno_values' type.  If two trees perform
      operations on it, one tree could pull it out from under the other.
      Thankfully we currently don't share any names among cdr, config and
      voicemail.
      
      NOTE:  Since the env.py scripts in each tree were identical, a common
      env.py has been placed in the ast-db-manage directory and a symlink
      to it has been placed in each tree directory.
      
      ASTERISK-24311 #close
      Reported-by: Dafi Ni
      
      Change-Id: I4d593f000350deb5d21a14fa1e9bc3896844d898
      442b5979
    • Joshua Colp's avatar
  4. Oct 05, 2016
    • Alexander Traud's avatar
      chan_sip: Honor support of Symmetric Response (rport) for SIP requests. · c4268ec7
      Alexander Traud authored
      In the SIP channel driver chan_sip, the default is "auto_force_rport". When no
      NAT was detected, for example in case of IPv6, Asterisk uses the IP address
      from the headers within the SIP-REGISTER for subsequent SIP signaling. When
      the remote party specifies support for Symmetric Response (RFC 3581) via the
      parameter "rport", Asterisk should not extract the port from the SIP headers
      but reuse the port of the transport. This did not happen because of a typo.
      
      ASTERISK-26438 #close
      
      Change-Id: If6e7891848aaf96666dee5305695f7c6667cd5a6
      c4268ec7
  5. Oct 04, 2016
  6. Sep 30, 2016
    • Corey Farrell's avatar
      astobj2: Add backtrace to log_bad_ao2. · 2a03575c
      Corey Farrell authored
      * Compile __ast_assert_failed unconditionally.
      * Use __ast_assert_failed to log messages from log_bad_ao2
      * Remove calls to ast_assert(0) that happen after log_bad_ao2 was run.
      
      Change-Id: I48f1af44b2718ad74a421ff75cb6397b924a9751
      2a03575c
    • Etienne Lessard's avatar
      app_queue: Update dynamic members ringinuse on reload. · 806d08b6
      Etienne Lessard authored
      Previously, when reloading the members of a queue, the members added statically
      (i.e. defined in queues.conf) would see their "ringinuse" value updated but not
      the members added dynamically.
      
      This change makes dynamic members ringuse value to be updated on reload.
      
      Note that it's impossible to add a dynamic member with a specific ringinuse
      value. For both static and dynamic members, the ringinuse value can always be
      changed later on with command like "queue set ringinuse" or with the AMI action
      "QueueMemberRingInUse". So it's possible this commit could break a user workflow
      if he was changing the ringinuse value of dynamic members via such commands and
      was also relying on the fact that a queue reload would not update the dynamic
      members ringinuse value.
      
      ASTERISK-26330
      
      Change-Id: I3745cc9a06ba7e02c399636f1ee9e58c04081f3f
      806d08b6
    • Joshua Colp's avatar
      224c2952
  7. Sep 29, 2016
  8. Sep 27, 2016
  9. Sep 25, 2016
    • George Joseph's avatar
      build_tools: Add ability to download variants to download_externals · 43901e94
      George Joseph authored
      Some external packages have multiple variants that apply to different
      builds of asterisk.  The DPMA for instance has a "bundled" variant that
      needs to be downloaded if asterisk was configured with
      --with-pjproject-bundled.
      
      There are 2 ways to specify variants:
      
      If you need the user to make the decision about which variant to
      download, simply create multiple menuselect "member" entries like so...
      
      <member name="res_digium_phone" displayname="..snipped..">
        <support_level>external</support_level>
        <depend>xmlstarlet</depend>
        <depend>bash</depend>
        <defaultenabled>no</defaultenabled>
      </member>
      
      <member name="res_digium_phone-bundled" displayname="..snipped..">
        <support_level>external</support_level>
        <depend>xmlstarlet</depend>
        <depend>bash</depend>
        <defaultenabled>no</defaultenabled>
      </member>
      
      Note that the second entry has "-<variant>" appended to the name.
      You can then use the existing menuselect facilities to restrict which
      members to enable or disable.  Youy probably don't want the user to
      enable multiple at the same time.
      
      If you want to hide the details of the variants, the better way to
      do it is to create 1 member with "variant" elements.
      
      <member name="res_digium_phone" displayname="..snipped..">
        <support_level>external</support_level>
        <depend>xmlstarlet</depend>
        <depend>bash</depend>
        <defaultenabled>no</defaultenabled>
        <member_data>
          <downloader>
            <variants>
              <variant tag="bundled"
                condition='[[ "$PJPROJECT_BUNDLED" = "yes" ]]'/>
            </variants>
          </downloader>
        </member_data>
      </member>
      
      The condition must be a bash expression suitable for use with an "if"
      statement.  Any environment variable can be used plus those available
      in makeopts.
      
      In this case, if asterisk was configured with --with-pjproject-bundled
      the bundled variant will be automatically downloaded.  Otherwise the
      normal version will be downloaded.
      
      Change-Id: I4de23e06d4492b0a65e105c8369966547d0faa3e
      43901e94
  10. Sep 23, 2016
    • zuul's avatar
    • zuul's avatar
      91513c5e
    • Alexander Traud's avatar
      chan_sip: Resolve externhost not to IPv6; instead go for IPv4. · 5dd99465
      Alexander Traud authored
      For the channel driver chan_sip, you specify externhost=example.com in sip.conf
      when your Asterisk is behind a NAT and your IP address is assigned dynamically.
      Or stated differently: You do not have a static IP address to use "externaddr"
      directly. This NAT support is quite handy but just about IPv4. Previously,
      Asterisk resolved "externhost" to any IP version. When the first DNS answer
      resolved to an IPv6, Asterisk sent an IPv6 in SIP/SDP for origin (o=) and
      connection (c=). This happened in outgoing SIP-REGISTER and while answering
      SIP-INVITE. If the remote peer is IPv4-only, it might not handle o=/c= with an
      IPv6. This change makes sure, no IPv6 is resolved anymore for "externhost".
      
      ASTERISK-18232 #close
      Reported by: Jacek Kowalski
      Tested by: Alexander Traud
      patches:
       changes.patch submitted by Alessandro Crespi
      
      Change-Id: If68eedbeff65bd1c1d8a9ed921c02ba464b32dac
      5dd99465
    • George Joseph's avatar
      chan_sip: Address runaway when realtime peers subscribe to mailboxes · d4259710
      George Joseph authored
      Users upgrading from asterisk 13.5 to a later version and who use
      realtime with peers that have mailboxes were experiencing runaway
      situations that manifested as a continuous stream of taskprocessor
      congestion errors, memory leaks and an unresponsive chan_sip.
      
      A related issue was that setting rtcachefriends=no NEVER worked in
      asterisk 13 (since the move to stasis).  In 13.5 and earlier, when a
      peer tried to register, all of the stasis threads would block and
      chan_sip would again become unresponsive.  After 13.5, the runaway
      would happen.
      
      There were a number of causes...
      * mwi_event_cb was (indirectly) calling build_peer even though calls to
        mwi_event_cb are often caused by build_peer.
      * In an effort to prevent chan_sip from being unloaded while messages
        were still in flight, destroy_mailboxes was calling
        stasis_unsubscribe_and_join but in some cases waited forever for the
        final message.
      * add_peer_mailboxes wasn't properly marking the existing mailboxes
        on a peer as "keep" so build_peer would always delete them all.
      * add_peer_mwi_subs was unsubscribing existing mailbox subscriptions
        then just creating them again.
      
      All of this was causing a flood of subscribes and unsubscribes on
      multiple threads all for the same peer and mailbox.
      
      Fixes...
      * add_peer_mailboxes now marks mailboxes correctly and build_peer only
        deletes the ones that really are no longer needed by the peer.
      * add_peer_mwi_subs now only adds subscriptions marked as "new" instead
        of unsubscribing and resubscribing everything.  It also adds the peer
        object's address to the mailbox instead of its name to the subscription
        userdata so mwi_event_cb doesn't have to call build_peer.
      
      With these changes, with rtcachefriends=yes (the most common setting),
      there are no leaks, locks, loops or crashes at shutdown.
      
      rtcachefriends=no still causes leaks but at least it doesn't lock, loop
      or crash.  Since making rtcachefriends=no work wasnt in scope for this
      issue, further work will have to be deferred to a separate patch.
      
      Side fixes...
       * The ast_lock_track structure had a member named "thread" which gdb
         doesn't like since it conflicts with it's "thread" command.  That
         member was renamed to "thread_id".
      
      ASTERISK-25468 #close
      
      Change-Id: I07519ef7f092629e1e844f855abd279d6475cdd0
      d4259710
  11. Sep 22, 2016
  12. Sep 21, 2016
Loading