IVRLuke

Recording prompts


For your IVR configuration you will need first to record some sound messages.
You can record your own sound files using the Asterisk. For this purpose you should add an extension for the recording in the extensions.conf file. In our example, you can dial the extension 100, after the beep you can start recording your message.
To end the recording press "#". The message is recorded in .gsm format and is called recording.gsm in the /var/lib/asterisk/sounds directory. Asterisk plays back the message after you pressed "#"(after 2 seconds).


exten => 100,1,Wait(2)
exten => 100,n,Record(/var/lib/asterisk/sounds/recording:gsm)
exten => 100,n,NoOp(${RECORDED_FILE})
exten => 100,n,Wait(2)
exten => 100,n,Playback(/var/lib/asterisk/sounds/recording)
exten => 100,n,NoOp(${PLAYBACKSTATUS})
exten => 100,n,Wait(1)
exten => 100,n,Hangup()




Here we are using Wait(), Record(), Playback() and Hangup() applications. You can see their descriptions by typing "core show application <application>" in Asterisk 1.4, or use "show application <application> (this will be removed in future).

Let's make more clearness:
Wait(2) - waits 2 seconds, then the dialplan continues to the next priority. The 2 seconds are to be sure that the channel is up and ready for recording.

Record(file:gsm) - records from the channel into a file with format gsm. This application sets a channel variable named RECORDED_FILE, which contains the name of recorded filename.
You can use NoOp() application to see what contains the RECORDED_FILE variable.

exten => s,n,NoOp(${RECORDED_FILE})

Playback() application - plays the recording file. This application sets the following channel variable - PLAYBACKSTATUS. The result is SUCCESS or FAILED.

Hangup() application - hang up the calling channel.



Implementing a IVR using menu structure


The following is an example for an IVR system. You dial any number in the range [1-9] and you enter the IVR system. First there is checking if it is business hours and if you are, you will be send in the ivr-lang context, after that you will get the greeting message and during the message you can press a key from one to three to choose your language. According the number you pressed, you will be directed to the right extension (context).


[incoming]

exten => _0[1-9].,1,GotoIfTime(9:00-18:00|mon-fri|*|*?ivr-lang,s,1)
exten => _0[1-9].,n,GotoIfTime(10:00-17:00|sat|*|*?ivr-lang,s,1)
exten => _0[1-9].,n,Playback(closed)
exten => _0[1-9].,n,Playback(closed)
exten => _0[1-9].,n,Hangup()

[ivr-lang]

exten => s,1,Set(TIMEOUT(digit)=10)
exten => s,n,Set(TIMEOUT(response)=10)
exten => s,n,Background(PressOne_EN)
exten => s,n,Background(PressTwo_FR)
exten => s,n,Background(PressThree_DE)

exten => 1,1,Goto(ivr-en,en,1)
exten => 2,1,Goto(ivr-fr,fr,1)
exten => 3,1,Goto(ivr-de,de,1)

exten => i,1,Playback(TimeOut_EN)
exten => i,2,Playback(TimeOut_FR)
exten => i,3,Playback(TimeOut_DE)

[ivr-en]

exten => en,1,Set(TIMEOUT(digit)=10)
exten => en,n,Set(TIMEOUT(response)=10)
exten => en,n,Wait(1)
exten => en,n,Background(Menu01_EN)
exten => en,n,Background(Menu02_EN)
exten => en,n,Background(Menu03_EN_lang)

exten => 1,1,Playback(MenuSelected_EN)
exten => 1,n,Macro(recording)
exten => 1,n,Goto(queue,mobile-en,1)

exten => 2,1,Playback(MenuSelected_EN)
exten => 2,n,Macro(recording)
exten => 2,n,Goto(queue,voip-en,1)

exten => 3,1,Goto(ivr-lang,s,1)

exten => t,1,Playback(TimeOut_EN)
exten => t,2,Goto(en,1)

exten => i,1,Playback(TimeOut_EN)
exten => i,2,Goto(en,1)

[ivr-fr]

exten => fr,1,Set(TIMEOUT(digit)=10)
exten => fr,n,Set(TIMEOUT(response)=10)
exten => fr,n,Wait(1)
exten => fr,n,Background(Menu01_FR)
exten => fr,n,Background(Menu02_FR)
exten => fr,n,Background(Menu03_FR_lang)

