[asterisk-users] wav files are not playing asterisk

Nikhil d.nikhil at cem-solutions.net
Tue Mar 1 23:50:57 CST 2011


Hi

   I am using Asterisks as client. By console dial I can make calls. 
When do "dial s" from console it wil play demo files that I can here 
from headphone connected to asterisk running system(Android OS).If I 
play gsm file noise is coming,but asterisk is not playing wav 
files,below is the error I am getting. Where I can see the channels is 
encodes as GSM,and how to change to wav.?


*CLI> dial s
     -- Executing [s at default:1] Wait("ALSA/hw:0,0", "1") in new stack
The 'dial' command is deprecated and will be removed in a future 
release. Please use 'console dial' instead.
*CLI>     -- Executing [s at default:2] Answer("ALSA/hw:0,0", "") in new stack
<< Console call has been answered >>
     -- Executing [s at default:3] Set("ALSA/hw:0,0", "TIMEOUT(digit)=5") 
in new stack
     -- Digit timeout set to 5
     -- Executing [s at default:4] Set("ALSA/hw:0,0", 
"TIMEOUT(response)=10") in new stack
     -- Response timeout set to 10
     -- Executing [s at default:5] BackGround("ALSA/hw:0,0", 
"demo-congrats") in new stack
[Feb 28 22:27:06] WARNING[2736]: file.c:665 ast_openstream_full: File 
demo-congrats does not exist in any format
[Feb 28 22:27:07] WARNING[2736]: file.c:995 ast_streamfile: Unable to 
open demo-congrats (format 0x40 (slin)): No such file or directory
[Feb 28 22:27:07] WARNING[2736]: pbx.c:5830 pbx_builtin_background: 
ast_streamfile failed on ALSA/hw:0,0 for demo-congrats
     -- Executing [s at default:6] BackGround("ALSA/hw:0,0", 
"demo-instruct") in new stack
[Feb 28 22:27:07] WARNING[2736]: format_wav.c:148 check_header: Not in 
mono 2
[Feb 28 22:27:07] WARNING[2736]: file.c:386 fn_wrapper: Unable to open 
format wav
[Feb 28 22:27:07] WARNING[2736]: file.c:995 ast_streamfile: Unable to 
open demo-instruct (format 0x40 (slin)): No such file or directory
[Feb 28 22:27:07] WARNING[2736]: pbx.c:5830 pbx_builtin_background: 
ast_streamfile failed on ALSA/hw:0,0 for demo-instruct
     -- Executing [s at default:7] WaitExten("ALSA/hw:0,0", "") in new stack
     -- Timeout on ALSA/hw:0,0, going to 't'
     -- Executing [t at default:1] Goto("ALSA/hw:0,0", "#|1") in new stack
     -- Goto (default,#,1)
     -- Executing [#@default:1] Playback("ALSA/hw:0,0", "demo-thanks") 
in new stack
     -- <ALSA/hw:0,0> Playing 'demo-thanks' (language 'en')
     -- Executing [#@default:2] Hangup("ALSA/hw:0,0", "") in new stack
   == Spawn extension (default, #, 2) exited non-zero on 'ALSA/hw:0,0'

Thanks
Nikhil

On 03/01/2011 07:55 PM, Steve Edwards wrote:
> On Tue, 1 Mar 2011, Nikhil wrote:
>
>> I try to play a wav file in asterisk ,but its accepting only gsm 
>> files.Do u know where I need to change to make it works.
>
> Asterisk chooses a file encoding based on the channel encoding. If 
> your channel is encoded as GSM, Asterisk will not look for a .wav of 
> the same name if a .gsm is available. If the .gsm is not available, 
> Asterisk will use the .wav with the additional 'overhead' of 
> transcoding the data to GSM.
>
> Without any console log, these are just guesses:
>
> 1) Don't specify the file type in your dialplan. Asterisk chooses a 
> file type for you based on channel encoding and formatting modules 
> loaded. Is format_wav.so loaded?
>
> 2) Your WAV file is not encoded correctly. The 'file' command should 
> show something like 'RIFF (little-endian) data, WAVE audio, Microsoft 
> PCM, 16 bit, mono 8000 Hz'
>
> 3) You have permission issues. From a shell, as the user your instance 
> of Asterisk runs as, can you access the file?
>
> If this doesn't help, please repost including the relevant dialplan 
> context (as displayed by 'dialplan show <relevant-context-name>) and a 
> snippet of the console log of a call playing the WAV file.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110302/c36869ee/attachment.htm>


More information about the asterisk-users mailing list