Skip to content
Snippets Groups Projects
  1. Jan 09, 2015
    • Richard Mudgett's avatar
      AMI: Remove no longer used parameter from astman_send_listack(). · ef34a05f
      Richard Mudgett authored
      Follow-up issue to -r430435 from reviewboard review.
      
      ASTERISK-24049
      Review: https://reviewboard.asterisk.org/r/4315/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430452 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ef34a05f
    • Richard Mudgett's avatar
      AMI: Make AMI actions that generate event lists consistent. · 52a7cdb1
      Richard Mudgett authored
      * Made the following AMI actions use list API calls for consistency:
      Agents
      BridgeInfo
      BridgeList
      BridgeTechnologyList
      ConfbridgeLIst
      ConfbridgeLIstRooms
      CoreShowChannels
      DAHDIShowChannels
      DBGet
      DeviceStateList
      ExtensionStateList
      FAXSessions
      Hangup
      IAXpeerlist
      IAXpeers
      IAXregistry
      MeetmeList
      MeetmeListRooms
      MWIGet
      ParkedCalls
      Parkinglots
      PJSIPShowEndpoint
      PJSIPShowEndpoints
      PJSIPShowRegistrationsInbound
      PJSIPShowRegistrationsOutbound
      PJSIPShowResourceLists
      PJSIPShowSubscriptionsInbound
      PJSIPShowSubscriptionsOutbound
      PresenceStateList
      PRIShowSpans
      QueueStatus
      QueueSummary
      ShowDialPlan
      SIPpeers
      SIPpeerstatus
      SIPshowregistry
      SKINNYdevices
      SKINNYlines
      Status
      VoicemailUsersList
      
      * Incremented the AMI version to 2.7.0.
      
      * Changed astman_send_listack() to not use the listflag parameter and
      always set the value to "Start" so the start capitalization is consistent.
      i.e., The FAXSessions used "Start" while the rest of the system used
      "start".  The corresponding complete event always used "Complete".
      
      * Fixed ami_show_resource_lists() "PJSIPShowResourceLists" to output the
      AMI ActionID for all of its list events.
      
      * Fixed off-nominal AMI protocol error in manager_bridge_info(),
      manager_parking_status_single_lot(), and
      manager_parking_status_all_lots().  Use of astman_send_error() after
      responding to the original AMI action request violates the action response
      pattern by sending two responses.
      
      * Fixed minor protocol error in action_getconfig() when no requested
      categories are found.  Each line needs to be formatted as "Header: text".
      
      * Fixed off-nominal memory leak in manager_build_parked_call_string().
      
      * Eliminated unnecessary use of RAII_VAR() in ami_subscription_detail().
      
      ASTERISK-24049 #close
      Reported by: Jonathan Rose
      
      Review: https://reviewboard.asterisk.org/r/4315/
      ........
      
      Merged revisions 430434 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@430435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      52a7cdb1
  2. Dec 22, 2014
  3. Dec 17, 2014
  4. Dec 06, 2014
  5. Dec 03, 2014
    • Matthew Jordan's avatar
      apps/app_voicemail: Fix crash with IMAP when streams are opened simultaneously · 6d4ef7dd
      Matthew Jordan authored
      The UW IMAP library is instrinsically not thread-safe, and relies upon higher
      level applications to guarantee thread safety. For the most part, this is
      provided by the vms object, which provides locking for individual streams.
      Unfortunately, this is not sufficient for calls to mail_open which create the
      IMAP stream. mail_open can, on some systems, call into a UW IMAP specific
      function for determining the address of a system based on a hostname,
      ip_nametoaddr.
      
      In the ip6_unix implementation of this function, static variables are used
      to hold parsing buffers. This can cause a crash if multiple threads attempt
      to convert a hostname to an address at the same time. Locking on a single
      mail stream is not sufficient to prevent simultaneous access to these static
      variables.
      
      In the IMAP library, this function can be called from the mail_open and
      imap_status functions. As the imap_status function is not used by
      app_voicemail, locking on access to mail_open is sufficient to prevent
      any mangling of the buffers.
      
      Review: https://reviewboard.asterisk.org/r/4188/
      
      ASTERISK-24516 #close
      Reported by: David Duncan Ross Palmer
      Tested by: David Duncan Ross Palmer
      patches:
        ASTERISK-24516.diff uploaded by David Duncan Ross Palmer (License 6660)
      ........
      
      Merged revisions 428863 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 428864 from http://svn.asterisk.org/svn/asterisk/branches/12
      ........
      
      Merged revisions 428865 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      6d4ef7dd
  6. Dec 01, 2014
  7. Nov 20, 2014
  8. Nov 17, 2014
  9. Nov 14, 2014
    • Mark Michelson's avatar
      Fix race condition that could result in ARI transfer messages not being sent. · 2d9471ab
      Mark Michelson authored
      From reviewboard:
      
      "During blind transfer testing, it was noticed that tests were failing
      occasionally because the ARI blind transfer event was not being sent.
      After investigating, I detected a race condition in the blind transfer
      code. When blind transferring a single channel, the actual transfer
      operation (i.e. removing the transferee from the bridge and directing
      them to the proper dialplan location) is queued onto the transferee
      bridge channel. After queuing the transfer operation, the blind transfer
      Stasis message is published. At the time of publication, snapshots of
      the channels and bridge involved are created. The ARI subscriber to the
      blind transfer Stasis message then attempts to determine if the bridge
      or any of the involved channels are subscribed to by ARI applications.
      If so, then the blind transfer message is sent to the applications. The
      way that the ARI blind transfer message handler works is to first see
      if the transferer channel is subscribed to. If not, then iterate over
      all the channel IDs in the bridge snapshot and determine if any of
      those are subscribed to. In the test we were running, the lone
      transferee channel was subscribed to, so an ARI event should have been
      sent to our application. Occasionally, though, the bridge snapshot did
      not have any channels IDs on it at all. Why?
      
      The problem is that since the blind transfer operation is handled by a
      separate thread, it is possible that the transfer will have completed and
      the channels removed from the bridge before we publish the blind transfer
      Stasis message. Since the blind transfer has completed, the bridge on
      which the transfer occurred no longer has any channels on it, so the
      resulting bridge snapshot has no channels on it. Through investigation of
      the code, I found that attended transfers can have this issue too for the
      case where a transferee is transferred to an application."
      
      The fix employed here is to decouple the creation of snapshots for the transfer
      messages from the publication of the transfer messages. This way, snapshots
      can be created to reflect what they are at the time of the transfer operation.
      
      Review: https://reviewboard.asterisk.org/r/4135
      ........
      
      Merged revisions 427848 from http://svn.asterisk.org/svn/asterisk/branches/12
      ........
      
      Merged revisions 427870 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      2d9471ab
    • Joshua Colp's avatar
      app_confbridge: Play "leader has left" sound even when musiconhold is enabled. · 737b8117
      Joshua Colp authored
      Currently if the leader of a conference bridge leaves any participant
      that has musiconhold enabled will not hear the "leader has left" sound.
      This is because musiconhold is started and THEN the sound is played.
      
      This change makes it so that the sound is played and THEN musiconhold
      is started. This provides a better experience for users as they may not
      have known previously why they went back to musiconhold.
      
      Review: https://reviewboard.asterisk.org/r/4177/
      ........
      
      Merged revisions 427844 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 427845 from http://svn.asterisk.org/svn/asterisk/branches/12
      ........
      
      Merged revisions 427846 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@427847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      737b8117
  10. Nov 09, 2014
  11. Nov 06, 2014
  12. Nov 03, 2014
  13. Nov 02, 2014
  14. Oct 30, 2014
  15. Oct 28, 2014
  16. Oct 13, 2014
    • George Joseph's avatar
      manager/config: Support templates and non-unique category names via AMI · c7e6b6ba
      George Joseph authored
      This patch provides the capability to manipulate templates and categories
      with non-unique names via AMI.
      
      Summary of changes:
      
      GetConfig and GetConfigJSON: Added "Filter" parameter:  A comma separated list
      of name_regex=value_regex expressions which will cause only categories whose
      variables match all expressions to be considered.  The special variable name
      TEMPLATES can be used to control whether templates are included.  Passing
      'include' as the value will include templates along with normal categories.
      Passing 'restrict' as the value will restrict the operation to ONLY templates.
      Not specifying a TEMPLATES expression results in the current default behavior
      which is to not include templates.
      
      UpdateConfig: NewCat now includes options for allowing duplicate category
      names, indicating if the category should be created as a template, and
      specifying templates the category should inherit from.  The rest of the
      actions now accept a filter string as defined above.  If there are non-unique
      category names, you can now update specific ones based on variable values.
      
      To facilitate the new capabilities in manager, corresponding changes had to be
      made to config, most notably the addition of filter criteria to many of the
      APIs.  In some cases it was easy to change the references to use the new
      prototype but others would have required touching too many files for this
      patch so a wrapper with the original prototype was created.  Macros couldn't
      be used in this case because it would break binary compatibility with modules
      such as res_digium_phone that are linked to real symbols.
      
      Tested-by: George Joseph
      
      Review: https://reviewboard.asterisk.org/r/4033/
      ........
      
      Merged revisions 425383 from http://svn.asterisk.org/svn/asterisk/branches/12
      ........
      
      Merged revisions 425384 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c7e6b6ba
  17. Oct 03, 2014
  18. Sep 26, 2014
  19. Sep 16, 2014
  20. Sep 05, 2014
    • Matthew Jordan's avatar
      main/cdrs: Preserve context/extension when executing a Macro or GoSub · d42b1169
      Matthew Jordan authored
      The context/extension in a CDR is generally considered the destination of a
      call. When looking at a 2-party call CDR, users will typically be presented
      with the following:
      
      context    exten      channel     dest_channel app  data
      default    1000       SIP/8675309 SIP/1000     Dial SIP/1000,,20
      
      However, if the Dial actually takes place in a Macro, the current behaviour
      in 12 will result in the following CDR:
      
      context    exten      channel     dest_channel app  data
      macro-dial s          SIP/8675309 SIP/1000     Dial SIP/1000,,20
      
      The same is true of a GoSub:
      
      context    exten      channel     dest_channel app  data
      subs       dial_stuff SIP/8675309 SIP/1000     Dial SIP/1000,,20
      
      This generally makes the context/exten fields less than useful.
      
      It isn't hard to preserve these values in the CDR state machine; however, we
      need to have something that informs us when a channel is executing a
      subroutine. Prior to this patch, there isn't anything that does this.
      
      This patch solves this problem by adding a new channel flag,
      AST_FLAG_SUBROUTINE_EXEC. This flag is set on a channel when it executes a
      Macro or a GoSub. The CDR engine looks for this value when updating a Party A
      snapshot; if the flag is present, we don't override the context/exten on the
      main CDR object. In a funny quirk, executing a hangup handler must *not* abide
      by this logic, as the endbeforehexten logic assumes that the user wants to see
      data that occurs in hangup logic, which includes those subroutines. Since
      those execute outside of a typical Dial operation (and will typically have
      their own dedicated CDR anyway), this is unlikely to cause any heartburn.
      
      Review: https://reviewboard.asterisk.org/r/3962/
      
      ASTERISK-24254 #close
      Reported by: tm1000, Tony Lewis
      Tested by: Tony Lewis
      ........
      
      Merged revisions 422718 from http://svn.asterisk.org/svn/asterisk/branches/12
      ........
      
      Merged revisions 422719 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@422720 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      d42b1169
  21. Aug 30, 2014
  22. Aug 27, 2014
  23. Aug 26, 2014
  24. Aug 22, 2014
  25. Aug 18, 2014
    • Matthew Jordan's avatar
      Improve call forwarding reporting, especially with regards to ARI. · ba5d5da6
      Matthew Jordan authored
      This patch addresses a few issues:
      
      1) The order of Dial events have been changed when performing a call forward.
         The order has now been altered to
          1) Dial begins dialing channel A.
          2) When A forwards the call to B, we issue the dial end event to channel
             A, indicating the dial is being canceled due to a forward to B.
          3) When the call to channel B occurs, we then issue a new dial begin to
             channel B.
      
      2) Call forwards are now reported on the calling channel, not the peer channel.
      
      3) AMI DialEnd events have been altered to display the extension the call is
         being forwarded to when relevant.
      
      4) You can now get the values of channel variables for channels that are not
         currently in the Stasis application. This brings the retrieval of channel
         variables more in line with the rest of channel read operations since they
         may be performed on channels not in Stasis.
      
      ASTERISK-24134 #close
      Reported by Matt Jordan
      
      ASTERISK-24138 #close
      Reported by Matt Jordan
      
      Patches:
      	forward-shenanigans.diff uploaded by Matt Jordan (License #6283)
      
      Review: https://reviewboard.asterisk.org/r/3899
      ........
      
      Merged revisions 420794 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@421310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ba5d5da6
  26. Aug 17, 2014
  27. Aug 15, 2014
  28. Aug 13, 2014
  29. Aug 12, 2014
  30. Aug 11, 2014
    • Matthew Jordan's avatar
      app_queue: Add RealTime support for queue rules · add46fd2
      Matthew Jordan authored
      This patch gives the optional ability to keep queue rules in RealTime. It is
      important to note that with this patch:
       (a) Queue rules in RealTime are only examined on module load/reload
       (b) Queue rules are loaded both from the queuerules.conf file as well as the
           RealTime backend
      To inform app_queue to examine RealTime for queue rules, a new setting has been
      added to queuerules.conf's general section "realtime_rules". RealTime queue
      rules will only be used when this setting is set to "yes".
      
      The schema for the database table supports a rule_name, time, min_penalty, and
      max_penalty columns. min_penalty and max_penalty can be relative, if a '-' or
      '+' literal is provided. Otherwise, the penalties are treated as constants.
      
      For example:
      rule_name, time, min_penalty, max_penalty
      'default', '10', '20', '30'
      'test2', '20', '30', '55'
      'test2', '25', '-11', '+1111'
      'test2', '400', '112', '333'
      'test3', '0', '4564', '46546'
      'test_rule', '40', '15', '50'
      
      which would result in :
      
      Rule: default
       - After 10 seconds, adjust QUEUE_MAX_PENALTY to 30 and adjust
         QUEUE_MIN_PENALTY to 20
      Rule: test2
       - After 20 seconds, adjust QUEUE_MAX_PENALTY to 55 and adjust
         QUEUE_MIN_PENALTY to 30
       - After 25 seconds, adjust QUEUE_MAX_PENALTY by 1111 and adjust
         QUEUE_MIN_PENALTY by -11
       - After 400 seconds, adjust QUEUE_MAX_PENALTY to 333 and adjust
         QUEUE_MIN_PENALTY to 112
      Rule: test3
       - After 0 seconds, adjust QUEUE_MAX_PENALTY to 46546 and adjust
         QUEUE_MIN_PENALTY to 4564
      Rule: test_rule
       - After 40 seconds, adjust QUEUE_MAX_PENALTY to 50 and adjust
         QUEUE_MIN_PENALTY to 15
      
      If you use RealTime, the queue rules will be always reloaded on a module
      reload, even if the underlying file did not change. With the option disabled,
      the rules will only be reloaded if the file was modified.
      
      Review: https://reviewboard.asterisk.org/r/3607/
      
      ASTERISK-23823 #close
      Reported by: Michael K
      patches:
        app_queue.c_realtime_trunk.patch uploaded by Michael K (License 6621)
      ........
      
      Merged revisions 420624 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      add46fd2
  31. Aug 08, 2014
Loading