[asterisk-users] Asterisk cant play sounds from AGI

Steve Edwards asterisk.org at sedwards.com
Fri Jul 11 13:29:58 CDT 2008


On Fri, 11 Jul 2008, Tilghman Lesher wrote:

>>> On Jul 10, 2008, at 7:54 PM, Edwin Quijada wrote:
>>>
>>>> My problem is that i cant hear anything when play the file sound 
>>>> using $AGI->stream_file($filename); I put asterisk in verbose mode 
>>>> but just see that it plays the sound but I cant hear anything.

> Check the format of the file.  In most cases, the file should be 8000Hz, 
> single channel, uncompressed, signed linear, 16-bit samples format. 
> Winamp can play a great many different formats, but Asterisk is limited 
> to the formats for which it has a translator.

If the file is a "wav," it should look something like this:

 	-t2::sedwards:~$ file example.wav
 	example.wav: RIFF (little-endian) data, WAVE audio, Microsoft\
 		PCM, 16 bit, mono 8000 Hz

Also, just in case you trip over this, you pass a file name to Asterisk, 
not a file type -- the bit after the period. Asterisk chooses the "best" 
type from files of the same name based on the codecs available to the 
channel.

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000



More information about the asterisk-users mailing list