exten => 1,1,Playback(MenuSelected_FR)
exten => 1,n,Macro(recording)
exten => 1,n,Goto(queue,mobile-fr,1)

exten => 2,1,Playback(MenuSelected_FR)
exten => 2,n,Macro(recording)
exten => 2,n,Goto(queue,voip-fr,1)

exten => 3,1,Goto(ivr-lang,s,1)

exten => t,1,Playback(TimeOut_FR)
exten => t,2,Goto(en,1)

exten => i,1,Playback(TimeOut_FR)
exten => i,2,Goto(fr,1)

[ivr-de]

exten => de,1,Set(TIMEOUT(digit)=10)
exten => de,n,Set(TIMEOUT(response)=10)
exten => de,n,Wait(1)
exten => de,n,Background(Menu01_DE)
exten => de,n,Background(Menu02_DE)
exten => de,n,Background(Menu03_DE_lang)

exten => 1,1,Playback(MenuSelected_DE)
exten => 1,n,Macro(recording)
exten => 1,n,Goto(queue,mobile-de,1)

exten => 2,1,Playback(MenuSelected_DE)
exten => 2,n,Macro(recording)
exten => 2,n,Goto(queue,voip-de,1)

exten => 3,1,Goto(ivr-lang,s,1)

exten => t,1,Playback(TimeOut_DE)
exten => t,2,Goto(de,1)

exten => i,1,Playback(TimeOut_DE)
exten => i,2,Goto(de,1)

[queue]

exten => mobile-en,1,Set(CALLERID(name)=mobile-en)
exten => mobile-en,n,Queue(mobile-en||||90)
exten => mobile-en,n,Hangup()

exten => mobile-fr,1,Set(CALLERID(name)=mobile-fr)
exten => mobile-fr,n,Queue(mobile-fr||||90)
exten => mobile-fr,n,Hangup()

exten => mobile-de,1,Set(CALLERID(name)=mobile-de)
exten => mobile-de,n,Queue(mobile-de||||90)
exten => mobile-de,n,Hangup()

exten => voip-en,1,Set(CALLERID(name)=voip-en)
exten => voip-en,n,Queue(voip-en||||90)
exten => voip-en,n,Hangup()

exten => voip-fr,1,Set(CALLERID(name)=voip-fr)
exten => voip-fr,n,Queue(voip-fr||||90)
exten => voip-fr,n,Hangup()

exten => voip-de,1,Set(CALLERID(name)=voip-de)
exten => voip-de,n,Queue(voip-de||||90)
exten => voip-de,n,Hangup()

[macro-recording]

exten => s,1,AGI(set-timestamp.agi)
exten => s,n,Set(CALLFILENAME=${timestamp}_${EXTEN})
exten => s,n,MixMonitor(/var/spool/asterisk/recordings/${TIMESTA
MP}-${EXTEN}-in.gsm)

 

In our case set-timestamp.agi is:


#!/bin/sh
ltime=`date +%Y%m%d_%H%M%S`
echo SET VARIABLE timestamp $ltime

 

Another simple IVR system can be:


[incoming]

exten => _XX.,1,Answer()
exten => _XX.,n,Wait(2)
exten => _XX.,n,Background(choice_1)
exten => _XX.,n,Background(choice_2)

exten => 1,1,Goto(friend-1,s,1)
exten => 2,1,Goto(friend-2,s,1)

exten => i,1,Playback(TimeOut_EN)

[friend-1]

exten => s,1,ChanIsAvail(ZAP/1)
exten => s,2,NoOp(${AVAILCHAN})
exten => s,3,Dial(ZAP/1/234234234)
exten => s,4,Hangup()
exten => s,102,Playback(unavail)
exten => s,103,Hangup()

[friend-2]

exten => s,1,ChanIsAvail(SIP/choice2)
exten => s,2,NoOp(${AVAILCHAN})
exten => s,3,Dial(SIP/choice2)
exten => s,4,Hangup()
exten => s,102,Dial(SIP/mainchief)
exten => s,103,Hangup()


Explanation:

ChanIsAvail() application checks if via ZAP/1 can be sent a call, if it can be, it dials "234234234" through ZAP/1. If the Zap channel is not available, it play backs unavailable audio message. The same situation is with the [friend-2] context. With this difference that it checks if the SIP/choice2 peer is known and registered, if it is not it dials the mainchief.




