Playback (URI) does't work

Hello everyone,

I got opportunity to use the remote server where the promts could be saved.

I’m using Asterisk 18.16.0 with ARI configured (ARI works fine for the playing local promts)

*CLI> module show like res_http_websocket.so
Module                         Description                              Use Count  Status      Support Level
res_http_websocket.so          HTTP WebSocket Support                   3          Running              core
1 modules loaded

When i set Playback via URI i got follow errors

 '_40000' =>       1. Verbose(0, TEST Incoming ${CALLERID(all)} to ${EXTEN} FROM SBC >> channelID <${CDR(uniqueid)}>  ) [extensions.conf:78]
                    2. Playback(http://xx.xx.xx.x:9192/fm2/a/test) [extensions.conf:79]
                    3. Wait(600)                                  [extensions.conf:80]
[2023-10-02 13:01:37.506] DEBUG[106296][C-00000011]: media_cache.c:204 ast_media_cache_retrieve: Failed to obtain media at 'http://xx.xx.xx.x:9192/fm2/a/test'
[2023-10-02 13:01:37.506] DEBUG[106296][C-00000011]: media_cache.c:204 ast_media_cache_retrieve: Failed to obtain media at 'http://xx.xx.xx.x:9192/fm2/a/test'
> [2023-10-02 13:01:37.506] WARNING[106296][C-00000011]: file.c:824 ast_openstream_full: File http://xx.xx.xx.x:9192/fm2/a/test does not exist in any format
> [2023-10-02 13:01:37.506] WARNING[106296][C-00000011]: file.c:1303 ast_streamfile: Unable to open http://xx.xx.xx.x:9192/fm2/a/test (format (alaw)): No such file or directory
> [2023-10-02 13:01:37.506] WARNING[106296][C-00000011]: app_playback.c:513 playback_exec: Playback failed on PJSIP/PhonerLite-0000001a for http://xx.xx.xx.x:9192/fm2/a/test

I tried to use different format for the promts (alaw, gsm) but the issu was the same.
When i made tcpdump on the Asterisk side i was able to see there hadn’t been any packets from asterisk to the remote server.

As additional test i made Linux/Curl and it was successful. the promts were available for read/copy.

$ curl -O http://xx.xx.xx.x:9192/fm2/a/test.alaw
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  100k  100  100k    0     0   741k      0 --:--:-- --:--:-- --:--:--  742k

i was able to find the same case in the community but there hand’t been the response.
Current state it’s not clear if playing via URI has worked ever. Based on the documentation it’s supposed to work since v14.

For local files you do not specify the extension however when playing from a URL you need to provide the full path to the file. So in place of

Playback(http://xx.xx.xx.x:9192/fm2/a/test)

do

Playback(http://xx.xx.xx.x:9192/fm2/a/test.alaw)

the problem was solved by loading res_http_media_cache.so.

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