Create Playback in Channel with inline media

I run a Stasis app where we generate some audio data that we want to play to a channel. This Play API seems like the perfect tool, but it seems a bit inconvenient to have to expose dynamically the audio data in an endpoint on my server.

Is there a specific reason why I can’t send the audio bytes in the Play request directly ? What would you advise we do instead ?

The same reason as many things, noone has done anything to do that directly in play. As I posted on another thread, there is external media for streaming in:

Presumably the playback URL only has to be visible to the Asterisk server, not to anybody outside that machine. So it could be something as simple as a “file:///” URL.

Also I have found in other situations (namely the AGI STREAM FILE command) that it does not have to be an actual file, it can be a pipe that is being dynamically fed with the audio. I have an example of this (using Async AGI mode) in my Seaskirt examples repo — see the ami+agi_audio_player_async script.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.