Pranav
Pranav

Reputation: 881

How to add IVR audio file in dialpans in Asterisk

I am novice asterisk player who is trying to add IVR audio file in the asterisk Dialplan.I tried to add already present audio file named marryme in the dialplan but its giving error as

File marryme does not exist in any format

Anyways ,i have to use my custom ivr audio file but i dont know how to add this.Here is my dialplans..

exten => 2001,1,Answer()
exten => 2001,2,Background(marryme)
exten => 2001,3,Hangup()

exten => 1,1,Playback(thank-you-cooperation)
exten => 1,2,Hangup()

exten => 2,1,Playback(sorry)
exten => 2,2,Hangup()

Do i need to add full directory path as /src/usr/ivraudiofilename.wav in Background(/src/usr/ivraudiofilename.wav) or something else. Please help me . Thanks in advance.

Upvotes: 0

Views: 3191

Answers (1)

arheops
arheops

Reputation: 15259

You have put file marryme.wav in /var/lib/asterisk/sounds/ directory

File have be wav PCM uncompressed 8khz 16 bit MONO

If file any other wav variant, including stereo, it will not be played.

For more info see http://www.voip-info.org/wiki/view/Asterisk+sound+files

Upvotes: 2

Related Questions