Asterisk dialplan context and label clarifications

Posted by liv2hak on Server Fault See other posts from Server Fault or by liv2hak
Published on 2012-10-21T23:29:14Z Indexed on 2012/10/30 23:05 UTC
Read the original article Hit count: 276

Filed under:
|
|

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

© Server Fault or respective owner

Related posts about voip

Related posts about asterisk