[Home]

Summary:ASTERISK-29464: ARI - PlaybackFinish skip error events
Reporter:Andre Barbosa (barbix)Labels:patch
Date Opened:2021-06-04 05:18:48Date Closed:2021-06-24 08:54:22
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_stasis_playback
Versions:18.4.0 Frequency of
Occurrence
Related
Issues:
is duplicated byASTERISK-29463 ARI - PlaybackFinish Error status and events
Environment:Attachments:( 0) playback_finish_error_state.diff
Description:This one is related with ASTERISK-29463

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_ERROR state (ASTERISK-29463 please) 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.


Comments:By: Asterisk Team (asteriskteam) 2021-06-04 05:18:49.122-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Andre Barbosa (barbix) 2021-06-04 05:21:03.008-0500

This patch contains the same code of: ASTERISK-29463,  plus the check to only send the PlaybackFinish event on the last sound to be played.


By: Andre Barbosa (barbix) 2021-06-04 06:16:48.522-0500

Gerrit PR:

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

By: Friendly Automation (friendly-automation) 2021-06-24 08:54:23.242-0500

Change 16118 merged by Friendly Automation:
res_stasis_playback: Send PlaybackFinish event only once for errors

[https://gerrit.asterisk.org/c/asterisk/+/16118|https://gerrit.asterisk.org/c/asterisk/+/16118]

By: Friendly Automation (friendly-automation) 2021-06-24 08:56:10.082-0500

Change 16117 merged by Friendly Automation:
res_stasis_playback: Send PlaybackFinish event only once for errors

[https://gerrit.asterisk.org/c/asterisk/+/16117|https://gerrit.asterisk.org/c/asterisk/+/16117]

By: Friendly Automation (friendly-automation) 2021-06-24 10:43:23.549-0500

Change 15987 merged by George Joseph:
res_stasis_playback: Send PlaybackFinish event only once for errors

[https://gerrit.asterisk.org/c/asterisk/+/15987|https://gerrit.asterisk.org/c/asterisk/+/15987]