]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_stasis_playback: Check for chan hangup on play_on_channels
authorAndre Barbosa <andre.emanuel.barbosa@gmail.com>
Tue, 29 Jun 2021 16:07:44 +0000 (17:07 +0100)
committerGeorge Joseph <gjoseph@digium.com>
Tue, 20 Jul 2021 18:18:40 +0000 (13:18 -0500)
commitf4d3f021f953d1e91d5c1c081fe6ba604b084b6d
tree9041f274314e597ed7dbc5e6039831c836dcf672
parentd5bb27a06f9616a12281ceaa20b4a4319197cf14
res_stasis_playback: Check for chan hangup on play_on_channels

Verify `ast_check_hangup` before looping to the next sound file.
If the call is already hangup we just break the cycle.
It also ensures that the PlaybackFinished event is sent if the call was hangup.

This is also use-full when we are playing a big list of file for a channel that is hangup.
Before this patch Asterisk will give a warning for every sound not played and fire a PlaybackStart for every sound file on the list tried to be played.

With the patch we just break the playback cycle when the chan is hangup.

ASTERISK-29501 #close

Change-Id: Ic4e1c01b974c9a1f2d9678c9d6b380bcfc69feb8
res/res_stasis_playback.c