Skip to content
Snippets Groups Projects
  1. Oct 02, 2013
  2. Oct 01, 2013
  3. Sep 30, 2013
    • Jonathan Rose's avatar
      configuration samples: Pull all parking related stuff out of features.conf · 8fbe62f5
      Jonathan Rose authored
      This patch also adds documentation for parking from features.conf to
      res_parking.conf
      ........
      
      Merged revisions 400205 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      8fbe62f5
    • Matthew Jordan's avatar
      Parse arguments passed to the CDR_PROP function correctly · de07050d
      Matthew Jordan authored
      I can only blame this on a bad merge, because this in no way worked properly
      the way it was written. Mea culpa. The function should now parse its arguments
      correctly and function properly. (Note that the API used by the CDR_PROP
      function has working unit tests... this was merely bad coding of the actual
      registered function)
      
      (closes issue ASTERISK-22613)
      Reported by: Private Name
      ........
      
      Merged revisions 400196 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      de07050d
    • Matthew Jordan's avatar
      Remove spurious event raised when CDRs are reloaded · 9ede3970
      Matthew Jordan authored
      The Reload event is now raised by the module loading core. As such, the Reload
      event in the CDR engine was a duplicate and not needed.
      ........
      
      Merged revisions 400194 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      9ede3970
    • David M. Lee's avatar
      Multiple revisions 399887,400138,400178,400180-400181 · 2de42c2a
      David M. Lee authored
      ........
        r399887 | dlee | 2013-09-26 10:41:47 -0500 (Thu, 26 Sep 2013) | 1 line
        
        Minor performance bump by not allocate manager variable struct if we don't need it
      ........
        r400138 | dlee | 2013-09-30 10:24:00 -0500 (Mon, 30 Sep 2013) | 23 lines
        
        Stasis performance improvements
        
        This patch addresses several performance problems that were found in
        the initial performance testing of Asterisk 12.
        
        The Stasis dispatch object was allocated as an AO2 object, even though
        it has a very confined lifecycle. This was replaced with a straight
        ast_malloc().
        
        The Stasis message router was spending an inordinate amount of time
        searching hash tables. In this case, most of our routers had 6 or
        fewer routes in them to begin with. This was replaced with an array
        that's searched linearly for the route.
        
        We more heavily rely on AO2 objects in Asterisk 12, and the memset()
        in ao2_ref() actually became noticeable on the profile. This was
        #ifdef'ed to only run when AO2_DEBUG was enabled.
        
        After being misled by an erroneous comment in taskprocessor.c during
        profiling, the wrong comment was removed.
        
        Review: https://reviewboard.asterisk.org/r/2873/
      ........
        r400178 | dlee | 2013-09-30 13:26:27 -0500 (Mon, 30 Sep 2013) | 24 lines
        
        Taskprocessor optimization; switch Stasis to use taskprocessors
        
        This patch optimizes taskprocessor to use a semaphore for signaling,
        which the OS can do a better job at managing contention and waiting
        that we can with a mutex and condition.
        
        The taskprocessor execution was also slightly optimized to reduce the
        number of locks taken.
        
        The only observable difference in the taskprocessor implementation is
        that when the final reference to the taskprocessor goes away, it will
        execute all tasks to completion instead of discarding the unexecuted
        tasks.
        
        For systems where unnamed semaphores are not supported, a really
        simple semaphore implementation is provided. (Which gives identical
        performance as the original taskprocessor implementation).
        
        The way we ended up implementing Stasis caused the threadpool to be a
        burden instead of a boost to performance. This was switched to just
        use taskprocessors directly for subscriptions.
        
        Review: https://reviewboard.asterisk.org/r/2881/
      ........
        r400180 | dlee | 2013-09-30 13:39:34 -0500 (Mon, 30 Sep 2013) | 28 lines
        
        Optimize how Stasis forwards are dispatched
        
        This patch optimizes how forwards are dispatched in Stasis.
        
        Originally, forwards were dispatched as subscriptions that are invoked
        on the publishing thread. This did not account for the vast number of
        forwards we would end up having in the system, and the amount of work it
        would take to walk though the forward subscriptions.
        
        This patch modifies Stasis so that rather than walking the tree of
        forwards on every dispatch, when forwards and subscriptions are changed,
        the subscriber list for every topic in the tree is changed.
        
        This has a couple of benefits. First, this reduces the workload of
        dispatching messages. It also reduces contention when dispatching to
        different topics that happen to forward to the same aggregation topic
        (as happens with all of the channel, bridge and endpoint topics).
        
        Since forwards are no longer subscriptions, the bulk of this patch is
        simply changing stasis_subscription objects to stasis_forward objects
        (which, admittedly, I should have done in the first place.)
        
        Since this required me to yet again put in a growing array, I finally
        abstracted that out into a set of ast_vector macros in
        asterisk/vector.h.
        
        Review: https://reviewboard.asterisk.org/r/2883/
      ........
        r400181 | dlee | 2013-09-30 13:48:57 -0500 (Mon, 30 Sep 2013) | 28 lines
        
        Remove dispatch object allocation from Stasis publishing
        
        While looking for areas for performance improvement, I realized that an
        unused feature in Stasis was negatively impacting performance.
        
        When a message is sent to a subscriber, a dispatch object is allocated
        for the dispatch, containing the topic the message was published to, the
        subscriber the message is being sent to, and the message itself.
        
        The topic is actually unused by any subscriber in Asterisk today. And
        the subscriber is associated with the taskprocessor the message is being
        dispatched to.
        
        First, this patch removes the unused topic parameter from Stasis
        subscription callbacks.
        
        Second, this patch introduces the concept of taskprocessor local data,
        data that may be set on a taskprocessor and provided along with the data
        pointer when a task is pushed using the ast_taskprocessor_push_local()
        call. This allows the task to have both data specific to that
        taskprocessor, in addition to data specific to that invocation.
        
        With those two changes, the dispatch object can be removed completely,
        and the message is simply refcounted and sent directly to the
        taskprocessor.
        
        Review: https://reviewboard.asterisk.org/r/2884/
      ........
      
      Merged revisions 399887,400138,400178,400180-400181 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      2de42c2a
    • David M. Lee's avatar
      Blocked revisions 399306 · db7c8691
      David M. Lee authored
      ........
      Blocked revisions 399305
      
      ........
      Fix Segfault When Syntax Of A Line Under [applicationmap] Is Invalid
      
      When processing the lines under the [applicationmap] context in features.conf, a
      segfault occurs from attempting to process a line with an invalid syntax
      (basically missing most of the arguments).
      
      Example:
      [applicationmap]
      automon=*6
      
      * This patch moves the checking for empty arguments to before they are accessed.
      
      * Also, checked the "todo" comment and removed it.  Some applications do not
        require arguments.
      
      (closes issue ASTERISK-22416)
      Reported by: CGI.NET
      Tested by: CGI.NET
      Patches:
          asterisk-22416-check-syntax-first_v2.diff by Michael L. Young (license 5026)
      
      Review: https://reviewboard.asterisk.org/r/2803
      ........
      
      Merged revisions 399304 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      db7c8691
    • Kinsey Moore's avatar
      chan_sip: Allow Asterisk to retry after 403 on register · b44ce141
      Kinsey Moore authored
      This adds a global option in chan_sip to allow it to continue
      attempting registration if a 403 is received, clearing the cached nonce
      and treating it as a non-fatal response. Normally, this would cause
      registration attempts to that endpoint to stop.
      
      This also adds a similar per-outbound-registration option to chan_pjsip
      which allows the retry interval to be altered for 403 responses to
      REGISTER requests.
      
      (closes issue ASTERISK-17138)
      Review: https://reviewboard.asterisk.org/r/2874/
      Reported by: Rudi
      ........
      
      Merged revisions 400137 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 400140 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 400141 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      b44ce141
  4. Sep 28, 2013
    • Matthew Jordan's avatar
      res_pjsip_notify: Add documentation · a1d56da3
      Matthew Jordan authored
      We forgot to add documentation for res_pjsip_notify, which would prevent it
      from being loaded. Whoops.
      
      This patch also updates res_pjsip_notify to use pjsip_notify.conf, which now
      has its own sample file in the configs directory as well.
      
      Review: https://reviewboard.asterisk.org/r/2835/
      ........
      
      Merged revisions 400121 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      a1d56da3
    • Matthew Jordan's avatar
      res_rtp_asterisk: Correct erroneous lost packet information in RTCP reports · c4b5c549
      Matthew Jordan authored
      RTCP's calculation of the number of lost packets in an RTP stream is based on
      that stream's sequence number count, the number of received packets, and how
      many packets we expect to receive. When the SSRC for an RTP stream changes,
      there can - and almost always will be - a large jump in the next packet's
      timestamp and sequence number. If we don't reset the number of received
      packets, sequence number count, and other metrics used by RTCP, the next RR/SR
      report will use the previous SSRC's values to calculate the lost packet count
      for the new SSRC - resulting in a very large number of lost packets.
      
      This patch modifies res_rtp_asterisk such that, if it detects a SSRC change, it
      will reset the various values used by the RTCP calculations. From the
      perspective of RTCP, this appears as a new media stream - which is what it is.
      
      Review: https://reviewboard.asterisk.org/r/2886/
      
      (closes issue AST-1174)
      Reported by: Thomas Arimont
      ........
      
      Merged revisions 400089 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 400093 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 400108 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c4b5c549
    • Matthew Jordan's avatar
      Add check for openSUSE when detecting bfd library · 8ddd829b
      Matthew Jordan authored
      In ASTERISK-17842, some additional library checks were added to the configure
      script so that the bfd library could be found on CentOS and Fedora systems.
      
      As it turns out, openSUSE requires an additional library. This patch adds
      another check to the configure script for openSUSE that will add that library.
      
      Review: https://reviewboard.asterisk.org/r/2885/
      
      (closes issue AST-1169)
      Reported by: Guenther Kelleter
      ........
      
      Merged revisions 400073 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 400075 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 400077 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      8ddd829b
    • Matthew Jordan's avatar
      CDR: Improve handling of parking; resolve assertion when originating into park · 34f18cc7
      Matthew Jordan authored
      This patch covers two problems:
      
      1) Currently, when a call is transferred into a parking lot from a bridge
         (using either the blind transfer or one touch parking mechanisms), the
         application fails to be set to "Park" in the resulting CDR record for
         the parked channel. This is due to the ParkedCall message arriving before
         the BridgeEnter for the channel entering the parking bridge. The ParkedCall
         message isn't handled as the CDR for the channel has already been finalized
         (due to the channel having left its two party bridge), and the BridgeEnter -
         which creates the new CDR - doesn't have the parking information. This patch
         modifies the behavior so that reception of a ParkedCall message will - if
         not handled by a CDR chain - cause a new CDR to be created and put into the
         Parking state.
      
      2) It fixes a FRACK that occurred when a channel is originated into a parking
         space. The DialedPending state - which occurs for both Dialed and Originated
         channels - assumed that it couldn't handle the parking transitions due to it
         having a Party B; however, Originated channels don't have a Party B. As such,
         the existing CDR needs to transition into the parking state - this patch does
         that.
      
      Review: https://reviewboard.asterisk.org/r/2877/
      
      (closes issue ASTERISK-22482)
      Reported by: Richard Mudgett
      ........
      
      Merged revisions 400062 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400063 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      34f18cc7
    • Matthew Jordan's avatar
      app_queue: Make manager events tolerant of Local channel shenanigans · ccab0f27
      Matthew Jordan authored
      app_queue currently attempts to handle Local channel optimizations in an effort
      to provide accurate information in Stasis messages (and their corresponding
      AMI events) as well as the Queue log. Sometimes, however, things don't go as
      planned.
      
      Consider the following scenario:
       SIP/foo <-> L;1 <-> L;2 <-> SIP/agent
      
      SIP/agent answers, triggering a Local channel optimization. app_queue will
      normally do the following:
       * Listen for the Local optimization events and update our agent accordingly
         to SIP/agent in the queue log and messages
       * When we get a hangup, publish the AgentComplete event based on our
         information (SIP/foo and SIP/agent)
      
      However, as with all things that depend on sanity from something as capricious
      as Local channels, things can go wrong:
       (1) SIP/agent immediately hangs up upon answering. This triggers a race
           condition between termination messages coming from SIP/agent and the
           ongoing Local channel optimization messages. (Note that this can also
           occur with SIP/foo)
       (2) In a race condition, Asterisk can (rarely) deliver the hangup messages
           prior to the Local channel optimization.
      
      In that case, the messages *may* arrive to app_queue in the following order:
       * Hangup SIP/Agent
       * Hangup SIP/foo
       * Optimize L;1/L;2
       * Hangup L;2
       * Hangup L;1
      
      When app_queue receives the hangup of the agent or the caller, it will attempt
      to publish the AgentComplete event. However, it now has a problem - it thinks
      its agent is the ;1 side of the Local channel, as it never received the
      optimization event. At the same time, that channel is already gone. This
      results in getting NULL from the Stasis cache. What's more, we can't really
      wait for the optimization message, as we are currently handling the hangup
      of the channel that the optimization event would tell us to use.
      
      This patch modifies the behavior in app_queue such that, since we still have a
      lot of pertinent queue information (interface, queue name, etc.), we now raise
      the event with what information we know. The channels involved now may or may
      not be present. Users will still at least get the "AgentComplete" event, which
      "completes" the known Agent information.
      
      Review: https://reviewboard.asterisk.org/r/2878/
      
      (closes issue ASTERISK-22507)
      Reported by: Richard Mudgett
      ........
      
      Merged revisions 400060 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ccab0f27
    • Matthew Jordan's avatar
      manager: Fix crash when appending a manager channel variable · 2ef63eaf
      Matthew Jordan authored
      In r399887, a minor performance improvement was introduced by not allocating
      the manager variable struct if it wasn't used. Unfortunately, when directly
      accessing an ast_channel struct, manager assumed that the struct was always
      allocated. Since this was no longer the case, things got a bit crashy.
      
      This fixes that problem by simply bypassing appending variables if the manager
      channel variable struct isn't there.
      ........
      
      Merged revisions 400058 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      2ef63eaf
  5. Sep 27, 2013
  6. Sep 26, 2013
  7. Sep 25, 2013
  8. Sep 24, 2013
    • Richard Mudgett's avatar
      astobj2: Made use OBJ_SEARCH_xxx identifiers as field enum values internally. · 88436ecb
      Richard Mudgett authored
      * Made ao2_unlink to protect itself from stray OBJ_SEARCH_xxx values
      passed in.
      ........
      
      Merged revisions 399749 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      88436ecb
    • Richard Mudgett's avatar
      chan_iax2: Prevent some needless breaking of the native IAX2 bridge. · b916eaad
      Richard Mudgett authored
      * Clean up some twisted code in the iax2_bridge() loop.
      
      * Add AST_CONTROL_VIDUPDATE and AST_CONTROL_SRCCHANGE to a list of frames
      to prevent the native bridge loop from breaking.
      
      * Passing the AST_CONTROL_T38_PARAMETERS frame should also allow FAX over
      a native IAX2 bridge.
      
      (issue ABE-2912)
      
      Review: https://reviewboard.asterisk.org/r/2870/
      ........
      
      Merged revisions 399697 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 399708 from http://svn.asterisk.org/svn/asterisk/branches/11
      
      For v12 and above this is really just documentation until IAX2 native
      bridging is restored.
      ........
      
      Merged revisions 399736 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      b916eaad
    • Matthew Jordan's avatar
      app_queue: Don't be quite so aggressive in initializing the array · 57e652f2
      Matthew Jordan authored
      We only need the first character.
      ........
      
      Merged revisions 399695 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      57e652f2
    • Matthew Jordan's avatar
      app_queue: Initialize array holding MixMonitor exec options · 0618d894
      Matthew Jordan authored
      If the channel variable MONITOR_EXEC is set, app_queue will pass the specified
      execution parameters to the MixMonitor application when a queue is recorded.
      If that channel variable is not set, the buffer that holds the escaped value
      was not being initialized to NULL, and so would be passed to the MixMonitor
      application with garbage. Hilarity ensued as app_mixmonitor attempted to
      execute gobeldy-gook.
      ........
      
      Merged revisions 399681 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      0618d894
    • Matthew Jordan's avatar
      Fix a performance problem CDRs · e7d49d28
      Matthew Jordan authored
      There is a large performance price currently in the CDR engine. We currently
      perform two ao2_callback calls on a container that has an entry for every
      channel in the system. This is done to create matching pairs between channels
      in a bridge.
      
      As such, the portion of the CDR logic that this patch deals with is how we
      make pairings when a channel enters a mixing bridge. In general, when a
      channel enters such a bridge, we need to do two things:
       (1) Figure out if anyone in the bridge can be this channel's Party B.
       (2) Make pairings with every other channel in the bridge that is not already
           our Party B.
      
      This is a two step process. In the first step, we look through everyone in the
      bridge and see if they can be our Party B (single_state_process_bridge_enter).
      If they can - yay! We mark our CDR as having gotten a Party B. If not, we keep
      searching. If we don't find one, we wait until someone joins who can be our
      Party B.
      
      Step 2 is where we changed the logic
      (handle_bridge_pairings and bridge_candidate_process). Previously, we would
      first find candidates - those channels in the bridge with us - from the
      active_cdrs_by_channel container. Because a channel could be a candidate if it
      was Party B to an item in the container, the code implemented multiple
      ao2_container callbacks to get all the candidates. We also had to store them
      in another container with some other meta information. This was rather complex
      and costly, particularly if you have 300 Local channels (600 channels!) going
      at once.
      
      Luckily, none of it is needed: when a channel enters a bridge (which is when
      we're figuring all this stuff out), the bridge snapshot tells us the unique
      IDs of everyone already in the bridge. All we need to do is:
       For all channels in the bridge:
         If the channel is us or our Party B that we got in step 1, skip it
         Compare us and the candidate to figure out who is Party A (based on some
             specific rules)
         If we are Party A:
            Make a new CDR for us, append it to our chain, and set the candidate as
                Party B
         If they are Party A:
            If they don't have a Party B:
              Make a new CDR for them, append us to their chain, and us as Party B
            Otherwise:
              Copy us over as Party B on their existing CDR.
      
      This patch does that.
      
      Because we now use channel unique IDs to find the candidates during bridging,
      active_cdrs_by_channel now looks up things using uniqueid instead of channel
      name. This makes the more complex code simpler; it does, however, have the
      drawback that dialplan applications and functions will be slightly slower as
      they have to iterate through the container looking for the CDR by name.
      That's a small price to pay however as the bridging code will be called a lot
      more often.
      
      This patch also does two other minor changes:
       (1) It reduces the container size of the channels in a bridge snapshot to 1.
           In order to be predictable for multi-party bridges, the order of the
           channels in the container must be stable; that is, it must always devolve
           to a linked list.
       (2) CDRs and the multi-party test was updated to show the relationship between
           two dialed channels. You still want to know if they talked - previously,
           dialed channels were always ignored, which is wrong when they have
           managed to get a Party B.
      
      (closes issue ASTERISK-22488)
      Reported by: Richard Mudgett
      
      Review: https://reviewboard.asterisk.org/r/2861/
      ........
      
      Merged revisions 399666 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      e7d49d28
Loading