[ARI] How to stop the playback that running a list of audio files

Hello Folk,

I am running the playback via Asterisk’s ARI to play the list of audio prompts like below:

“sound:asterisk-friend,sound:asterisk-friend,sound:asterisk-friend”

When the DTMF received, I would like to stop the playing (by using DELETE method). Unfortunately, the playback just stops only the current playing file, not all of them.

Is there any method to stop the entire of the list.

Cheers,
Tanakom.

What version of Asterisk are you using, what events are you receiving, and what operations are you performing?

Hello jcolp,

My implementing operation is a dynamic menu by using ARI in Asterisk 14.0.0-beta2.

By creating a dynamic menu, I have to concatenate multiple audio files into the playback. For example,

Please select… “Sale” “Press one” “Technical” “Press two” … “Support” “Press nine”

When the DTMF received, I would like to stop the playing (by using DELETE method). Unfortunately, the playback just stops only the current playing file, not all of them.

Here is the CLI log:

[Sep 29 10:39:25] NOTICE[3423][C-000032e3]: res_stasis_playback.c:274 playback_final_update: 1475120325.181: Playback stopped for sound:asterisk-friend
[Sep 29 10:39:25] NOTICE[3423][C-000032e3]: res_stasis_playback.c:274 playback_final_update: 1475120325.181: Playback stopped for sound:asterisk-friend
[Sep 29 10:39:25] NOTICE[3423][C-000032e3]: res_stasis_playback.c:274 playback_final_update: 1475120325.181: Playback stopped for sound:asterisk-friend

I have to stop the playback for 3 times to completely stop the audio.

Thanks!
Tanakom.

That version of Asterisk contained a bug where DELETE did not stop the entire playlist. This was fixed in later versions, and is fixed in the actual Asterisk 14 release.

Hey buddy You can Control the PlayBack with this article :
https://wiki.asterisk.org/wiki/display/AST/ARI+and+Media%3A+Part+2+-+Playbacks

1 Like