Skip to content
Snippets Groups Projects
  1. Sep 20, 2017
    • Ben Ford's avatar
      res_pjsip_session: Check for removed stream state. · e666051d
      Ben Ford authored
      When a sip session is refreshed, the stream topology is looped
      through, checking each stream for compatible formats. This would
      cause a crash if the stream state was AST_STREAM_STATE_REMOVED,
      since the formats would never be set for this stream, causing
      a NULL value to be returned from ast_stream_get_formats. This
      commit adds a check for streams with removed states.
      
      Also removed a stray semicolon.
      
      Change-Id: Ic86f8b65a4a26a60885b28b8b1a0b22e1b471d42
      e666051d
  2. Sep 06, 2017
    • George Joseph's avatar
      stasis/control: Fix possible deadlock with swap channel · 94091c7b
      George Joseph authored
      If an error occurs during a bridge impart it's possible that
      the "bridge_after" callback might try to run before
      control_swap_channel_in_bridge has been signalled to continue.
      Since control_swap_channel_in_bridge is holding the control lock
      and the callback needs it, a deadlock will occur.
      
      * control_swap_channel_in_bridge now only holds the control
        lock while it's actually modifying the control structure and
        releases it while the bridge impart is running.
      * bridge_after_cb is now tolerant of impart failures.
      
      Change-Id: Ifd239aa93955b3eb475521f61e284fcb0da2c3b3
      94091c7b
  3. Aug 06, 2017
    • Joshua Colp's avatar
      bridge: Fix stream topology/participant locking and video misrouting. · 88c65f7c
      Joshua Colp authored
      This change fixes a few locking issues and some video misrouting.
      
      1. When accessing the stream topology of a channel the channel lock
      must be held to guarantee the topology remains valid.
      
      2. When a channel was joined to a bridge the bridge specific
      implementation for stream mapping was not invoked, causing video
      to be misrouted for a brief period of time.
      
      ASTERISK-27182
      
      Change-Id: I5d2f779248b84d41c5bb3896bf22ba324b336b03
      88c65f7c
  4. Jul 19, 2017
    • Joshua Colp's avatar
      bridge_softmix / res_rtp_asterisk: Fix packet loss and renegotiation issues. · 680c491a
      Joshua Colp authored
      This change does a few things to improve packet loss and renegotiation:
      
      1. On outgoing RTP streams we will now properly reflect out of order
      packets and packet loss in the sequence number. This allows the
      remote jitterbuffer to better reorder things.
      
      2. Video updates can now be discarded for a period of time
      after one has been sent to prevent flooding of clients.
      
      3. For declined and removed streams we will now release any
      media session resources associated with them. This was not
      previously done and caused an issue where old state was being
      used for a new stream.
      
      4. RTP bundling was not actually removing bundled RTP instances
      from the parent. This has been resolved by removing based on
      the RTP instance itself and not the SSRC.
      
      5. The code did not properly handle explicitly unbundling an
      RTP instance from its parent. This now works as expected.
      
      ASTERISK-27143
      
      Change-Id: Ibd91362f0e4990b6129638e712bc8adf0899fd45
      680c491a
  5. Jun 21, 2017
    • Kevin Harwell's avatar
      core_local: local channel data not being properly unref'ed and unlocked · 27dae55f
      Kevin Harwell authored
      In an earlier version of Asterisk a local channel [un]lock all functions were
      added in order to keep a crash from occurring when a channel hung up too early
      during an attended transfer. Unfortunately, when a transfer failure occurs and
      depending on the timing, the local channels sometime do not get properly
      unlocked and deref'ed after being locked and ref'ed. This happens because the
      underlying local channel structure gets NULLed out before unlocking.
      
      This patch reworks those [un]lock functions and makes sure the values that get
      locked and ref'ed later get unlocked and deref'ed.
      
      ASTERISK-27074 #close
      
      Change-Id: Ice96653e29bd9d6674ed5f95feb6b448ab148b09
      27dae55f
    • Kevin Harwell's avatar
      bridge: stuck channel(s) after failed attended transfer · 45a1f4e2
      Kevin Harwell authored
      If an attended transfer failed it was possible for some of the channels
      involved to get "stuck" because Asterisk was not hanging up the transfer target.
      
      This patch ensures Asterisk hangs up the transfer target when an attended
      transfer failure occurs.
      
      ASTERISK-27075 #close
      
      Change-Id: I98a6ecd92d3461ab98c36f0d9451d23adaf3e5f9
      45a1f4e2
  6. Jun 13, 2017
    • Joshua Colp's avatar
      bridge: Add a deferred queue. · d6386a8f
      Joshua Colp authored
      This change adds a deferred queue to bridging. If a bridge
      technology determines that a frame can not be written and
      should be deferred it can indicate back to bridging to do so.
      Bridging will then requeue any deferred frames upon a new
      channel joining the bridge.
      
      This change has been leveraged for T.38 request negotiate
      control frames. Without the deferred queue there is a race
      condition between the bridge receiving the T.38 request
      negotiate and the second channel joining and being in the
      bridge. If the channel is not yet in the bridge then the T.38
      negotiation fails.
      
      A unit test has also been added that confirms that a T.38
      request negotiate control frame is deferred when no other
      channel is in the bridge and that it is requeued when a new
      channel joins the bridge.
      
      ASTERISK-26923
      
      Change-Id: Ie05b08523f399eae579130f4a5f562a344d2e415
      d6386a8f
  7. May 30, 2017
    • Mark Michelson's avatar
      Confbridge: Add "sfu" video mode to bridge profile options. · 39d14834
      Mark Michelson authored
      A previous commit added plumbing to bridge_softmix to allow for an SFU
      experience with Asterisk. This commit adds an option to app_confbridge
      that allows for a confbridge to actually make use of the SFU video mode.
      
      SFU mode is implemented in a "set it and forget it" kind of way. That
      is, when the bridge is created, if SFU mode is enabled, then the video
      mode gets set to SFU and cannot be changed. Future improvements may
      allow for a hybrid experience (e.g. forward multiple video streams,
      specifically those of the most recent talkers), but for this addition,
      no such capability is present.
      
      Change-Id: I87bbcb63dec6dbbb42488f894871b86f112b2020
      39d14834
    • Mark Michelson's avatar
      Add primitive SFU support to bridge_softmix. · 2da86940
      Mark Michelson authored
      This sets up the "plumbing" in bridge_softmix to
      be able to accommodate Asterisk asking as an SFU
      (selective forwarding unit) for conferences.
      
      The way this works is that whenever a channel enters or leaves a
      conference, all participants in the bridge get sent a stream topology
      change request. The topologies consist of the channels' original
      topology, along with video destination streams corresponding to each
      participants' source video streams. So for instance, if Alice, Bob, and
      Carol are in the conference, and each supplies one video stream, then
      the topologies for each would look like so:
      
      Alice:
      Audio,
      Source video(Alice),
      Destination Video(Bob),
      Destination video (Carol)
      
      Bob:
      Audio,
      Source video(Bob)
      Destination Video(Alice),
      Destination video (Carol)
      
      Carol:
      Audio,
      Source video(Carol)
      Destination Video(Alice),
      Destination video (Bob)
      
      This way, video that arrives from a source video stream can then be
      copied out to the destination video streams on the other participants'
      channels.
      
      Once the bridge gets told that a topology on a channel has changed, the
      bridge constructs a map in order to get the video frames routed to the
      proper destination streams. This is done using the bridge channel's
      stream_map.
      
      This change is bare-bones with regards to SFU support. Some key features
      are missing at this point:
      
      * Stream limits. This commit makes no effort to limit the number of
        streams on a specific channel. This means that if there were 50 video
        callers in a conference, bridge_softmix will happily send out topology
        change requests to every channel in the bridge, requesting 50+
        streams.
      
      * Configuration. The plumbing has been added to bridge_softmix, but
        there has been nothing added as of yet to app_confbridge to enable SFU
        video mode.
      
      * Testing. Some functions included here have unit tests.
        However, the functionality as a whole has only been verified by
        hand-tracing the code.
      
      * Selectivenss. For a "selective" forwarding unit, this does not
        currently have any means of being selective.
      
      * Features. Presumably, someone might wish to only receive video from
        specific sources. There are no external-facing functions at the moment
        that allow for users to select who they receive video from.
      
      * Efficiency. The current scheme treats all video streams as being
        unidirectional. We could be re-using a source video stream as a
        desetnation, too. But to simplify things on this first round, I did it
        this way.
      
      Change-Id: I7c44a829cc63acf8b596a337b2dc3c13898a6c4d
      2da86940
  8. May 03, 2017
    • Kevin Harwell's avatar
      bridge_simple: Added support for streams · 7b0e3b92
      Kevin Harwell authored
      This patch is the first cut at adding stream support to the bridging framework.
      Changes were made to the framework that allows mapping of stream topologies to
      a bridge's supported media types.
      
      The first channel to enter a bridge initially defines the media types for a
      bridge (i.e. a one to one mapping is created between the bridge and the first
      channel). Subsequently added channels merge their media types into the bridge's
      adding to it when necessary. This allows channels with different sized
      topologies to map correctly to each other according to media type. The bridge
      drops any frame that does not have a matching index into a given write stream.
      
      For now though, bridge_simple will align its two channels according to size or
      first to join. Once both channels join the bridge the one with the most streams
      will indicate to the other channel to update its streams to be the same as that
      of the other. If both channels have the same number of streams then the first
      channel to join is chosen as the stream base.
      
      A topology change source was also added to a channel when a stream toplogy
      change request is made. This allows subsystems to know whether or not they
      initiated a change request. Thus avoiding potential recursive situations.
      
      ASTERISK-26966 #close
      
      Change-Id: I1eb5987921dd80c3cdcf52accc136393ca2d4163
      7b0e3b92
  9. Feb 23, 2017
    • frahaase's avatar
      Binaural synthesis (confbridge): Adds binaural synthesis to bridge_softmix. · 094c26aa
      frahaase authored
      Adds binaural synthesis to bridge_softmix (via convolution using libfftw3).
      Binaural synthesis is conducted at 48kHz.
      For a conference, only one spatial representation is rendered.
      The default rendering is applied for mono-capable channels.
      
      ASTERISK-26292
      
      Change-Id: Iecdb381b6adc17c961049658678f6219adae1ddf
      094c26aa
  10. Feb 13, 2017
    • Sean Bright's avatar
      cli: Fix various CLI documentation and completion issues · 3f943737
      Sean Bright authored
      * app_minivm: Use built-in completion facilities to complete optional
      arguments.
      
      * app_voicemail: Use built-in completion facilities to complete
      optional arguments.
      
      * app_confbridge: Add missing colons after 'Usage' text.
      
      * chan_alsa: Use built-in completion facilities to complete optional
      arguments.
      
      * chan_sip: Use built-in completion facilities to complete optional
      arguments. Add completions for 'load' for 'sip show user', 'sip show
      peer', and 'sip qualify peer.'
      
      * chan_skinny: Correct and extend completions for 'skinny reset' and
      'skinny show line.'
      
      * func_odbc: Correct completions for 'odbc read' and 'odbc write'
      
      * main/astmm: Use built-in completion facilities to complete arguments
      for 'memory' commands.
      
      * main/bridge: Correct completions for 'bridge kick.'
      
      * main/ccss: Use built-in completion facilities to complete arguments
      for 'cc cancel' command.
      
      * main/cli: Add 'all' completion for 'channel request hangup.' Correct
      completions for 'core set debug channel.' Correct completions for 'core
      show calls.'
      
      * main/pbx_app: Remove redundant completions for 'core show
      applications.'
      
      * main/pbx_hangup_handler: Remove unused completions for 'core show
      hanguphandlers all.'
      
      * res_sorcery_memory_cache: Add completion for 'reload' argument of
      'sorcery memory cache stale' and properly implement.
      
      Change-Id: Iee58c7392f6fec34ad9d596109117af87697bbca
      3f943737
  11. Nov 14, 2016
    • Matt Jordan's avatar
      res/ari/resource_bridges: Add the ability to manipulate the video source · a72ef381
      Matt Jordan authored
      In multi-party bridges, Asterisk currently supports two video modes:
       * Follow the talker, in which the speaker with the most energy is shown
         to all participants but the speaker, and the speaker sees the
         previous video source
       * Explicitly set video sources, in which all participants see a locked
         video source
      
      Prior to this patch, ARI had no ability to manipulate the video source.
      This isn't important for two-party bridges, in which Asterisk merely
      relays the video between the participants. However, in a multi-party
      bridge, it can be advantageous to allow an external application to
      manipulate the video source.
      
      This patch provides two new routes to accomplish this:
      (1) setVideoSource: POST /bridges/{bridgeId}/videoSource/{channelId}
          Sets a video source to an explicit channel
      (2) clearVideoSource: DELETE /bridges/{bridgeId}/videoSource
          Removes any explicit video source, and sets the video mode to talk
          detection
      
      ASTERISK-26595 #close
      
      Change-Id: I98e455d5bffc08ea5e8d6b84ccaf063c714e6621
      a72ef381
  12. Nov 04, 2016
    • Matt Jordan's avatar
      main/bridge: Add some verbose logging for video source changes · a70d6dba
      Matt Jordan authored
      It's actually quite useful to see the source of a video stream change.
      This doesn't happen terribly often, even with talk detection - but when
      it does, it's nice to know which channel is now providing your video
      stream.
      
      As a verbose 5 level message, it shouldn't be terribly spammy or costly
      to have, and is 'lower level' then most other verbose messages that the
      bridge system emits.
      
      ASTERISK-26555
      
      Change-Id: Ia1c20ecafa9670171fd38bddcf3beccae47fb15c
      a70d6dba
  13. 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
  14. Aug 15, 2016
  15. May 23, 2016
    • Mark Michelson's avatar
      Bridging: introduce "invisible" bridges. · f6c33771
      Mark Michelson authored
      Invisible bridges function the same as normal bridges, but they have the
      following restrictions:
      
      * They never show up in CLI, AMI, or ARI queries.
      * They do not have Stasis messages published about them.
      
      Invisible bridges' main use is for when use of the bridging system is
      desired, but the bridge should not be known to users of the Asterisk
      system.
      
      ASTERISK-25925
      
      Change-Id: I804a209d3181d7c54e3d61a60eb462e7ce0e3670
      f6c33771
  16. Apr 22, 2016
    • Richard Mudgett's avatar
      Bridge system: Fix memory leaks and double frees on impart failure. · a63656b4
      Richard Mudgett authored
      You cannot reference the passed in features struct after calling
      ast_bridge_impart().  Even if the call fails.
      
      Change-Id: I902b88ba0d5d39520e670fb635078a367268ea21
      a63656b4
    • Richard Mudgett's avatar
      bridge_softmix.c: Fix crash if channel fails to join mixing tech. · 71dfa355
      Richard Mudgett authored
      softmix_bridge_join() failed because of an allocation failure.  To address
      this, the softmix bridge technology now checks if the channel failed to
      join softmix successfully.  In addition, the bridge now begins the process
      of kicking the channel out of the bridge so we don't have channels
      partially in the bridge for very long.
      
      * Fix the test_channel_feature_hooks.c unit tests.  The test channel must
      have a valid codec to join the simple_bridge technology.  This patch makes
      joining a bridge more strict by not allowing partially joined channels to
      remain in the bridge.
      
      Change-Id: I97e2ade6a2bcd1214f24fb839fda948825b61a2b
      71dfa355
  17. Apr 20, 2016
    • Richard Mudgett's avatar
      bridge: Hold off more than one imparting channel at a time. · 1c5248c3
      Richard Mudgett authored
      An earlier patch blocked the ast_bridge_impart() call until the channel
      either entered the target bridge or it failed.  Unfortuantely, if the
      target bridge is stasis and the imprted channel is not a stasis channel,
      stasis bounces the channel out of the bridge to come back into the bridge
      as a proper stasis channel.  When the channel is bounced out, that
      released the block on ast_bridge_impart() to continue.  If the impart was
      a result of a transfer, then it became a race to see if the swap channel
      would get hung up before the imparted channel could come back into the
      stasis bridge.  If the imparted channel won then everything is fine.  If
      the swap channel gets hung up first then the transfer will fail because
      the swap channel is leaving the bridge.
      
      * Allow a chain of ast_bridge_impart()'s to happen before any are
      unblocked to prevent the race condition described above.  When the channel
      finally joins the bridge or completely fails to join the bridge then the
      ast_bridge_impart() instances are unblocked.
      
      ASTERISK-25947
      Reported by: Richard Mudgett
      
      ASTERISK-24649
      Reported by: John Bigelow
      
      ASTERISK-24782
      Reported by: John Bigelow
      
      Change-Id: I8fef369171f295f580024ab4971e95c799d0dde1
      1c5248c3
  18. Mar 03, 2016
    • Kevin Harwell's avatar
      bridge.c: Crash during attended transfer when missing a local channel half · 15c5743a
      Kevin Harwell authored
      It's possible for the transferer channel to get hung up early during the
      attended transfer process. For instance, a phone may send a "bye" immediately
      upon receiving a sip notify that contains a sip frag 100 (I'm looking at you
      Jitsi). When this occurs a race begins between the transferer being hung up
      and completion of the transfer code.
      
      If the channel hangs up too early during a transfer involving stasis bridging
      for instance, then when the created local channel goes to look up its swap
      channel (and associated datastore) it can't find it (since it is no longer in
      the bridge) thus it fails to enter the stasis application. Consequently, the
      created local channel(s) hang up as well. If the timing is just right then the
      bridging code attempts to add the message link with missing local channel(s).
      Hence the crash.
      
      Unfortunately, there is no great way to solve the problem of the unexpected
      "bye". While we can't guarantee we won't receive an early hangup, and in this
      case still fail to enter the stasis application, we can make it so asterisk
      does not crash.
      
      This patch does just that by locking the local channel structure, checking
      that the local channel's peer has not been lost, and then continuing. This
      keeps the local channel's peer from being ripped out from underneath it by
      the local/unreal hangup code while attempting to set the stasis message link.
      
      ASTERISK-25771
      
      Change-Id: Ie6d6061e34c7c95f07116fffac9a09e5d225c880
      15c5743a
  19. Feb 29, 2016
    • Richard Mudgett's avatar
      bridge_channel: Don't settle owed events on an optimization. · 86f7336c
      Richard Mudgett authored
      Local channel optimization could cause DTMF digits to be duplicated.
      Pending DTMF end events would be posted to a bridge when the local channel
      optimizes out and is replaced by the channel further down the chain.  When
      the real digit ends, the channel would get another DTMF end posted to the
      bridge.
      
      A -- LocalA;1/n -- LocalA;2/n -- LocalB;1 -- LocalB;2 -- B
      
      1) LocalA has the /n flag to prevent optimization.
      2) B is sending DTMF to A through the local channel chain.
      3) When LocalB optimizes out it can move B to the position of LocalB;1
      4) Without this patch, when B swaps with LocalB;1 then LocalB;1 would
      settle an owed DTMF end to the bridge toward LocalA;2.
      5) When B finally ends its DTMF it sends the DTMF end down the chain.
      6) Without this patch, A would hear the DTMF digit end when LocalB
      optimizes out and when B ends the original digit.
      
      ASTERISK-25582
      
      Change-Id: I1bbd28b8b399c0fb54985a5747f330a4cd2aa251
      86f7336c
  20. Dec 01, 2015
    • Jonathan Rose's avatar
      Unset BRIDGEPEER when leaving a bridge · b5281b74
      Jonathan Rose authored
      Currently if a channel is transferred out of a bridge, the BRIDGEPEER
      variable (also BRIDGEPVTCALLID) remain set even once the channel is
      out of the bridge. This patch removes these variables when leaving
      the bridge.
      
      ASTERISK-25600 #close
      Reported by: Mark Michelson
      
      Change-Id: I753ead2fffbfc65427ed4e9244c7066610e546da
      b5281b74
  21. Jul 13, 2015
    • Kevin Harwell's avatar
      bridge.c: Fixed race condition during attended transfer · c8555235
      Kevin Harwell authored
      During an attended transfer a thread is started that handles imparting the
      bridge channel. From the start of the thread to when the bridge channel is
      ready exists a gap that can potentially cause problems (for instance, the
      channel being swapped is hung up before the replacement channel enters the
      bridge thus stopping the transfer). This patch adds a condition that waits
      for the impart thread to get to a point of acceptable readiness before
      allowing the initiating thread to continue.
      
      ASTERISK-24782
      Reported by: John Bigelow
      
      Change-Id: I08fe33a2560da924e676df55b181e46fca604577
      c8555235
  22. Jun 23, 2015
    • Kevin Harwell's avatar
      bridge.c: Hangup attended transfer target if bridged · 44c3c392
      Kevin Harwell authored
      After completing an attended transfer the transfer target channel was not being
      hung up after leaving the bridge. Added an explicit softhangup to hangup said
      channel, but only if it was previously bridged.
      
      ASTERISK-24782 #close
      Reported by: John Bigelow
      
      Change-Id: Idde9543d56842369384a5e8c00d72a22bbc39ada
      44c3c392
  23. Apr 16, 2015
    • Kevin Harwell's avatar
      bridge.c: NULL app causes crash during attended transfer · 56a2baa2
      Kevin Harwell authored
      Due to a race condition there was a chance that during an attended transfer the
      channel's application would return NULL. This, of course, would cause a crash
      when attempting to access the memory. This patch retrieves the channel's app
      at an earlier time in processing in hopes that the app name is available.
      However, if it is not then "unknown" is used instead. Since some string value
      is now always present the crash can no longer occur.
      
      ASTERISK-24869 #close
      Reported by: viniciusfontes
      Review: https://gerrit.asterisk.org/#/c/133/
      
      Change-Id: I5134b84c4524906d8148817719d76ffb306488ac
      56a2baa2
  24. 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
  25. Apr 08, 2015
    • Richard Mudgett's avatar
      Bridging: Eliminate the unnecessary make channel compatible with bridge operation. · 09df34d8
      Richard Mudgett authored
      When a channel enters the bridging system it is first made compatible with
      the bridge and then the bridge technology makes the channel compatible
      with the technology.  For all but the DAHDI native and softmix bridge
      technologies the make channel compatible with the bridge step is an
      effective noop because the other technologies allow all audio formats.
      For the DAHDI native bridge technology it doesn't matter because it is not
      an initial bridge technology and chan_dahdi allows only one native format
      per channel.  For the softmix bridge technology, it is a noop at best and
      harmful at worst because the wrong translation path could be setup if the
      channel's native formats allow more than one audio format.
      
      This is an intermediate patch for a series of patches aimed at improving
      translation path choices.
      
      * Removed code dealing with the unnecessary step of making the channel
      compatible with the bridge.
      
      ASTERISK-24841
      Reported by: Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/4600/
      ........
      
      Merged revisions 434424 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      09df34d8
  26. Apr 07, 2015
  27. Mar 26, 2015
  28. Mar 13, 2015
  29. Feb 11, 2015
    • Richard Mudgett's avatar
      HTTP: Stop accepting requests on final system shutdown. · e2d3215b
      Richard Mudgett authored
      There are three CLI commands to stop and restart Asterisk each.
      
      1) core stop/restart now - Hangup all calls and stop or restart Asterisk.
      New channels are prevented while the shutdown request is pending.
      
      2) core stop/restart gracefully - Stop or restart Asterisk when there are
      no calls remaining in the system.  New channels are prevented while the
      shutdown request is pending.
      
      3) core stop/restart when convenient - Stop or restart Asterisk when there
      are no calls in the system.  New calls are not prevented while the
      shutdown request is pending.
      
      ARI has made stopping/restarting Asterisk more problematic.  While a
      shutdown request is pending it is desirable to continue to process ARI
      HTTP requests for current calls.  To handle the current calls while a
      shutdown request is pending, a new committed to shutdown phase is needed
      so ARI applications can deal with the calls until the system is fully
      committed to shutdown.
      
      * Added a new shutdown committed phase so ARI applications can deal with
      calls until the final committed to shutdown phase is reached.
      
      * Made refuse new HTTP requests when the system has reached the final
      system shutdown phase.  Starting anything while the system is actively
      releasing resources and unloading modules is not a good thing.
      
      * Split the bridging framework shutdown to not cleanup the global bridging
      containers when shutting down in a hurry.  This is similar to how other
      modules prevent crashes on rapid system shutdown.
      
      * Moved ast_begin_shutdown(), ast_cancel_shutdown(), and
      ast_shutting_down().  You should not have to include channel.h just to
      access these system functions.
      
      ASTERISK-24752 #close
      Reported by: Matthew Jordan
      
      Review: https://reviewboard.asterisk.org/r/4399/
      ........
      
      Merged revisions 431692 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      e2d3215b
  30. Jan 29, 2015
    • Scott Griepentrog's avatar
      stasis transfer: fix stasis bridge push race part two · 388d691f
      Scott Griepentrog authored
      When swapping a Local channel in place of one already
      in a bridge (to complete a bridge attended transfer),
      the channel that was swapped out can actually be hung
      up before the stasis bridge push callback executes on
      the independant transfer thread.  This results in the
      stasis app loop dropping out and removing the control
      that has the the app name which the local replacement
      channel needs so it can re-enter stasis.
      
      To avoid this race condition a new push_peek callback
      has been added, and called from the ast_bridge_impart
      thread before it launches the independant thread that
      will complete the transfer.  Now the stasis push_peek
      callback can copy the stasis app name before the swap
      channel can hang up.
      
      ASTERISK-24649
      Review: https://reviewboard.asterisk.org/r/4382/
      ........
      
      Merged revisions 431450 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      388d691f
  31. Jan 22, 2015
  32. Jan 12, 2015
  33. 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
  34. Nov 24, 2014
  35. 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
  36. Oct 28, 2014
Loading