[asterisk-users] ControlPlayBack

Dovid Bender dovid at telecurve.com
Wed Jun 30 07:55:24 CDT 2021


Hi,

I am trying to use ControlPlayBack but pass along some values in the GET
request. For instance if I try
ControlPlayBack(http://localhost/test.gsm?foo=bar)
I get an error in Asterisk
[2021-06-30 08:46:43] WARNING[9661][C-000c8eaa]: file.c:779
ast_openstream_full: File http://localhost/test.gsm?foo=bar does not exist
in any format
[2021-06-30 08:46:43] WARNING[9661][C-000c8eaa]: file.c:1252
ast_streamfile: Unable to open http://localhost/test.gsm?foo=bar (format
(ulaw)): No such file or directory

The error of the file not existing in the correct format tells me that
Asterisk was able to get the file however it could not play it, since it
didn't know the format. Looking in the /tmp/ dir I see a file called
"bucket-rjS8GT.gsm?foo=bar". I assume Asterisk looks to play it but can't
since it can't figure out the format since it thinks the file ends in
?foo=bar which is not a valid sound file. Is this a bug in asterisk's
implementation of curl so it saves all files only up till the ? or will
that break things for others? For now my dirty hack is to add to the url
&somevar=somefile.gsm so the request looks like this:
ControlPlayBack(http://localhost/test.gsm?foo=bar&somevar=whocares.gsm)
which saves the file as bucket-2S6Bpl.gsm and that fixes it for me. It's an
ugly hack that I don't like but it works.

Any thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20210630/ba964f65/attachment.html>


More information about the asterisk-users mailing list