User Comments
max (litnimax at asteriskpbx dot ru)
20 December 2008 15:10:30
Russian IVR prompts are available for free from http://www.pbxware.ru/products/ivr
joel (sandovaljoel at hotmail dot com)
13 November 2008 17:17:09
i have an ivr that search in a database, a client digits your account number but if that number is less than two digits the ivr stay playing 'please digits your acount number' again and again, please help me , im novice on it here is my extension


[bancontext] ;*************************** CONSULTA A BD MULTIVISION************
;
exten => s,1,Set(CHANNEL(language)=es)
exten => s,2,Background(pide-id)
exten => s,3,WaitExten(4)
;
exten => _X.,1,MYSQL(Connect connid 10.10.1.102 root 123 banco)
exten => _X.,2,MYSQL(Query resultid ${connid} SELECT saldo from saldo where cuenta=${EXTEN})
exten => _X.,3,MYSQL(Fetch fetchid ${resultid} AGIScript)
exten => _X.,4,NoOp(Respuesta [${AGIScript}] )
exten => _X.,5,GotoIf($[.${AGIScript}. = ..]?6:8)
exten => _X.,6,Playback(noesta);the account number doesnt exist
exten => _X.,7,Hangup
exten => _X.,8,Playback(su-credito)
exten => _X.,9,SayNumber(${AGIScript})
exten => _X.,10,Playback(pesos)
exten => _X.,11,MYSQL(Clear ${resultid})
exten => _X.,12,MYSQL(Disconnect ${connid})
exten => _X.,13,Hangup
;
exten => i,1,Goto(s,2)
exten => t,1,Goto(s,2)
faheem (faheemahmed007 at gmail dot com)
14 October 2008 21:14:42
hi 
i have a problem when i dial IVR and push button it gives me an error of communicating entry error try again later..please help me out send me the settings.
my settings are:
exten => _2.,1,Answer
exten => _2.,2,Goto,Menu|s|1

[macro-senddtmf]
exten => s,1,SendDTMF(09)
..


Regards:
Faheem ahmed
faheem (faheemahmed007 at gmail dot com)
21 February 2008 19:14:01
hi
i want to know about IVR
faheem (faheemahmed007 at gmail dot com)
21 February 2008 19:13:47
hi
i want to know about IVR
Syed Bilal Masaud (syedbilalmasaud at gmail dot com)
30 October 2007 13:13:32
How to play some highly stereo file in asterisk , because when ever i try to play its sound quality on phone is not good as expected , please suggest some thing to produce crispy sound on IVR, suppose if i want to play a good drum song its sound quality gone bad


eeee (ffff at gmail dot com)
22 October 2007 07:47:52
Good site for IVR systems


SIP


[general]
bindport=5060
srvlookup=yes
qualify=1000
disallow=all
allow=alaw
dtmfmode=rfc2833
language=en
allowguest=yes




[1001]
name=1001
secret=asdf
type=friend
host=dynamic
canreinvite=no
nat=yes
context=contextsip

[1002]
name=1002
secret=asdf
type=friend
host=dynamic
canreinvite=no
nat=yes
context=contextsip




IAX


[general]
bindport=4569
calltokenoptional=0.0.0.0/0.0.0.0
maxcallnumbers=512

qualify=yes
bandwidth=high
lowdisallow=all
allow=alaw
language=cz




[2001]
username=2001
secret=asdf
auth=md5
type=friend
host=dynamic
context=contextiax

[2002]
username=2002
secret=asdf
auth=md5
type=friend
host=dynamic
context=contextiax




EXTENSION


[contextsip]

exten => 1800,1,Answer
exten => 1800,2,Goto(zakladni_nabidka,s,1)


exten =>_0XXXX,1,Macro(JumpIntoContext)

exten =>_100X,1,Macro(CallSIP)

