[asterisk-users] Not able to play wav files in asterisk

Tzafrir Cohen tzafrir.cohen at xorcom.com
Mon Dec 26 03:52:25 CST 2011


On Mon, Dec 26, 2011 at 10:48:36AM +0530, shalu dhamija wrote:
> 
> 
> 
> Hello all, 
> 
> 
> 
> I am trying to play .wav file using asterisk 1.8.7.1.  I tried playing the wav files having different properties. 
> 
> The properties of the file can be seen using 'file' command or 'ffmpeg -i <filename>' 
> 
> 
> 
> 1.  Filname: miss_audio.wav 
> 
> 
> 
> [root at localhost en]# file miss_audio.wav 
> 
> miss_audio.wav: RIFF (little-endian) data, WAVE audio, ITU G.711 mu-law, mono 8000 Hz 

Asterisk prefers the payload to be signed-linear rather than mu-law.

> 
> 
> 
> [root at localhost en]# ffmpeg -i miss_audio.wav 
> 
> Stream #0:0: Audio: pcm_mulaw ([7][0][0][0] / 0x0007), 8000 Hz, 1 channels, s16, 64 kb/s 

> 
> 
> 
> I am getting the following warning in this case. 
> 
> 
> 
> [Dec 24 15:08:47] WARNING[26513]: format_wav.c:92 check_header_fmt: Not a wav file 7 

This message is, indeed, misleading.

> [Dec 24 15:08:47] WARNING[26513]: file.c:376 fn_wrapper: Unable to open format wav 

But this one is correct.

I wonder if something along the lines of:

  sox orig.wav new.wav -s

would do.

-- 
               Tzafrir Cohen
icq#16849755              jabber:tzafrir.cohen at xorcom.com
+972-50-7952406           mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com  iax:guest at local.xorcom.com/tzafrir



More information about the asterisk-users mailing list