IVR Menu Configuration

Hello, I am trying to implement an IVR menu. I am running on Cento5. Here is my extensions.conf

[infotest]
exten => 00,1,VoicemailMain(${CALLERIDNUM:1}@${CONTEXT})
exten => asterisk,1,VoicemailMain(${CALLERIDNUM:1}@${CONTEX T})
exten => a,1,Macro(voicemailescape,${EXTEN},edstest)
exten => i,1,Playback(invalid)
exten => i,2,Congestion
include => inbound
include => defaultoutbound
include => mainmenu

[mainmenu]
exten => s,1,Background(/var/lib/asterisk/sounds/s-xpress.gsm)
exten => s,3,Background(silence/5)
exten => s,4,noop()
exten => s,5,Background(/var/lib/asterisk/sounds/s-xpress.gsm)
exten => s,6,Background(silence/10)
exten => s,7,Background(Hangup)
exten -> 0,1,Goto(infotest|1000|1)
exten => 1,1,Goto(infotest|1001|1)
exten => 2,1,Goto(infotest|1002|1)
exten => 3,1,Goto(infotest|1003|1)
exten => 4,1,Goto(infotest|1004|1)
exten => 5,1,Goto(infotest|1005|1)
exten => i,1,playback(invalid)
exten => i,2,goto(infotest|s|1)

exten => 3000,1,Goto(mainmenu,s,1)

exten 3000 is supposed to ring the auto attendant. When I dial this extension it goes to dead air. This is from the messages log

[Aug 7 11:53:07] WARNING[2701] file.c: Unable to open /var/lib/asterisk/sounds/s-xpress.gsm (format 0x4 (ulaw)): No such file or directory
[Aug 7 11:53:07] WARNING[2701] pbx.c: ast_streamfile failed on SIP/infotest1000-09018900 for /var/lib/asterisk/sounds/s-xpress.gsm

gsm file has been converted via sox. Please any help on this error and or my configuration if it is not correct? :confused:

i can see a few errors

should be

no file extensions, asterisk will look for the best matching file type, and the priority numbers were incorrect, i replaced with ‘n’, it makes life easier when adding/deleting applications in a block or things to do.

also the
background(silence) can be replaced with wait() or waitexten()… check out voip-info.org for more info on those

Thanks worked like a charm :smiley:

[quote=“eric_f”]also the
background(silence) can be replaced with wait() or waitexten()… check out voip-info.org for more info on those[/quote]

I don’t think that this is correct. With background() Asterisk is waiting for input and will process the input/jump to the proper/matching extension.

With wait or waitexten (afaik) the input is not handled like it is with using background(). I think using Background(silence/10) is the correct way.

I am having some trouble setting up our IVR (Voice Menu) for the first time. I want it to say in short "Thanks for calling please enter extension if you know it (then you have a couple seconds to enter an extension). Press 1 for secretary, press 2 for sales, press 3 for accounting, press 4 for investor relations (gives caller a couple seconds to select 1 of the 4 menu options), otherwise dial 411 for directory or 0 to leave a message. (again a couple more seconds to dial 411 or 0) and then the menu repeats itself after a few seconds.

include=default
exten=s,1,NoOp(RealtyNet Advisors)
exten=s,2,Answer
exten=s,3,Wait(1)
exten=s,4,Background(thank-you-for-calling)
exten=s,5,Background(if-u-know-ext-dial)
exten=s,6,WaitExten(3)
exten=s,7,Background(press-1)
exten=s,8,Background(for)
exten=s,9,Background(secretary)
exten=s,10,Wait(1)
exten=s,11,Background(press-2)
exten=s,12,Background(for-sales)
exten=s,13,Wait(1)
exten=s,14,Background(press-3)
exten=s,15,Background(for-accounting)
exten=s,16,Wait(1)
exten=s,17,Background(for-investor-relations)
exten=s,18,Background(for)
exten=s,19,Wait(1)
exten=s,20,Background(otherwise)
exten=s,21,Background(company-dir-411)
exten=s,22,WaitExten(6)
exten=s,23,Goto(voicemenu-custom-1|s|1)
exten=0,1,Voicemail(1110,u)
exten=1,1,Goto(default|1110|1)
exten=2,1,Goto(default|1118|1)
exten=3,1,Goto(default|1116|1)
exten=4,1,Goto(ringroups-custom-1|s|1)
exten=*,1,Goto(directory|411|1)
exten=#,1,Goto(directory|411|1)

You don’t have to split the voicemenu in all this part. You can just make a soundfile with the proper voicemenu and play that with the background application.

Don’t use the wait() application in an ivr, instead use Background(silence/3) There are soundfiles with just silence in /var/lib/asterisk/sounds/silence.

Make sure that you handle timeouts, and invalid input in a proper way using the t and the i extension.

Goodluck

[quote=“lesouvage”]You don’t have to split the voicemenu in all this part. You can just make a soundfile with the proper voicemenu and play that with the background application.

Don’t use the wait() application in an ivr, instead use Background(silence/3) There are soundfiles with just silence in /var/lib/asterisk/sounds/silence.
[/quote]

You should use Background() to play a sound file i.e. your menu option e.g. ‘Please press 1 for helpdesk’

You should then use WaitExten after that to wait for a user to input the detail.

Playing back background silence is unnecessary.

[quote=“wimnat”]

Playing back background silence is unnecessary.[/quote]

It is just another way to go :wink: In most situation with Asterisk there are different ways to go.