[asterisk-app-dev] Playback Media - Multiple Sound Files
Joshua Colp
jcolp at digium.com
Thu Jun 19 16:53:17 CDT 2014
Samuel Galarneau wrote:
>
> Hi again...
>
> I need to play back multiple sound files w/ a single call
> (channels/{channelId}/play) and using my client code and swaggerUI -
> I get back a 201 but the multiple files do not play - nothing plays.
> The format I use is:
>
> sound:the-party-you-are-calling,sound:is-curntly-unavail
>
> Thanks.
>
>
> As far as I am aware, the play operation on the channels resource only
> supports one media item. To accomplish what you are wanting to do you
> would have to play the first sound, and then send another request to
> play the second sound once you receive the PlaybackFinished event from
> the first playback operation.
Actually if you are constructing a string of prompts like the above to
make a coherent sentence you can actually just call play multiple times
in order with each sound at the beginning. Internally it's implemented
as a queue so as each one ends the next one starts until none are left.
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-app-dev
mailing list