exten => 1991,1,Answer
exten => 1991,2,Wait(2)
exten => 1991,3,Record(luke-test_sound%d:alaw)
exten => 1991,4,Wait(2)
exten => 1991,5,Playback(${RECORDED_FILE})
exten => 1991,6,Wait(2
exten => 1991,7,Hangup

[zakladni_nabidka]
exten => s,1,Set(COUNTER=0)
exten => s,2,Playback(uvitani)
exten => s,3(start),Background(strom-level-1)
exten => s,n,WaitExten(10)
exten => 1,1,Goto(Informace,x,x)
exten => 2,1,Goto(Volba_oddeleni)
exten => 3,1,Dial(Prima)
exten => i,1,Playback(spatnavolba)
exten => i,n,Set(COUNTER=0)
exten => i,n,Wait(2)
exten => i,n,Goto(s,start)
exten => t,1,Set(COUNTER=$[${COUNTER} + 1])
exten => t,2,GotoIf($[ ${COUNTER} >= 2]?operator,s,1)
exten => t,3,Playback(spatnavolba)
exten => t,n,Wait(2)
exten => t,n,Goto(s,start)


[contextiax]



exten =>_0XXXX,1,Macro(JumpIntoContext)

exten =>_200X,1,Macro(CallIAX)


;=======================================================================================

exten =>_0XXXX,1,Macro(JumpIntoContext)

[macro-JumpIntoContext]
exten =>s,1,GotoIf($[${MACRO_EXTEN:1:1}=1]?contextsip,${MACRO_EXTEN:1},1:dva)
exten =>s,n,Hangup()
exten =>s,n(dva),GotoIf($[${MACRO_EXTEN:1:1}=2]?contextiax,${MACRO_EXTEN:1},1:end
exten =>s,n(end),Hangup()
exten =>s,n,MacroExit

[macro-CallSIP]
exten => s,1,Dial(SIP/${MACRO_EXTEN})

exten => s,n,Goto(S-${DIALSTATUS},1)
exten => S-NOANSWER,1,Playback(vm-nobodyavail)
exten => S-CHANUNAVAIL,1,Playback(pbx-invalid)
exten => _.,1,Playback(pbx-invalid)
exten => .,n,HangUp()

exten =>s,n,MacroExit

[macro-CallIAX]
exten =>s,1,Dial(IAX2/${MACRO_EXTEN})
exten =>s,n,MacroExit

Recording prompts


For your IVR configuration you will need first to record some sound messages.
You can record your own sound files using the Asterisk. For this purpose you should add an extension for the recording in the extensions.conf file. In our example, you can dial the extension 100, after the beep you can start recording your message.
To end the recording press "#". The message is recorded in .gsm format and is called recording.gsm in the /var/lib/asterisk/sounds directory. Asterisk plays back the message after you pressed "#"(after 2 seconds).


exten => 100,1,Wait(2)
exten => 100,n,Record(/var/lib/asterisk/sounds/recording:gsm)
exten => 100,n,NoOp(${RECORDED_FILE})
exten => 100,n,Wait(2)
exten => 100,n,Playback(/var/lib/asterisk/sounds/recording)
exten => 100,n,NoOp(${PLAYBACKSTATUS})
exten => 100,n,Wait(1)
exten => 100,n,Hangup()




Here we are using Wait(), Record(), Playback() and Hangup() applications. You can see their descriptions by typing "core show application <application>" in Asterisk 1.4, or use "show application <application> (this will be removed in future).

Let's make more clearness:
Wait(2) - waits 2 seconds, then the dialplan continues to the next priority. The 2 seconds are to be sure that the channel is up and ready for recording.

Record(file:gsm) - records from the channel into a file with format gsm. This application sets a channel variable named RECORDED_FILE, which contains the name of recorded filename.
You can use NoOp() application to see what contains the RECORDED_FILE variable.

exten => s,n,NoOp(${RECORDED_FILE})

Playback() application - plays the recording file. This application sets the following channel variable - PLAYBACKSTATUS. The result is SUCCESS or FAILED.

Hangup() application - hang up the calling channel.



Implementing a IVR using menu structure


The following is an example for an IVR system. You dial any number in the range [1-9] and you enter the IVR system. First there is checking if it is business hours and if you are, you will be send in the ivr-lang context, after that you will get the greeting message and during the message you can press a key from one to three to choose your language. According the number you pressed, you will be directed to the right extension (context).


[incoming]

exten => _0[1-9].,1,GotoIfTime(9:00-18:00|mon-fri|*|*?ivr-lang,s,1)
exten => _0[1-9].,n,GotoIfTime(10:00-17:00|sat|*|*?ivr-lang,s,1)
exten => _0[1-9].,n,Playback(closed)
exten => _0[1-9].,n,Playback(closed)
exten => _0[1-9].,n,Hangup()

[ivr-lang]

exten => s,1,Set(TIMEOUT(digit)=10)
exten => s,n,Set(TIMEOUT(response)=10)
exten => s,n,Background(PressOne_EN)
exten => s,n,Background(PressTwo_FR)
exten => s,n,Background(PressThree_DE)

exten => 1,1,Goto(ivr-en,en,1)
exten => 2,1,Goto(ivr-fr,fr,1)
exten => 3,1,Goto(ivr-de,de,1)

exten => i,1,Playback(TimeOut_EN)
exten => i,2,Playback(TimeOut_FR)
exten => i,3,Playback(TimeOut_DE)

[ivr-en]

exten => en,1,Set(TIMEOUT(digit)=10)
exten => en,n,Set(TIMEOUT(response)=10)
exten => en,n,Wait(1)
exten => en,n,Background(Menu01_EN)
exten => en,n,Background(Menu02_EN)
exten => en,n,Background(Menu03_EN_lang)

exten => 1,1,Playback(MenuSelected_EN)
exten => 1,n,Macro(recording)
exten => 1,n,Goto(queue,mobile-en,1)

exten => 2,1,Playback(MenuSelected_EN)
exten => 2,n,Macro(recording)
exten => 2,n,Goto(queue,voip-en,1)

exten => 3,1,Goto(ivr-lang,s,1)

exten => t,1,Playback(TimeOut_EN)
exten => t,2,Goto(en,1)

exten => i,1,Playback(TimeOut_EN)
exten => i,2,Goto(en,1)

[ivr-fr]

exten => fr,1,Set(TIMEOUT(digit)=10)
exten => fr,n,Set(TIMEOUT(response)=10)
exten => fr,n,Wait(1)
exten => fr,n,Background(Menu01_FR)
exten => fr,n,Background(Menu02_FR)
exten => fr,n,Background(Menu03_FR_lang)

exten => 1,1,Playback(MenuSelected_FR)
exten => 1,n,Macro(recording)
exten => 1,n,Goto(queue,mobile-fr,1)

exten => 2,1,Playback(MenuSelected_FR)
exten => 2,n,Macro(recording)
exten => 2,n,Goto(queue,voip-fr,1)

exten => 3,1,Goto(ivr-lang,s,1)

exten => t,1,Playback(TimeOut_FR)
exten => t,2,Goto(en,1)

exten => i,1,Playback(TimeOut_FR)
exten => i,2,Goto(fr,1)

[ivr-de]

exten => de,1,Set(TIMEOUT(digit)=10)
exten => de,n,Set(TIMEOUT(response)=10)
exten => de,n,Wait(1)
exten => de,n,Background(Menu01_DE)
exten => de,n,Background(Menu02_DE)
exten => de,n,Background(Menu03_DE_lang)

exten => 1,1,Playback(MenuSelected_DE)
exten => 1,n,Macro(recording)
exten => 1,n,Goto(queue,mobile-de,1)

exten => 2,1,Playback(MenuSelected_DE)
exten => 2,n,Macro(recording)
exten => 2,n,Goto(queue,voip-de,1)

exten => 3,1,Goto(ivr-lang,s,1)

exten => t,1,Playback(TimeOut_DE)
exten => t,2,Goto(de,1)

exten => i,1,Playback(TimeOut_DE)
exten => i,2,Goto(de,1)

[queue]

exten => mobile-en,1,Set(CALLERID(name)=mobile-en)
exten => mobile-en,n,Queue(mobile-en||||90)
exten => mobile-en,n,Hangup()

exten => mobile-fr,1,Set(CALLERID(name)=mobile-fr)
exten => mobile-fr,n,Queue(mobile-fr||||90)
exten => mobile-fr,n,Hangup()

exten => mobile-de,1,Set(CALLERID(name)=mobile-de)
exten => mobile-de,n,Queue(mobile-de||||90)
exten => mobile-de,n,Hangup()

exten => voip-en,1,Set(CALLERID(name)=voip-en)
exten => voip-en,n,Queue(voip-en||||90)
exten => voip-en,n,Hangup()

exten => voip-fr,1,Set(CALLERID(name)=voip-fr)
exten => voip-fr,n,Queue(voip-fr||||90)
exten => voip-fr,n,Hangup()

exten => voip-de,1,Set(CALLERID(name)=voip-de)
exten => voip-de,n,Queue(voip-de||||90)
exten => voip-de,n,Hangup()

[macro-recording]

exten => s,1,AGI(set-timestamp.agi)
exten => s,n,Set(CALLFILENAME=${timestamp}_${EXTEN})
exten => s,n,MixMonitor(/var/spool/asterisk/recordings/${TIMESTA
MP}-${EXTEN}-in.gsm)

 

In our case set-timestamp.agi is:


#!/bin/sh
ltime=`date +%Y%m%d_%H%M%S`
echo SET VARIABLE timestamp $ltime

 

Another simple IVR system can be:


[incoming]

exten => _XX.,1,Answer()
exten => _XX.,n,Wait(2)
exten => _XX.,n,Background(choice_1)
exten => _XX.,n,Background(choice_2)

exten => 1,1,Goto(friend-1,s,1)
exten => 2,1,Goto(friend-2,s,1)

exten => i,1,Playback(TimeOut_EN)

[friend-1]

exten => s,1,ChanIsAvail(ZAP/1)
exten => s,2,NoOp(${AVAILCHAN})
exten => s,3,Dial(ZAP/1/234234234)
exten => s,4,Hangup()
exten => s,102,Playback(unavail)
exten => s,103,Hangup()

[friend-2]

exten => s,1,ChanIsAvail(SIP/choice2)
exten => s,2,NoOp(${AVAILCHAN})
exten => s,3,Dial(SIP/choice2)
exten => s,4,Hangup()
exten => s,102,Dial(SIP/mainchief)
exten => s,103,Hangup()


Explanation:

ChanIsAvail() application checks if via ZAP/1 can be sent a call, if it can be, it dials "234234234" through ZAP/1. If the Zap channel is not available, it play backs unavailable audio message. The same situation is with the [friend-2] context. With this difference that it checks if the SIP/choice2 peer is known and registered, if it is not it dials the mainchief.




User Comments
max (litnimax at asteriskpbx dot ru)
20 December 2008 15:10:30
Russian IVR prompts are available for free from http://www.pbxware.ru/products/ivr
joel (sandovaljoel at hotmail dot com)
13 November 2008 17:17:09
i have an ivr that search in a database, a client digits your account number but if that number is less than two digits the ivr stay playing 'please digits your acount number' again and again, please help me , im novice on it here is my extension


[bancontext] ;*************************** CONSULTA A BD MULTIVISION************
;
exten => s,1,Set(CHANNEL(language)=es)
exten => s,2,Background(pide-id)
exten => s,3,WaitExten(4)
;
exten => _X.,1,MYSQL(Connect connid 10.10.1.102 root 123 banco)
exten => _X.,2,MYSQL(Query resultid ${connid} SELECT saldo from saldo where cuenta=${EXTEN})
exten => _X.,3,MYSQL(Fetch fetchid ${resultid} AGIScript)
exten => _X.,4,NoOp(Respuesta [${AGIScript}] )
exten => _X.,5,GotoIf($[.${AGIScript}. = ..]?6:8)
exten => _X.,6,Playback(noesta);the account number doesnt exist
exten => _X.,7,Hangup
exten => _X.,8,Playback(su-credito)
exten => _X.,9,SayNumber(${AGIScript})
exten => _X.,10,Playback(pesos)
exten => _X.,11,MYSQL(Clear ${resultid})
exten => _X.,12,MYSQL(Disconnect ${connid})
exten => _X.,13,Hangup
;
exten => i,1,Goto(s,2)
exten => t,1,Goto(s,2)
faheem (faheemahmed007 at gmail dot com)
14 October 2008 21:14:42
hi 
i have a problem when i dial IVR and push button it gives me an error of communicating entry error try again later..please help me out send me the settings.
my settings are:
exten => _2.,1,Answer
exten => _2.,2,Goto,Menu|s|1

[macro-senddtmf]
exten => s,1,SendDTMF(09)
..


Regards:
Faheem ahmed
faheem (faheemahmed007 at gmail dot com)
21 February 2008 19:14:01
hi
i want to know about IVR
faheem (faheemahmed007 at gmail dot com)
21 February 2008 19:13:47
hi
i want to know about IVR
Syed Bilal Masaud (syedbilalmasaud at gmail dot com)
30 October 2007 13:13:32
How to play some highly stereo file in asterisk , because when ever i try to play its sound quality on phone is not good as expected , please suggest some thing to produce crispy sound on IVR, suppose if i want to play a good drum song its sound quality gone bad


eeee (ffff at gmail dot com)
22 October 2007 07:47:52
Good site for IVR systems


SIP


[general]
bindport=5060
srvlookup=yes
qualify=1000
disallow=all
allow=alaw
dtmfmode=rfc2833
language=en
allowguest=yes




[1001]
name=1001
secret=asdf
type=friend
host=dynamic
canreinvite=no
nat=yes
context=contextsip

[1002]
name=1002
secret=asdf
type=friend
host=dynamic
canreinvite=no
nat=yes
context=contextsip




IAX


[general]
bindport=4569
calltokenoptional=0.0.0.0/0.0.0.0
maxcallnumbers=512

qualify=yes
bandwidth=high
lowdisallow=all
allow=alaw
language=cz




[2001]
username=2001
secret=asdf
auth=md5
type=friend
host=dynamic
context=contextiax

[2002]
username=2002
secret=asdf
auth=md5
type=friend
host=dynamic
context=contextiax




EXTENSION


[contextsip]

exten => 1800,1,Answer
exten => 1800,2,Goto(zakladni_nabidka,s,1)


exten =>_0XXXX,1,Macro(JumpIntoContext)

exten =>_100X,1,Macro(CallSIP)

exten => 1991,1,Answer
exten => 1991,2,Wait(2)
exten => 1991,3,Record(luke-test_sound%d:alaw)
exten => 1991,4,Wait(2)
exten => 1991,5,Playback(${RECORDED_FILE})
exten => 1991,6,Wait(2
exten => 1991,7,Hangup

[zakladni_nabidka]
exten => s,1,Set(COUNTER=0)
exten => s,2,Playback(uvitani)
exten => s,3(start),Background(strom-level-1)
exten => s,n,WaitExten(10)
exten => 1,1,Goto(Informace,x,x)
exten => 2,1,Goto(Volba_oddeleni)
exten => 3,1,Dial(Prima)
exten => i,1,Playback(spatnavolba)
exten => i,n,Set(COUNTER=0)
exten => i,n,Wait(2)
exten => i,n,Goto(s,start)
exten => t,1,Set(COUNTER=$[${COUNTER} + 1])
exten => t,2,GotoIf($[ ${COUNTER} >= 2]?operator,s,1)
exten => t,3,Playback(spatnavolba)
exten => t,n,Wait(2)
exten => t,n,Goto(s,start)


[contextiax]



exten =>_0XXXX,1,Macro(JumpIntoContext)

exten =>_200X,1,Macro(CallIAX)


;=======================================================================================

exten =>_0XXXX,1,Macro(JumpIntoContext)

[macro-JumpIntoContext]
exten =>s,1,GotoIf($[${MACRO_EXTEN:1:1}=1]?contextsip,${MACRO_EXTEN:1},1:dva)
exten =>s,n,Hangup()
exten =>s,n(dva),GotoIf($[${MACRO_EXTEN:1:1}=2]?contextiax,${MACRO_EXTEN:1},1:end
exten =>s,n(end),Hangup()
exten =>s,n,MacroExit

[macro-CallSIP]
exten => s,1,Dial(SIP/${MACRO_EXTEN})

exten => s,n,Goto(S-${DIALSTATUS},1)
exten => S-NOANSWER,1,Playback(vm-nobodyavail)
exten => S-CHANUNAVAIL,1,Playback(pbx-invalid)
exten => _.,1,Playback(pbx-invalid)
exten => .,n,HangUp()

exten =>s,n,MacroExit

[macro-CallIAX]
exten =>s,1,Dial(IAX2/${MACRO_EXTEN})
exten =>s,n,MacroExit

Created by: lukeobrslik, Last modification: Wed 04 of Nov, 2015 (03:14 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+