开发者

Asterisk : Attempted to play URI but scheme is unsupported

i'm using asterisk 18.

I want to play a song with URL,开发者_如何学C not local file when a call started

but there is an error my code is:

same => n,Playback(http://192.168.2.1:3000/sss.gsm)

and Error says:

res_stasis_playback.c:376 play_on_channel: Attempted to play URI http://192.168.2.1:3000/sss.gsm on channel PJSIP/6001-00000001 but the scheme is unsupported

what is wrong?

am I missing some configuration in the asterisk?

asterisk play local file nicely and I tried the following scheme URLs :

http://192.168.2.1:3000/sss.gsm
url:http://192.168.2.1:3000/sss.gsm
sound:http://192.168.2.1:3000/sss.gsm

and sss.gsm is a copied and renamed file from asterisk songs, located on my local site.


If you are using sss.gsm asterisk is expecting file be gsm format 8khz. I am not sure if your format is supported by that app, you can check more in source code.

In general this interface is really not production and works only for some formats. You still can download file and play it(using FastAGI or ARI).

You can also validate that by using

asterisk -r
core show media cache

as show in documentation https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Project+-+URI+Media+Playback

ps note that current realization DO downloading that file to local filesystem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