Skip to content
Snippets Groups Projects
  1. Oct 31, 2017
    • Kevin Harwell's avatar
      features: Bridge application's BRIDGERESULT not appropriately set · 1e700117
      Kevin Harwell authored
      The dialplan application "Bridge" was not setting the BRIDGERESULT to failure
      when a failure did occur. Even worse if it did fail to join the bridge it would
      still report success.
      
      This patch now sets the BRIDGERESULT variable to an appropriate value for a
      given condition state. Also, removed the value INCOMPATIBLE as a valid result
      type since it is no longer used.
      
      ASTERISK-27369 #close
      
      Change-Id: I22588e7125a765edf35cff28c98ca143e9927554
      1e700117
  2. May 04, 2017
    • Joshua Colp's avatar
      bridge: Fix returning to dialplan when executing Bridge() from AMI. · c90d81ef
      Joshua Colp authored
      When using the Bridge AMI action on the same channel multiple times
      it was possible for the channel to return to the wrong location in
      the dialplan if the other party hung up. This happened because the
      priority of the channel was not preserved across each action
      invocation and it would fail to move on to the next priority in
      other cases.
      
      This change makes it so that the priority of a channel is preserved
      when taking control of it from another thread and it is incremented
      as appropriate such that the priority reflects where the channel
      should next be executed in the dialplan, not where it may or may not
      currently be.
      
      The Bridge AMI action was also changed to ensure that it too
      starts the channels at the next location in the dialplan.
      
      ASTERISK-24529
      
      Change-Id: I52406669cf64208aef7252a65b63ade31fbf7a5a
      c90d81ef
  3. 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
  4. Aug 15, 2016
  5. Jul 15, 2016
  6. Jun 30, 2016
    • Richard Mudgett's avatar
      features: Fix channel datastore access. · 4f7b8597
      Richard Mudgett authored
      Found as a result of the testsuite tests/callparking test crashing.
      
      Several calls to ast_get_chan_featuremap_config() and
      ast_get_chan_features_xfer_config() did not lock the channel before
      calling so the channel's datastore list was accessed without the lock's
      protection.  Apparently another thread deleted a datastore on the
      channel's list while the crashing thread was walking the list.  Crash at
      0xdeaddead due to MALLOC_DEBUG's memory filler value as a result.
      
      * Add missing channel locks to calls that were not already protected
      as the doxygen for those calls indicates.
      
      Change-Id: Id273b3d305cc616406c353cbc841b2b7655efaa1
      4f7b8597
  7. Jun 08, 2016
    • Timo Teräs's avatar
      Fixes to include signal.h · 39b69ab5
      Timo Teräs authored
      POSIX defines signal.h. sys/signal.h should not be used as it is
      c-library internal header which may or may not exist. Notably with
      musl it generates warning of being incorrect.
      
      Change-Id: Ia56b0aa1d84b5c590114867b1b384a624f39a6fc
      39b69ab5
  8. Apr 22, 2016
  9. May 03, 2015
    • Corey Farrell's avatar
      Remove unneeded uses of optional_api providers. · c3ec5da1
      Corey Farrell authored
      A few cases exist where headers of optional_api provders are included but
      not needed.  This causes unneeded calls to ast_optional_api_use.
      
      * Don't include optional_api.h from sip_api.h.
      * Move 'struct ast_channel_monitor' to channel.h.
      * Don't include monitor.h from chan_sip.c, channel.c or features.c.
      
      The move of struct ast_channel_monitor is needed since channel.c depends on
      it.  This has no effect on users of monitor.h since channel.h is included
      from monitor.h.
      
      ASTERISK-25051 #close
      Reported by: Corey Farrell
      
      Change-Id: I53ea65a9fc9693c89f8bcfd6120649bfcfbc3478
      c3ec5da1
  10. Apr 17, 2015
    • Mark Michelson's avatar
      Detect potential forwarding loops based on count. · aae45acb
      Mark Michelson authored
      A potential problem that can arise is the following:
      
      * Bob's phone is programmed to automatically forward to Carol.
      * Carol's phone is programmed to automatically forward to Bob.
      * Alice calls Bob.
      
      If left unchecked, this results in an endless loops of call forwards
      that would eventually result in some sort of fiery crash.
      
      Asterisk's method of solving this issue was to track which interfaces
      had been dialed. If a destination were dialed a second time, then
      the attempt to call that destination would fail since a loop was
      detected.
      
      The problem with this method is that call forwarding has evolved. Some
      SIP phones allow for a user to manually forward an incoming call to an
      ad-hoc destination. This can mean that:
      
      * There are legitimate use cases where a device may be dialed multiple
      times, or
      * There can be human error when forwarding calls.
      
      This change removes the old method of detecting forwarding loops in
      favor of keeping a count of the number of destinations a channel has
      dialed on a particular branch of a call. If the number exceeds the
      set number of max forwards, then the call fails. This approach has
      the following advantages over the old:
      
      * It is much simpler.
      * It can detect loops involving local channels.
      * It is user configurable.
      
      The only disadvantage it has is that in the case where there is a
      legitimate forwarding loop present, it takes longer to detect it.
      However, the forwarding loop is still properly detected and the
      call is cleaned up as it should be.
      
      Address review feedback on gerrit.
      
      * Correct "mfgium" to "Digium"
      * Decrement max forwards by one in the case where allocation of the
        max forwards datastore is required.
      * Remove irrelevant code change from pjsip_global_headers.c
      
      ASTERISK-24958 #close
      
      Change-Id: Ia7e4b7cd3bccfbd34d9a859838356931bba56c23
      aae45acb
  11. 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
  12. Mar 28, 2015
  13. Mar 26, 2015
  14. Mar 13, 2015
  15. Jan 09, 2015
  16. Nov 12, 2014
  17. Oct 06, 2014
  18. Jan 17, 2014
  19. Sep 13, 2013
    • Richard Mudgett's avatar
      Restore Dial, Queue, and FollowMe 'I' option support. · 2a371cd8
      Richard Mudgett authored
      The Dial, Queue, and FollowMe applications need to inhibit the bridging
      initial connected line exchange in order to support the 'I' option.
      
      * Replaced the pass_reference flag on ast_bridge_join() with a flags
      parameter to pass other flags defined by enum ast_bridge_join_flags.
      
      * Replaced the independent flag on ast_bridge_impart() with a flags
      parameter to pass other flags defined by enum ast_bridge_impart_flags.
      
      * Since the Dial, Queue, and FollowMe applications are now the only
      callers of ast_bridge_call() and ast_bridge_call_with_flags(), changed the
      calling contract to require the initial COLP exchange to already have been
      done by the caller.
      
      * Made all callers of ast_bridge_impart() check the return value.  It is
      important.  As a precaution, I also made the compiler complain now if it
      is not checked.
      
      * Did some cleanup in parking_tests.c as a result of checking the
      ast_bridge_impart() return value.
      
      An independent, but associated change is:
      * Reduce stack usage in ast_indicate_data() and add a dropping redundant
      connected line verbose message.
      
      (closes issue ASTERISK-22072)
      Reported by: Joshua Colp
      
      Review: https://reviewboard.asterisk.org/r/2845/
      ........
      
      Merged revisions 399136 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      2a371cd8
  20. Aug 22, 2013
    • Richard Mudgett's avatar
      Bridge API: Set a cause code on a channel when it is ejected from a bridge. · 477dea46
      Richard Mudgett authored
      The cause code needs to be passed from the disconnecting channel to the
      bridge peers if the disconnecting channel dissolves the bridge.
      
      * Made the call to an app_agent_pool agent disconnect with the busy cause
      code if the agent does not ack the call in time or hangs up before acking
      the call.
      
      (closes issue ASTERISK-22042)
      Reported by: Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/2772/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397472 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      477dea46
    • Mark Michelson's avatar
      Massively clean up app_queue. · 00baddb9
      Mark Michelson authored
      This essentially makes app_queue usable again. From reviewboard:
      
      * Reporting of transfers and call completion is done by creating stasis 
        subscriptions and listening for specific events in order to determine
        when the call is finished (either via a transfer or hangup).
      * Dial end messages have been added where they were previously missing.
      * Queue stats are properly being updated again once calls have finished.
      * AgentComplete stasis messages and AMI events are now occurring again.
      * Mixmonitor starting has been factored into its own function and uses the
        Mixmonitor API now instead of using ast_pbx_run()
      
      In addition to the changes in app_queue, there are several supplementary changes as well:
      
      * Queue logging now differentiates between attended and blind transfers. A
        note about this is in the CHANGES file.
      * Local channel optimization events now report more information. This
        includes which of the two local channels involved is the destination of
        the optimization, the channel that is replacing the destination local channel,
        and an identifier so that begin and end events can be matched to each other.
        The end events are now sent whether the optimization was successful or not and
        includes an indicator of whether the optimization was successful.
      * Changes were made to features and bridging_basic so that additional flags may
        be set on a bridge. This is necessary because the queue requires that its
        bridge only allows move-swap local channel optimizations into the bridge.
      
      (closes issue ASTERISK-21517)
      Reported by Matt Jordan
      
      (closes issue ASTERISK-21943)
      Reported by Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/2694
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      00baddb9
  21. Aug 21, 2013
    • Richard Mudgett's avatar
      * Move ast_bridge_channel_setup_features() into bridge_basic.c. · b816fe45
      Richard Mudgett authored
      * Made application map hooks be removed on a basic bridge personality
      change.
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      b816fe45
    • Richard Mudgett's avatar
      Fix several interrelated issues dealing with the holding bridge technology. · d213dfa3
      Richard Mudgett authored
      * Added an option flags parameter to interval hooks.  Interval hooks now
      can specify if the callback will affect the media path or not.
      
      * Added an option flags parameter to the bridge action custom callback.
      The action callback now can specify if the callback will affect the media
      path or not.
      
      * Made the holding bridge technology reexamine the participant idle mode
      option whenever the entertainment is restarted.
      
      * Fixed app_agent_pool waiting agents needlessly starting and stopping MOH
      every second by specifying the heartbeat interval hook as not affecting
      the media path.
      
      * Fixed app_agent_pool agent alert from restarting the MOH after the alert
      beep.  The agent entertainment is now changed from MOH to silence after
      the alert beep.
      
      * Fixed holding bridge technology to defer starting the entertainment.  It
      was previously a mixture of immediate and deferred.
      
      * Fixed holding bridge technology to immediately stop the entertainment.
      It was previously a mixture of immediate and deferred.  If the channel
      left the bridging system, any deferred stopping was discarded before
      taking effect.
      
      * Miscellaneous holding bridge technology rework coding improvements.
      
      Review: https://reviewboard.asterisk.org/r/2761/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      d213dfa3
  22. Aug 16, 2013
  23. Aug 15, 2013
  24. Aug 12, 2013
    • Matthew Jordan's avatar
      Fix two race conditions and ref counting issue when joining a bridge · 63b5bf26
      Matthew Jordan authored
      These problems were all caught by a test in the Asterisk Test Suite that
      originated some Local channels and attempted to move the ;2 half of the Local
      channel into a bridge using the Bridge AMI action.
      
      (1) When originating a channel, the Newchannel event is emitted quickly;
          however, the ;2 channel will not have a pbx thread assigned to it until
          after the outbound 'dialing' for the ;1 is complete. Thus, there is a period
          of time where the outside world "knows" of the channel's existence and can
          influence it but Asterisk has not yet started the dialplan execution thread.
          If a Bridge AMI action is taken on the channel, the channel appears to be a
          Dialed channel with no PBX thread; hence, the channel will be imparted into
          the Bridge by first 'yanking' the channel. At the same time, a race condition
          can occur after the yank (but before entering the bridge) when ;1 answers
          and starts a PBX on the ;2. The end result currently is an assertion failure
          in the Bridging API, as a channel with a PBX is imparted into the Bridge.
      
          There's no way to prevent AMI from attempting to Bridge a channel
          immediately after creation; likewise, holding the channel lock through the
          entire Dial operation is unwise (and impossible). Instead of treating the
          presence of a PBX thread as an error, we simply bail out of the adding the
          channel to the bridge through ast_bridge_impart. The Bridge action will
          then fail - but we avoid a situation where the channel is both executing
          a PBX thread and simultaneously being given a separate thread in the
          bridging system (which would be a "bad thing"). Since imparting a channel
          with a PBX *can* occur and is not a programming error, the asserts have been
          removed.
      
      (2) When the first condition occurs, we have to take one of two actions: either
          hangup the yanked channel as it did not enter the bridge, or deref it
          because we don't own it. We can determine if we own it or not by testing
          for the presence of the PBX thread. If we hung it up directly, we'd crash.
      
      (3) bridge_find_channel does not increase the reference count of the
          ast_bridge_channel object. The RAII_VAR usage in ast_bridge_add_channel
          thus created a ticking time bomb in whatever bridge the channel moved into,
          as the destructor for the ast_bridge_channel object would be called.
      
      Review: https://reviewboard.asterisk.org/r/2741/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      63b5bf26
  25. Aug 08, 2013
  26. Aug 05, 2013
  27. Aug 02, 2013
  28. Aug 01, 2013
    • Matthew Jordan's avatar
      Support externally initiated parking requests; remove some dead code · 5c4b4824
      Matthew Jordan authored
      This patch does the following:
       * It adds support for externally initiated parking requests. In particular,
         chan_skinny has a protocol level message that initiates a call park.
         This patch now supports that option, as well as the protocol specific
         mechanisms in chan_dahdi/sig_analog and chan_mgcp.
       * A parking bridge features virtual table has been added that provides
         access to the parking functionality that the Bridging API needs. This
         includes requests to park an entire 'call' (with little or no additional
         information, thank you chan_skinny), perform a blind transfer to a parking
         extension, determine if an extension is a parking extension, as well as the
         actual "do the parking" request from the Bridging API.
       * Refactoring in chan_mgcp, chan_skinny, and chan_dahdi to make use of the new
         functions
       * The removal of some - but not all - dead parking code from features.c
      
      This also fixed blind transferring a multi-party bridge to a parking lot (which
      was implemented, but had at least one code path where using the parking features
      kK might not have worked)
      
      Review: https://reviewboard.asterisk.org/r/2710
      
      (closes issue ASTERISK-22134)
      Reported by: Matt Jordan
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      5c4b4824
    • Kinsey Moore's avatar
      Fix documentation replication issues · 03090a88
      Kinsey Moore authored
      This prevents XML documentation duplication by expanding channel and
      bridge snapshot tags into channel and bridge snapshot parameter sets
      with a given prefix or defaulting to no prefix. This also prevents
      documentation from becoming fractured and out of date by keeping all
      variations of the documentation in template form such that it only
      needs to be updated once and keeps maintenance to a minimum.
      
      Review: https://reviewboard.asterisk.org/r/2708/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395985 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      03090a88
  29. Jul 26, 2013
    • Richard Mudgett's avatar
      Remove the unsafe bridge parameter from ast_bridge_hook_callback's. · c017d5e6
      Richard Mudgett authored
      Most hook callbacks did not need the bridge parameter.  The pointer value
      could become invalid if the channel is moved to another bridge while it is
      executing.
      
      * Fixed some issues in feature_attended_transfer() as a result.
      
      * Reduce the bridge inhibit count in
      attended_transfer_properties_shutdown() after it has restored the bridge
      channel hooks.
      
      * Removed basic bridge requirement on feature_blind_transfer().  It does
      not require the basic bridge like feature_attended_transfer().
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c017d5e6
  30. Jul 25, 2013
Loading