[svn-commits] mmichelson: branch 12 r421792 - /branches/12/res/stasis/control.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Aug 21 16:35:25 CDT 2014
Author: mmichelson
Date: Thu Aug 21 16:35:21 2014
New Revision: 421792
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=421792
Log:
Ensure after-bridge behavior is correct when moving from Stasis to a non-Stasis bridge.
Because of the departable state of channels that enter Stasis bridges, Stasis has to
take responsibility for directing the channel to its intended after-bridge destination
if the channel moves from a Stasis bridge to a non-Stasis bridge. This change ensures
that when such a move occurs, when the channel leaves the bridging system, any after
bridge gotos are honored.
Review: https://reviewboard.asterisk.org/r/3920
Modified:
branches/12/res/stasis/control.c
Modified: branches/12/res/stasis/control.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/stasis/control.c?view=diff&rev=421792&r1=421791&r2=421792
==============================================================================
--- branches/12/res/stasis/control.c (original)
+++ branches/12/res/stasis/control.c Thu Aug 21 16:35:21 2014
@@ -838,6 +838,21 @@
if (stasis_app_send_command_async(control, bridge_channel_depart, bridge_channel)) {
ao2_cleanup(bridge_channel);
}
+ if (stasis_app_channel_is_stasis_end_published(chan)) {
+ /* The channel has had a StasisEnd published on it, but until now had remained in
+ * the bridging system. This means that the channel moved from a Stasis bridge to a
+ * non-Stasis bridge and is now exiting the bridging system. Because of this, the
+ * channel needs to exit the Stasis application and go to wherever the non-Stasis
+ * bridge has directed it to go. If the non-Stasis bridge has not set up an after
+ * bridge destination, then the channel should be hung up.
+ */
+ int hangup_flag;
+
+ hangup_flag = ast_bridge_setup_after_goto(chan) ? AST_SOFTHANGUP_DEV : AST_SOFTHANGUP_ASYNCGOTO;
+ ast_channel_lock(chan);
+ ast_softhangup_nolock(chan, hangup_flag);
+ ast_channel_unlock(chan);
+ }
}
static void bridge_after_cb_failed(enum ast_bridge_after_cb_reason reason,
More information about the svn-commits
mailing list