Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have been learning Asterisk dial plan for the past week.I have written down a simple IVR system with two levels of menu and an exit option.I have used concepts from different tutorials on the web.Can someone confirm if the IVR below is correct? Correct in the sense that if the below is used will it work.I know the IVR does not do much yet.But I am just trying to clarify my understanding.

[incoming]
exten => 123,1,Answer()
 same => n(menuprompt),Background(main-menu)

exten => 1,1,Playback(digits/1)
 same => n,Goto(incoming,menuprompt,123)

exten => 2,1,Playback(digits/2)
 same => n,Goto(incoming,menuprompt,123)

exten => 9,1,Hangup()

[main-menu]
exten => n(menuprompt),Background(main-menu)

exten => 3,1,Playback(digits/3)
 same => n,Goto(main-menu,menuprompt,n)

exten => 4,1,Playback(digits/4)
 same => n,Goto(main-menu,menuprompt,n)

exten => 9,1,Hangup()
share|improve this question
1  
Correct in what way? –  Michael Hampton Oct 21 '12 at 23:31

1 Answer 1

up vote 1 down vote accepted

goto have following format

goto(context,extension,priority)

label is same as priority. so you need correct your dialplan to do something like

n,Goto(incoming,123,menuprompt)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.