Dear Friends,
I have an IVR set up for a client in Asterisk. Everything was working fine until my client updated his sound files with new ones.
Now, trying to play these files gives the following error. Note that .wav files were palyed successfully earlier for this application
Executing [121@default:1] BackGround(“SIP/8080-0821b1d8”, “29”) in new stack
[Oct 29 23:45:00] WARNING[2834]: format_wav.c:201 check_header: Unknown block - not fact or data
[Oct 29 23:45:00] WARNING[2834]: file.c:316 fn_wrapper: Unable to open format wav
[Oct 29 23:45:00] WARNING[2834]: file.c:814 ast_streamfile: Unable to open 29 (format 0x4 (ulaw)): No such file or directory
[Oct 29 23:45:00] WARNING[2834]: pbx.c:5673 pbx_builtin_background: ast_streamfile failed on SIP/8080-0821b1d8 for 29
It can be seen that asterisk says it cannot find the file specified, but this works fine when I rename an old working file to ‘29.wav’ and place in the sounds folder. And the error appears when I replace it with actual 29.wav. This shows that the file IS there at place but however asterisk has problems reading it or decoding it.
This may be a trivial case, but as a newbie to asterisk, a solution to this is appreciated.
Hi,
Thanks for the reply. @ianplain : the wav files have all the required privileges for sure (read/write/exec – 777)
@David : David, are you sure that the files are corrupt ? because I can play these files successfully in my media player without any problems. And you also mentioned that the ulaw files are missing. Is it possible for me to install these ulaw files? f yes, please let me know how I can get these and install ( format 0x4 (ulaw) if Im not wrong).
What it is actually saying is that there is something in the wav files that it doesn’t understand. That might be because they are corrupt, but might be because they were created with too sophisticated a program.
WAV covers a large number of formats, and only one is really acceptable to Asterisk.
Digium have several file formats. Other suppliers may not have all of them.
hi dufus,
The files were wav earlier, and are wav now. Only the content has changed and not the format. I am sure that these are wav files may be encoded somewhat differently than earlier
Can you try these sox and file commands on one of the files, to try and see what you have actually got. If the format is recognizable, sox may also be able to do the conversion:
It’s in the right basic format, but it looks like Asterisk doesn’t understand:
You may be able to convert it, using sox, directly. However, if it proves too clever and copies the PAD chunk, you will need to convert to raw sound samples, at the same rate, etc., then convert back to .WAV.
I’m afraid you are going to have to find out how to use SOX yourself, as I don’t use it often enough to know what to do without careful reading of the documentation.
Thankyou David for your guidance.
I shall check if sox can convert this to our desirable format.
Help from somebody who has run into similar problem and fixed it, or anyone who have an idea of how sox commands work would be highly appreciated.