[Asterisk-code-review] res_stasis_playback: Send PlaybackFinish event only once for a list o... (asterisk[master])

Andre Barbosa asteriskteam at digium.com
Mon Jun 14 05:18:53 CDT 2021


Attention is currently required from: Andre Barbosa.
Hello Joshua Colp, Friendly Automation, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/c/asterisk/+/15987

to look at the new patch set (#5).

Change subject: res_stasis_playback: Send PlaybackFinish event only once for a list of sounds, when we have errors
......................................................................

res_stasis_playback: Send PlaybackFinish event only once for a list of sounds,
when we have errors

When we try to play a list of sound files in the same Play command, we get only
one PlaybackFinish event, after all sounds are played.

But in the case where the Play fails (because channel is destroyed for example),
Asterisk will send one PlaybackFinish event for each sound file still to be
played. If the list is big, Asterisk is sending lot of events.

This patch adds STASIS_PLAYBACK_STATE_FAILED state so we can understand that the
play failed. On that case we don't send the event, if we still have a list of
sounds to be played.

When we reach the last sound, we fired the PlaybackFinish with the error state.

ASTERISK-29464 #close

Change-Id: I4c2e5921cc597702513af0d7c6c2c982e1798322
---
M include/asterisk/stasis_app_playback.h
M res/res_stasis_playback.c
M rest-api/api-docs/playbacks.json
3 files changed, 14 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/87/15987/5
-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15987
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I4c2e5921cc597702513af0d7c6c2c982e1798322
Gerrit-Change-Number: 15987
Gerrit-PatchSet: 5
Gerrit-Owner: Andre Barbosa <andre.emanuel.barbosa at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Andre Barbosa <andre.emanuel.barbosa at gmail.com>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210614/31d6aa55/attachment.html>


More information about the asterisk-code-review mailing list