First of I am new to asterisk so if I am asking a simple question that everyone should know… Well sorry. I am running two Asterisk 14.2.1 machines and am communicating with them via the go ARI proxy. All is going well with that except when I try to record a channel via the ARI command. I am able to send the command and it is received by asterisk but the response I get is that the “specified format is unknown on this system.” I have tried to use curl to send the same command
curl -v -X POST -u username:password ‘10.0.0.196:8088/ari/channels/1513283918.770/record’ -data=’{“name”:“jim.wav”, “format”:“gsm”}’
I have tried wav, gsm, wav49 and they all report the same format is unknown error.
When I check codecs I have all loaded via the asterist cli (core show codecs) the ones I expect I would need showing up in the codec list.
I have also set permissions on /var/spool/asterisk/recordings and /var/spool/asterisk/monitor to wide open. Nothing seems to make a difference.
I expect that there is a configuration somewhere that I am missing to allow the recording to happen or a different place to load the recording codecs. But, I cant seem to find any documentation about that.
Any help in getting past this “specified format is unknown on this system” error would be very helpful.
You will get that error if Asterisk does not have a format module loaded for the specified format. A few things to check:
What is the output of core show file formats? For example, I see:
Format Name Extensions
------ ---- ----------
h263 h263 h263
gsm gsm gsm
...
Your request is actually a bit odd, in that you’re specifying a file extension of .wav in your filename (implying you want it recorded as a WAV file) but specifying a format of gsm. This may be confusing things slightly - even if it works, you’re probably going to end up with a GSM file that has a filename indicating it is a WAV file. Have you tried omitting the .wav from the filename?
Thank you for replying. Sorry the .wav was a copy paste leftover of trying a bunch of different things. For the most part I am not setting the file extension when I try to create the recording.
My output for file formats is the following:
ip-10-0-0-196*CLI> core show file formats
Format Name Extensions