summaryrefslogtreecommitdiff
path: root/main/app.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2014-08-21 15:24:09 +0000
committerMatthew Jordan <mjordan@digium.com>2014-08-21 15:24:09 +0000
commitaa1dd38e5465f2c99bc6fbf86147af9c027a9447 (patch)
tree0c639a721f00a2453f38287aae78102080187a16 /main/app.c
parentbc0536e0091f1a14603c395efed060a82e0f17c2 (diff)
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 ........ Merged revisions 421695 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@421696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/app.c')
-rw-r--r--main/app.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/main/app.c b/main/app.c
index 89f5f77c1..82237479c 100644
--- a/main/app.c
+++ b/main/app.c
@@ -1046,9 +1046,6 @@ static int control_streamfile(struct ast_channel *chan,
strcat(breaks, restart);
}
}
- if (ast_channel_state(chan) != AST_STATE_UP) {
- res = ast_answer(chan);
- }
if ((end = strchr(file, ':'))) {
if (!strcasecmp(end, ":end")) {