[asterisk-commits] mjordan: branch 12 r421695 - in /branches/12: UPGRADE.txt main/app.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Aug 21 10:22:57 CDT 2014
Author: mjordan
Date: Thu Aug 21 10:22:53 2014
New Revision: 421695
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=421695
Log:
ARI: Fix implicit answer when playback is initiated on unanswered channel
When issuing a POST /channels/{channel_id}/play on a channel that is not
yet answered, ARI is supposed to:
* Queue up an AST_CONTROL_PROGRESS on the channel
* Start up the playback of the media
Instead, we sneak an answer on the channel right before starting playing media.
This is due to ARI's usage of control_streamfile. This function implicitly
answers the channel (and doesn't give ARI the option to stop it). The answering
of the channel here is probably unnecessary:
* app_voicemail, by far the biggest consumer of this function, always answers
the channels anyway
* control stream file (in res_agi) and ControlPlayback probably shouldn't be
implicitly answering the channel. Answering should not be tied directly to
playing back media.
As it turns out, the answering of the channel here is pretty old:
356042 twilson if (ast_channel_state(chan) != AST_STATE_UP) {
3087 anthm res = ast_answer(chan);
180259 tilghman }
(As in, ancient?)
Note that others ran into this problem and commented about it on various
mailing lists.
Review: https://reviewboard.asterisk.org/r/3907/
ASTERISK-24229 #close
Reported by: Matt Jordan
Modified:
branches/12/UPGRADE.txt
branches/12/main/app.c
Modified: branches/12/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/branches/12/UPGRADE.txt?view=diff&rev=421695&r1=421694&r2=421695
==============================================================================
--- branches/12/UPGRADE.txt (original)
+++ branches/12/UPGRADE.txt Thu Aug 21 10:22:53 2014
@@ -20,6 +20,14 @@
=== UPGRADE-11.txt -- Upgrade info for 10 to 11
===
===========================================================
+
+From 12.5.0 to 12.6.0:
+
+ControlPlayback:
+ - The ControlPlayback and 'control stream file' AGI command will no longer
+ implicitly answer the channel. If you do not answer the channel prior to
+ using either this application or AGI command, you must send Progress
+ first.
From 12.4.0 to 12.5.0:
Modified: branches/12/main/app.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/app.c?view=diff&rev=421695&r1=421694&r2=421695
==============================================================================
--- branches/12/main/app.c (original)
+++ branches/12/main/app.c Thu Aug 21 10:22:53 2014
@@ -959,9 +959,6 @@
if (restart) {
strcat(breaks, restart);
}
- }
- if (ast_channel_state(chan) != AST_STATE_UP) {
- res = ast_answer(chan);
}
if ((end = strchr(file, ':'))) {
More information about the asterisk-commits
mailing list