asterisk/bridges
Mark Michelson d44aefeef4 Fix stuck channel in ARI through the introduction of synchronous bridge actions.
Playing back a file to a channel in an ARI bridge would attempt to wait until
the playback concluded before returning. The method used involved signaling the
waiting thread in the ARI custom playback function.

The problem with this is that there were some corner cases that were not accounted for:
* If a bridge channel could not be found, then we never would attempt the playback but
  would still attempt to wait for the playback to complete.
* If the bridge playfile action failed to queue, we would still attempt to wait for the
  playback to complete.
* If the bridge playfile action were queued but some circumstance caused the playback
  not to occur (the bridge dies, the channel is removed from the bridge), then we would
  never be notified.

The solution to this is to move the waiting logic into the bridge code. A new bridge
API function is added to queue a synchronous action on a bridge. The waiting thread
is notified when the queued frame has been freed, either due to an error occurring
or due to successful playback. As a failsafe, the waiting thread has a 10 minute
timeout just in case there is a frame leak somewhere.

Review: https://reviewboard.asterisk.org/r/3338
........

Merged revisions 410673 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-17 17:22:12 +00:00
..
Makefile Title update 2012-10-14 21:56:13 +00:00
bridge_builtin_features.c Bridge API: Set a cause code on a channel when it is ejected from a bridge. 2013-08-22 21:09:52 +00:00
bridge_builtin_interval_features.c Handle DTMF and hold wrapup when a channel leaves the bridging system. 2013-08-23 18:33:36 +00:00
bridge_holding.c Cache string values of formats on ast_format_cap() to save processing. 2013-10-03 14:58:16 +00:00
bridge_native_rtp.c bridge_native_rtp: Fix crash involving masquerade 2014-03-05 19:28:31 +00:00
bridge_simple.c Cache string values of formats on ast_format_cap() to save processing. 2013-10-03 14:58:16 +00:00
bridge_softmix.c Fix stuck channel in ARI through the introduction of synchronous bridge actions. 2014-03-17 17:22:12 +00:00