[svn-commits] jrose: trunk r421424 - in /trunk: ./ res/res_stasis.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Aug 19 11:36:35 CDT 2014
Author: jrose
Date: Tue Aug 19 11:36:30 2014
New Revision: 421424
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=421424
Log:
ARI: Fix a bug where /channels/{channelID}/continue doesn't execute PBX
If /channels/{channelID}/continue is called on a channel that was originated
without a PBX (such as the ARI command POST channel with a stasis application
argument), the channel will not start dialplan execution. This patch will now
run the PBX out of the stasis execution if the channel doesn't currently have
an active PBX upon continuing.
ASTERISK-24043 #close
Reported by: Krandon Bruse
Review: https://reviewboard.asterisk.org/r/3917/
Patches:
stasis-continue.diff submitted by Krandon Bruse (license 6631)
........
Merged revisions 421416 from http://svn.asterisk.org/svn/asterisk/branches/12
........
Merged revisions 421423 from http://svn.asterisk.org/svn/asterisk/branches/13
Modified:
trunk/ (props changed)
trunk/res/res_stasis.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-13-merged' - no diff available.
Modified: trunk/res/res_stasis.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_stasis.c?view=diff&rev=421424&r1=421423&r2=421424
==============================================================================
--- trunk/res/res_stasis.c (original)
+++ trunk/res/res_stasis.c Tue Aug 19 11:36:30 2014
@@ -1327,6 +1327,22 @@
*/
cleanup();
+ /* The control needs to be removed from the controls container in
+ * case a new PBX is started and ends up coming back into Stasis.
+ */
+ ao2_cleanup(app);
+ app = NULL;
+ control_unlink(control);
+ control = NULL;
+
+ if (!ast_check_hangup_locked(chan) && !ast_channel_pbx(chan)) {
+ struct ast_pbx_args pbx_args = {
+ .no_hangup_chan = 1,
+ };
+
+ res = ast_pbx_run_args(chan, &pbx_args);
+ }
+
return res;
}
More information about the svn-commits
mailing list