[Asterisk-code-review] res_stasis_playback: Send PlaybackFinish event only once for errors (asterisk[master])

Joshua Colp asteriskteam at digium.com
Mon Jun 21 08:32:05 CDT 2021


Attention is currently required from: Joshua Colp.
Joshua Colp has uploaded a new patch set (#8) to the change originally created by Andre Barbosa. ( https://gerrit.asterisk.org/c/asterisk/+/15987 )

Change subject: res_stasis_playback: Send PlaybackFinish event only once for errors
......................................................................

res_stasis_playback: Send PlaybackFinish event only once for 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 many events.

This patch adds a 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 send the PlaybackFinish with
the failed state.

ASTERISK-29464 #close

Change-Id: I4c2e5921cc597702513af0d7c6c2c982e1798322
---
A doc/CHANGES-staging/res_stasis_playback.txt
M include/asterisk/stasis_app_playback.h
M res/res_stasis_playback.c
M rest-api/api-docs/playbacks.json
4 files changed, 23 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/87/15987/8
-- 
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: 8
Gerrit-Owner: Andre Barbosa <andre.emanuel.barbosa at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210621/c557cec4/attachment-0001.html>


More information about the asterisk-code-review mailing list