Unable to play file from a URL with ARI


I have a voice application written in Java and I’m trying to play a media file from a URL to a channel using ARI and Asterisk 14 (for example: sound:http://www.pacdv.com/sounds/voices/hello-4.wav), but the file is not played to the channel. Is Asterisk 14 support playing a file from a URL? if it is, should I add something to extensions.conf? should I not use “sound:”?

I would love to get some help if anyone knows… Thanks!

1 Like

Having the same issue. I see in the documentation it is supported but can never get the call to work. I don’t see any error messages in the asterisk server when this occurs.

Same for me for now… Thank you for replaying!

Any update on this? Having the same issue.

Not yet… if I will find a way to make it work I will post it here

Hello everyone,

Update on this - there are files that asterisk agrees to play them, it depends on the format of the file and the encoding of it. I succeeded to play the file “https://github.com/pbxware/asterisk-sounds/raw/master/demo-congrats.wav” with the command channels.play and uri scheme “sound:”.
(the full command: getAri().channels().play(getChannelId(), “sound:https://github.com/pbxware/asterisk-sounds/raw/master/demo-congrats.wav”, en, 0, 0, playbackId, new AriCallback() )
More files can be found at: https://github.com/pbxware/asterisk-sounds .

In order to play all types of files it’s a bit complicated and I can’t expend much on this because it’s a part from a company project, but a service outside asterisk is needed that will store the file from the URL in a database and asterisk will be able to communicate with it (I’m using docker composition, so via the composition it’s possible)

Good luck :slight_smile:

1 Like