Converted w/SOX, can't get Asterisk to play (usually works!)

Hi, all!

I’ve had some WAV files that I’ve converted with SOX using the command:

This has worked great for a whole set of files. I’ve now come upon a WAV that Asterisk refuses to play even though I’ve used the same SOX conversion.

When I run this command:

SOX shows me info about the file:

/opt/srutils/sox/bin/sox: SoX v14.3.1
/opt/srutils/sox/bin/sox INFO formats: detected file format type `wav'

Input File     : 'custom_greeting.wav'
Channels       : 1
Sample Rate    : 8000
Precision      : 14-bit
Duration       : 00:00:03.27 = 26160 samples ~ 245.25 CDDA sectors
File Size      : 26.2k
Bit Rate       : 64.1k
Sample Encoding: 8-bit u-law
Endian Type    : little
Reverse Nibbles: no
Reverse Bits   : no

Isn’t this format correct for Asterisk to play? What am I missing?

That says it’s not a wav file, but instead it’s a G.711 ulaw file.

Strictly speaking it says it is a wav file with a mu-law payload. WAV is a wrapper format, and Asterisk needs 16 bit signed mono.

I see what you’re saying. I thought a WAV was a WAV. :smile:

On a hunch, I loaded it with Audacity and exported it. It came out a 16-bit Signed Integer PCM which, running the SOX commands above, played perfectly.

Thanks!