[asterisk-users] how to load our own .wav sound files in the dial plans for playback
Steve Edwards
asterisk.org at sedwards.com
Sat Sep 8 12:28:51 CDT 2012
On Sat, 8 Sep 2012, upendra wrote:
> i am trying to add my own sound file in the asterisk dial plan extension
> for playback option , i dont no where to put the file and how to give
> the path in extension file and all so is need that the sound file should
> be convert in asterisk as .wav file???
A command similar to:
sox\
"${INPUT}"\
--bits 16\
--channels 1\
--encoding signed-integer\
--rate 8k\
"${OUTPUT}"
will convert the file to a format Asterisk will be happy with.
When you specify a file to be played, for example, using 'playback()', you
specify the file's path. If you don't specify an absolute path, the path
is relative to the directory set in asterisk.conf.
One last 'oops' I still do is forgetting that Asterisk likes to choose the
'file type' (even if you only have .wav) so don't specify it.
So, for example, if you had a file named 'my-first-wave-file.wav' in a
sub-directory of Asterisk's 'sounds' directory named 'upendra' you could
play the file with either:
playback(upendra/my-first-wave-file)
playback(/var/lib/asterisk/sounds/upendra/my-first-wave-file)
www.voip-info.org is an excellent (if somewhat dated) resource for
Asterisk questions. I'm sure asterisk.org and ATFOT.pdf are also
excellent resources. I started with voip-info.org, so it's my 'go to'
resource.
--
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