<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi<br>
<br>
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.?<br>
<br>
<br>
*<font color="#ff6666">CLI> dial s<br>
-- Executing [s@default:1] Wait("ALSA/hw:0,0", "1") in new
stack<br>
The 'dial' command is deprecated and will be removed in a future
release. Please use 'console dial' instead.<br>
*CLI> -- Executing [s@default:2] Answer("ALSA/hw:0,0", "")
in new stack<br>
<< Console call has been answered >> <br>
-- Executing [s@default:3] Set("ALSA/hw:0,0",
"TIMEOUT(digit)=5") in new stack<br>
-- Digit timeout set to 5<br>
-- Executing [s@default:4] Set("ALSA/hw:0,0",
"TIMEOUT(response)=10") in new stack<br>
-- Response timeout set to 10<br>
-- Executing [s@default:5] BackGround("ALSA/hw:0,0",
"demo-congrats") in new stack<br>
[Feb 28 22:27:06] WARNING[2736]: file.c:665 ast_openstream_full:
File demo-congrats does not exist in any format<br>
[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<br>
[Feb 28 22:27:07] WARNING[2736]: pbx.c:5830
pbx_builtin_background: ast_streamfile failed on ALSA/hw:0,0 for
demo-congrats<br>
-- Executing [s@default:6] BackGround("ALSA/hw:0,0",
"demo-instruct") in new stack<br>
[Feb 28 22:27:07] WARNING[2736]: format_wav.c:148 check_header:
Not in mono 2<br>
[Feb 28 22:27:07] WARNING[2736]: file.c:386 fn_wrapper: <font
color="#ff0000">Unable to open format wav</font><br>
[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<br>
[Feb 28 22:27:07] WARNING[2736]: pbx.c:5830
pbx_builtin_background: ast_streamfile failed on ALSA/hw:0,0 for
demo-instruct<br>
-- Executing [s@default:7] WaitExten("ALSA/hw:0,0", "") in new
stack<br>
-- Timeout on ALSA/hw:0,0, going to 't'<br>
-- Executing [t@default:1] Goto("ALSA/hw:0,0", "#|1") in new
stack<br>
-- Goto (default,#,1)<br>
-- Executing [#@default:1] Playback("ALSA/hw:0,0",
"demo-thanks") in new stack<br>
-- <ALSA/hw:0,0> Playing 'demo-thanks' (language 'en')<br>
-- Executing [#@default:2] Hangup("ALSA/hw:0,0", "") in new
stack<br>
== Spawn extension (default, #, 2) exited non-zero on
'ALSA/hw:0,0'</font><br>
<br>
Thanks<br>
Nikhil<br>
<br>
On 03/01/2011 07:55 PM, Steve Edwards wrote:
<blockquote
cite="mid:alpine.DEB.2.00.1103010613120.23347@localhost.localdomain"
type="cite">On Tue, 1 Mar 2011, Nikhil wrote:
<br>
<br>
<blockquote type="cite">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.
<br>
</blockquote>
<br>
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.
<br>
<br>
Without any console log, these are just guesses:
<br>
<br>
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?
<br>
<br>
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'
<br>
<br>
3) You have permission issues. From a shell, as the user your
instance of Asterisk runs as, can you access the file?
<br>
<br>
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.
<br>
<br>
</blockquote>
<br>
</body>
</html>