]> 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)
committerAndre Barbosa <andre.emanuel.barbosa@gmail.com>
Tue, 20 Jul 2021 07:59:47 +0000 (02:59 -0500)
commit2c3defc6c62eaee833b5986d9d11d98e4ab2468e
treeeba354168857916b06e9908c8e418fcc909cbbd8
parent30feaadabf866c5712b223153cba9a1abec5fe75
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