[asterisk-users] play alaw file with .wav extension

Danny Nicholas danny at debsinc.com
Wed Jul 21 09:35:09 CDT 2010


Asterisk won't be "happy" trying to play foobar.wav if it is actually a
.alaw file.   Since you can't rename the existing files, there's no law that
says you can't copy them and play them correctly.    Assuming that your
calls are using the alaw codec, this snippet would do the trick

 

Exten => 1234,1,answer

Exten => 1234,n,System(/bin/cp foobar.wav /tmp/foobar.alaw)

Exten => 1234,n,playback(/tmp/foobar)

Exten => 1234,n,System(/bin/rm /tmp/foobar.alaw)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100721/6836a83d/attachment.htm 


More information about the asterisk-users mailing list