Recording via ARI

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 ‘’ -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

slin mp3 mp3
gsm wav49 WAV|wav49
adpcm vox vox
siren14 siren14 siren14
siren7 siren7 siren7
g726 g726-16 g726-16
g726 g726-24 g726-24
g726 g726-32 g726-32
g726 g726-40 g726-40
g729 g729 g729
ilbc iLBC ilbc
g723 g723sf g723|g723sf
g719 g719 g719
h263 h263 h263
h264 h264 h264
slin16 wav16 wav16
slin wav wav
g722 g722 g722
ulaw au au
alaw alaw alaw|al|alw
ulaw pcm pcm|ulaw|ul|mu|ulw
gsm gsm gsm
slin192 sln192 sln192
slin96 sln96 sln96
slin48 sln48 sln48
slin44 sln44 sln44
slin32 sln32 sln32
slin24 sln24 sln24
slin16 sln16 sln16
slin12 sln12 sln12
slin sln sln|raw