app_playback.c: Fix PLAYBACKSTATUS regression.

In Asterisk 11, if a channel was redirected away during Playback(),
the PLAYBACKSTATUS variable would be set to SUCCESS. In Asterisk 12
(specifically commit 7d9871b394) that
behavior was inadvertently changed and the same operation would result
in the PLAYBACKSTATUS variable being set to FAILED. The Asterisk 11
behavior has been restored.

Partial fix for ASTERISK~25661.

Change-Id: I53f54e56b59b61c99403a481b6cb8d88b5a559ff
This commit is contained in:
Sean Bright 2023-01-05 11:41:37 -05:00 committed by George Joseph
parent 91415a83d1
commit cbaba132a7
2 changed files with 9 additions and 2 deletions

View File

@ -507,8 +507,7 @@ static int playback_exec(struct ast_channel *chan, const char *data)
if (!res) {
res = ast_waitstream(chan, "");
ast_stopstream(chan);
}
if (res) {
} else {
if (!ast_check_hangup(chan)) {
ast_log(LOG_WARNING, "Playback failed on %s for %s\n", ast_channel_name(chan), (char *)data);
}

View File

@ -0,0 +1,8 @@
Subject: app_playback
In Asterisk 11, if a channel was redirected away during Playback(),
the PLAYBACKSTATUS variable would be set to SUCCESS. In Asterisk 12
(specifically commit 7d9871b3940fa50e85039aef6a8fb9870a7615b9) that
behavior was inadvertently changed and the same operation would result
in the PLAYBACKSTATUS variable being set to FAILED. The Asterisk 11
behavior has been restored.