Skip to content
Snippets Groups Projects
  1. Nov 26, 2018
    • Joshua Colp's avatar
      stasis: Segment channel snapshot to reduce creation cost. · 50ac85cb
      Joshua Colp authored
      When a channel snapshot was created it used to be done
      from scratch, copying all data (many strings). This incurs
      a cost when doing so.
      
      This change segments the channel snapshot into different
      components which can be reused if unchanged from the
      previous snapshot creation, reducing the cost. In normal
      cases this results in some pointers being copied with
      reference count being bumped, some integers being set,
      and a string or two copied. The other benefit is that it
      is now possible to determine if a channel snapshot update
      is redundant and thus stop it before a message is published
      to stasis.
      
      The specific segments in the channel snapshot were split up
      based on whether they are changed together, how often they
      are changed, and their general grouping. In practice only
      1 (or 0) of the segments actually get changed in normal
      operation.
      
      Invalidation is done by setting a flag on the channel when
      the segment source is changed, forcing creation of a new
      segment when the channel snapshot is created.
      
      ASTERISK-28119
      
      Change-Id: I5d7ef3df963a88ac47bc187d73c5225c315f8423
      50ac85cb
  2. Nov 18, 2018
    • Joshua Colp's avatar
      stasis: Add internal filtering of messages. · 3077ad0c
      Joshua Colp authored
      This change adds the ability for subscriptions to indicate
      which message types they are interested in accepting. By
      doing so the filtering is done before being dispatched
      to the subscriber, reducing the amount of work that has
      to be done.
      
      This is optional and if a subscriber does not add
      message types they wish to accept and set the subscription
      to selective filtering the previous behavior is preserved
      and they receive all messages.
      
      There is also the ability to explicitly force the reception
      of all messages for cases such as AMI or ARI where a large
      number of messages are expected that are then generically
      converted into a different format.
      
      ASTERISK-28103
      
      Change-Id: I99bee23895baa0a117985d51683f7963b77aa190
      3077ad0c
  3. Oct 25, 2018
  4. Jul 10, 2018
    • Joshua Elson's avatar
      res_parking: Add dialplan function for lot channel · f7137e12
      Joshua Elson authored
      This commit adds a new function to res_parking.
      
      This function, PARK_GET_CHANNEL allows the retrieval
      of the channel name of the channel occupying the parking slot.
      
      ASTERISK-22825 #close
      
      Change-Id: Idba6ae55b8a53f734238cb3d995cedb95c0e7b74
      f7137e12
  5. Dec 20, 2017
    • Corey Farrell's avatar
      Fix Common Typo's. · 1b80ffa4
      Corey Farrell authored
      Fix instances of:
      * Retreive
      * Recieve
      * other then
      * different then
      * Repeated words ("the the", "an an", "and and", etc).
      * othterwise, teh
      
      ASTERISK-24198 #close
      
      Change-Id: I3809a9c113b92fd9d0d9f9bac98e9c66dc8b2d31
      1b80ffa4
  6. Jan 04, 2017
    • Jonathan R. Rose's avatar
      core/pbx: dialplan show - display filename/line# · d96e3502
      Jonathan R. Rose authored
      Adds the ability for extensions to be registered to include filename and
      line number so that dialplan show output can show the filename and line
      number of a config file responsible for generating a given extension.
      
      This only affects config modules that are written to use the new extension
      registering functions. In this patch, that only includes pbx_config, so
      extensions registered in extensions.conf and any included extension will
      be shown in this manner. Extensions registered in this manner will show
      the filename and line number *instead* of the registrar.
      
      ASTERISK-26658 #close
      Reported by: Jonathan R. Rose
      
      Change-Id: Ieccc6abccdff34ed5c7da3511fd24972b8f2dd30
      d96e3502
  7. Oct 27, 2016
    • Corey Farrell's avatar
      Remove ASTERISK_REGISTER_FILE. · a6e5bae3
      Corey Farrell authored
      ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
      all traces of it.
      
      Previously exported symbols removed:
      * __ast_register_file
      * __ast_unregister_file
      * ast_complete_source_filename
      
      This also removes the mtx_prof static variable that was declared when
      MTX_PROFILE was enabled.  This variable was only used in lock.c so it
      is now initialized in that file only.
      
      ASTERISK-26480 #close
      
      Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
      a6e5bae3
  8. Mar 26, 2016
    • Richard Mudgett's avatar
      res_parking: Fix blind transfer dynamic lots creation. · 8e8cf80c
      Richard Mudgett authored
      Blind transfers to a recognized parking extension need to use the parker's
      channel variable values to create the dynamic parking lot.  This is
      because there is always only one parker while the parkee may actually be a
      multi-party bridge.  A multi-party bridge can never supply the needed
      channel variables to create the dynamic parking lot.  In the multi-party
      bridge blind transfer scenario, the parker's CHANNEL(parkinglot) value and
      channel variables are inherited by the local channel used to park the
      bridge.
      
      * In park_common_setup(), make use the parker instead of the parkee to
      supply the dynamic parking lot channel variable values.  In all but one
      case, the parkee is the same as the parker.  However, in the recognized
      parking extension blind transfer scenario for a two party bridge they are
      different channels.  For consistency, we need to use the parker channel.
      
      * In park_local_transfer(), pass the CHANNEL(parkinglot) value to the
      local channel when blind transferring a multi-party bridge to a recognized
      parking extension.
      
      * When a local channel starts a call, the Local;2 side needs to inherit
      the CHANNEL(parkinglot) value from Local;1.
      
      The DTMF one-touch parking case wasn't even trying to create dynamic
      parking lots before it aborted the attempt.
      
      * In parking_park_call(), add missing code to create a dynamic parking
      lot.
      
      A DTMF bridge hook is documented as returning -1 to remove the hook.
      Though the hook caller is really coded to accept non-zero.  See the
      ast_bridge_hook_callback typedef.
      
      * In feature_park_call(), don't remove the DTMF one-touch parking hook
      because of an error.
      
      ASTERISK-24605 #close
      Reported by:  Philip Correia
      Patches:
            call_park.patch (license #6672) patch uploaded by Philip Correia
      
      Change-Id: I221d3a8fcc181877a1158d17004474d35d8016c9
      8e8cf80c
  9. Mar 25, 2016
    • Richard Mudgett's avatar
      res_parking: Cleanup find_channel_parking_lot_name() usage. · 3cf71403
      Richard Mudgett authored
      Change-Id: I8f7a8890aef27824301c642d4d15407ac83e6f02
      3cf71403
    • Richard Mudgett's avatar
      res_parking: Misc fixes. · 13e75ee0
      Richard Mudgett authored
      res/parking/parking_applications.c:
      
      * Add malloc fail checks in setup_park_common_datastore().
      
      * Fix playing parking failed announcement to only happen on non-blind
      transfers in park_app_exec().  It could never go out before because a test
      was provedly always false.
      
      res/parking/parking_bridge.c:
      
      * Fix NULL tolerance in generate_parked_user() because
      bridge_parking_push() can theoretically pass a NULL parker channel if the
      parker channel went away for some reason.
      
      * Clarify some weird code dealing with blind_transfer in
      bridge_parking_push().
      
      res/parking/parking_bridge_features.c:
      
      * Made park_local_transfer() set BLINDTRANSFER on the Local;1 channel
      which will be bulk copied to the Local;2 channel on the subsequent
      ast_call().  The additional advantage is if the parker channel has the
      BLINDTRANSFER and ATTENDEDTRANSFER variables set they are now guaranteed
      to be overridden.
      
      res/parking/parking_manager.c:
      
      * Fix AMI Park action input range checking of the Timeout header in
      manager_park().
      
      * Reduced locking scope to where needed in manager_park().
      
      res/res_parking.c:
      
      * Fix some off nominal missing unlocks by eliminating the returns.
      
      Change-Id: Ib64945bc285acb05a306dc12e6f16854898915ca
      13e75ee0
    • Philip Correia's avatar
      res_parking: Update parking documentation for dynamic parking lots. · e2853ae3
      Philip Correia authored
      * Remove duplicate res_parking.conf courtesytone config option
      documentation.
      
      ASTERISK-24596 #close
      Reported by:  Philip Correia
      
      ASTERISK-24605
      Reported by:  Philip Correia
      Patches:
            call_park_app_doc.patch (license #6672) patch uploaded by Philip Correia
      
      Change-Id: I90a92a891c6494dc08173e675856afcc4764c5b5
      e2853ae3
  10. Sep 04, 2015
    • Jonathan Rose's avatar
      ParkAndAnnounce: Add variable inheritance · 7d981b78
      Jonathan Rose authored
      In Asterisk 11, the announcer channel would receive channel variables
      from the channel being parked by means of normal channel inheritance.
      This functionality was lost during the big res_parking project in
      Asterisk 12. This patch restores that functionality.
      
      ASTERISK-25369 #close
      Review: https://gerrit.asterisk.org/#/c/1180/
      
      Change-Id: Ie47e618330114ad2ea91e2edcef1cb6f341eed6e
      7d981b78
  11. Jul 16, 2015
  12. Jun 16, 2015
    • Mark Michelson's avatar
      Parking: Add documentation for AMI ParkedCallSwap event. · 59552c2d
      Mark Michelson authored
      This event was added some time ago in order to clarify when a channel
      took the place of another channel in a parking lot. However, there was
      no XML documentation added for the event. This patch adds the XML
      documentation.
      
      ASTERISK-24900 #close
      Reported by Rusty Newton
      
      Change-Id: I4cfe7777c4b94bbff91c9221c6096a7a02a92eac
      59552c2d
  13. May 05, 2015
    • Corey Farrell's avatar
      Modules: Make ast_module_info->self available to auxiliary sources. · a8bfa9e1
      Corey Farrell authored
      ast_module_info->self is often needed to register items with the core.  Many
      modules have ad-hoc code to make this pointer available to auxiliary sources.
      This change updates the module build process to make the needed information
      available to all sources in a module.
      
      ASTERISK-25056 #close
      Reported by: Corey Farrell
      
      Change-Id: I18c8cd58fbcb1b708425f6757becaeca9fa91815
      a8bfa9e1
  14. Apr 13, 2015
    • Matt Jordan's avatar
      git migration: Refactor the ASTERISK_FILE_VERSION macro · 4a582616
      Matt Jordan authored
      Git does not support the ability to replace a token with a version
      string during check-in. While it does have support for replacing a
      token on clone, this is somewhat sub-optimal: the token is replaced
      with the object hash, which is not particularly easy for human
      consumption. What's more, in practice, the source file version was often
      not terribly useful. Generally, when triaging bugs, the overall version
      of Asterisk is far more useful than an individual SVN version of a file. As a
      result, this patch removes Asterisk's support for showing source file
      versions.
      
      Specifically, it does the following:
      
      * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
        remove passing the version in with the macro. Other facilities
        than 'core show file version' make use of the file names, such as
        setting a debug level only on a specific file. As such, the act of
        registering source files with the Asterisk core still has use. The
        macro rename now reflects the new macro purpose.
      
      * main/asterisk:
        - Refactor the file_version structure to reflect that it no longer
          tracks a version field.
        - Remove the "core show file version" CLI command. Without the file
          version, it is no longer useful.
        - Remove the ast_file_version_find function. The file version is no
          longer tracked.
        - Rename ast_register_file_version/ast_unregister_file_version to
          ast_register_file/ast_unregister_file, respectively.
      
      * main/manager: Remove value from the Version key of the ModuleCheck
        Action. The actual key itself has not been removed, as doing so would
        absolutely constitute a backwards incompatible change. However, since
        the file version is no longer tracked, there is no need to attempt to
        include it in the Version key.
      
      * UPGRADE: Add notes for:
        - Modification to the ModuleCheck AMI Action
        - Removal of the "core show file version" CLI command
      
      Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
      4a582616
  15. Apr 06, 2015
  16. Jan 27, 2015
  17. Jan 23, 2015
  18. Jan 12, 2015
  19. 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
  20. Dec 01, 2014
    • Matthew Jordan's avatar
      main/stasis: Allow subscriptions to use a threadpool for message delivery · 1106e8fd
      Matthew Jordan authored
      Prior to this patch, all Stasis subscriptions would receive a dedicated
      thread for servicing published messages. In contrast, prior to r400178
      (see review https://reviewboard.asterisk.org/r/2881/), the subscriptions
      shared a thread pool. It was discovered during some initial work on Stasis
      that, for a low subscription count with high message throughput, the
      threadpool was not as performant as simply having a dedicated thread per
      subscriber.
      
      For situations where a subscriber receives a substantial number of messages
      and is always present, the model of having a dedicated thread per subscriber
      makes sense. While we still have plenty of subscriptions that would follow
      this model, e.g., AMI, CDRs, CEL, etc., there are plenty that also fall into
      the following two categories:
      * Large number of subscriptions, specifically those tied to endpoints/peers.
      * Low number of messages. Some subscriptions exist specifically to coordinate
        a single message - the subscription is created, a message is published, the
        delivery is synchronized, and the subscription is destroyed.
      In both of the latter two cases, creating a dedicated thread is wasteful (and
      in the case of a large number of peers/endpoints, harmful). In those cases,
      having shared delivery threads is far more performant.
      
      This patch adds the ability of a subscriber to Stasis to choose whether or not
      their messages are dispatched on a dedicated thread or on a threadpool. The
      threadpool is configurable through stasis.conf.
      
      Review: https://reviewboard.asterisk.org/r/4193
      
      ASTERISK-24533 #close
      Reported by: xrobau
      Tested by: xrobau
      ........
      
      Merged revisions 428681 from http://svn.asterisk.org/svn/asterisk/branches/12
      ........
      
      Merged revisions 428687 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      1106e8fd
  21. Nov 18, 2014
  22. Oct 15, 2014
  23. Aug 06, 2014
  24. Jul 24, 2014
    • Richard Mudgett's avatar
      accountcode: Slightly change accountcode propagation. · a2ce95d9
      Richard Mudgett authored
      The previous behavior was to simply set the accountcode of an outgoing
      channel to the accountcode of the channel initiating the call.  It was
      done this way a long time ago to allow the accountcode set on the SIP/100
      channel to be propagated to a local channel so the dialplan execution on
      the Local;2 channel would have the SIP/100 accountcode available.
      
      SIP/100 -> Local;1/Local;2 -> SIP/200
      
      Propagating the SIP/100 accountcode to the local channels is very useful.
      Without any dialplan manipulation, all channels in this call would have
      the same accountcode.
      
      Using dialplan, you can set a different accountcode on the SIP/200 channel
      either by setting the accountcode on the Local;2 channel or by the Dial
      application's b(pre-dial), M(macro) or U(gosub) options, or by the
      FollowMe application's b(pre-dial) option, or by the Queue application's
      macro or gosub options.  Before Asterisk v12, the altered accountcode on
      SIP/200 will remain until the local channels optimize out and the
      accountcode would change to the SIP/100 accountcode.
      
      Asterisk v1.8 attempted to add peeraccount support but ultimately had to
      punt on the support.  The peeraccount support was rendered useless because
      of how the CDR code needed to unconditionally force the caller's
      accountcode onto the peer channel's accountcode.  The CEL events were thus
      intentionally made to always use the channel's accountcode as the
      peeraccount value.
      
      With the arrival of Asterisk v12, the situation has improved somewhat so
      peeraccount support can be made to work.  Using the indicated example, the
      the accountcode values become as follows when the peeraccount is set on
      SIP/100 before calling SIP/200:
      
      SIP/100 ---> Local;1 ---- Local;2 ---> SIP/200
      acct: 100 \/ acct: 200 \/ acct: 100 \/ acct: 200
      peer: 200 /\ peer: 100 /\ peer: 200 /\ peer: 100
      
      If a channel already has an accountcode it can only change by the
      following explicit user actions:
      
      1) A channel originate method that can specify an accountcode to use.
      
      2) The calling channel propagating its non-empty peeraccount or its
      non-empty accountcode if the peeraccount was empty to the outgoing
      channel's accountcode before initiating the dial.  e.g., Dial and
      FollowMe.  The exception to this propagation method is Queue.  Queue will
      only propagate peeraccounts this way only if the outgoing channel does not
      have an accountcode.
      
      3) Dialplan using CHANNEL(accountcode).
      
      4) Dialplan using CHANNEL(peeraccount) on the other end of a local
      channel pair.
      
      If a channel does not have an accountcode it can get one from the
      following places:
      
      1) The channel driver's configuration at channel creation.
      
      2) Explicit user action as already indicated.
      
      3) Entering a basic or stasis-mixing bridge from a peer channel's
      peeraccount value.
      
      You can specify the accountcode for an outgoing channel by setting the
      CHANNEL(peeraccount) before using the Dial, FollowMe, and Queue
      applications.  Queue adds the wrinkle that it will not overwrite an
      existing accountcode on the outgoing channel with the calling channels
      values.
      
      Accountcode and peeraccount values propagate to an outgoing channel before
      dialing.  Accountcodes also propagate when channels enter or leave a basic
      or stasis-mixing bridge.  The peeraccount value only makes sense for
      mixing bridges with two channels; it is meaningless otherwise.
      
      * Made peeraccount functional by changing accountcode propagation as
      described above.
      
      * Fixed CEL extracting the wrong ie value for the peeraccount.  This was
      done intentionally in Asterisk v1.8 when that version had to punt on
      peeraccount.
      
      * Fixed a few places dealing with accountcodes that were reading from
      channels without the lock held.
      
      AFS-65 #close
      
      Review: https://reviewboard.asterisk.org/r/3601/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      a2ce95d9
  25. Jul 20, 2014
  26. Jun 20, 2014
  27. Jun 19, 2014
  28. May 28, 2014
    • Matthew Jordan's avatar
      Logger/CLI/etc.: Fix some aesthetic issues; reduce chatty verbose messages · fb5690ce
      Matthew Jordan authored
      This patch addresses some aesthetic issues in Asterisk. These are all just
      minor tweaks to improve the look of the CLI when used in a variety of
      settings. Specifically:
       * A number of chatty verbose messages were removed or demoted to DEBUG
         messages. Verbose messages with a verbosity level of 5 or higher were -
         if kept as verbose messages - demoted to level 4. Several messages
         that were emitted at verbose level 3 were demoted to 4, as announcement
         of dialplan applications being executed occur at level 3 (and so the
         effects of those applications should generally be less).
       * Some verbose messages that only appear when their respective 'debug'
         options are enabled were bumped up to always be displayed.
       * Prefix/timestamping of verbose messages were moved to the verboser
         handlers. This was done to prevent duplication of prefixes when the
         timestamp option (-T) is used with the CLI.
       * Verbose magic is removed from messages before being emitted to
         non-verboser handlers. This prevents the magic in multi-line verbose
         messages (such as SIP debug traces or the output of DumpChan) from
         being written to files.
       * _Slightly_ better support for the "light background" option (-W) was
         added. This includes using ast_term_quit in the output of XML
         documentation help, as well as changing the "Asterisk Ready" prompt to
         bright green on the default background (which stands a better chance of
         being displayed properly than bright white).
      
      Review: https://reviewboard.asterisk.org/r/3547/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      fb5690ce
  29. May 22, 2014
  30. May 09, 2014
  31. May 02, 2014
  32. Apr 15, 2014
  33. Apr 01, 2014
  34. Mar 07, 2014
    • Scott Griepentrog's avatar
      uniqueid: channel linkedid, ami, ari object creation with id's · 80ef9a21
      Scott Griepentrog authored
      Much needed was a way to assign id to objects on creation, and
      much change was necessary to accomplish it.  Channel uniqueids
      and linkedids are split into separate string and creation time
      components without breaking linkedid propgation.  This allowed
      the uniqueid to be specified by the user interface - and those
      values are now carried through to channel creation, adding the
      assignedids value to every function in the chain including the
      channel drivers. For local channels, the second channel can be
      specified or left to default to a ;2 suffix of first.  In ARI,
      bridge, playback, and snoop objects can also be created with a
      specified uniqueid.
      
      Along the way, the args order to allocating channels was fixed
      in chan_mgcp and chan_gtalk, and linkedid is no longer lost as
      masquerade occurs.
      
      (closes issue ASTERISK-23120)
      Review: https://reviewboard.asterisk.org/r/3191/
      ........
      
      Merged revisions 410157 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      80ef9a21
  35. Dec 20, 2013
Loading