Below are some asterisk dial plan examples that I have copied from somewhere.
exten => s,1,Answer()
exten => s,n,Playback(hello-world)
exten => s,n,Hangup()
The first line indicates when a new call comes into the channel it goes to extension s (top priority) 1 which is tied to the application Answer()
.
After that it goes to PlayBack(hello-world)
and then the call is hung up.
Now the next section
[incoming]
exten => 123,1,Answer()
exten => 123,n,Background(main-menu)
exten => 1,1,Playback(digits/1)
exten => 1,n,Goto(incoming,123,1)
exten => 2,1,Playback(digits/2)
exten => 2,n,Goto(incoming,123,1)
Call is coming to extension 123.(Is this a new menu??) or is it forwarded from extension 's'.I think I am missing the connecting link here.
The second line says
exten => 123,n,Background(main-menu).
What is main-menu
here? Where is it defined?