How To Load Our Own .wav Sound Files In The Dial Plans For Playback

Home » Asterisk Users » How To Load Our Own .wav Sound Files In The Dial Plans For Playback
Asterisk Users 2 Comments

Hi,

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???

regards Upendra

2 thoughts on - How To Load Our Own .wav Sound Files In The Dial Plans For Playback

  • 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)

    http://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.

  • Hi Steve ,

    Thanks for the info . I will gothrough the resources and do the required testing.

    Regrads Upendra.