[Asterisk-Users] dialplan woes

defiance defiance at stratitec.com
Tue Aug 17 15:03:34 MST 2004


I am making some changes to the dial plan at the request of the company
president and have run into some problems. I have a couple of layers of
menu's and I am not sure how to handle them.

Here is how it should work (sorry for the crappy diagram)

main menu

--------Dial 1 for support 
|	Dial 2 for special                                     
|	Dial 3 sales                                           
|	Dial 5 For sales                                       
|
|
|______________________________submenu
				Dial 1 for product a support
				Dial 2 for pdoduct b support
				Dial 3 for product c support

My problem is that if you choose option one in the second menu it loop
back to the first menu. I don't know how to handle this, and I'm sure it
can be done. here is the section of extensions.conf that deals with it

exten => 6666,1,Wait,2 ; Allow for PRI to grab info in facility
exten => 6666,2,SetCallerID(Toll Free No Cpub)
exten => 6666,3,BackGround(greeting)
exten => 6666,4,BackGround(mainmenu) 
exten => 6666,5,Wait,5
exten => 6666,6,Queue(tech)

exten => 1,1,SetCallerID(Toll Free No Cpub)
exten => 1,2,AGI(openclose.agi)
exten => 1,3,GotoIf($[${STATUS} = closed]?6:4)
exten => 1,4,GotoIf($[${STATUS} = holiday]?8:10)
exten => 1,5,Goto(1,10)
exten => 1,6,BackGround(nighttime-greeting)
exten => 1,7,Goto(4,1)
exten => 1,8,BackGround(holiday-greeting)
exten => 1,9,Goto(4,1)
exten => 1,10,BackGround(tech-menu)
exten => 1,1,Playback(cpub-support)
exten => 1,2,Hangup
exten => 2,1,SetVar(QUEUE_PRIO=10)
exten => 2,2,Queue(tech)  
exten => 3,1,SetVar(QUEUE_PRIO=5)
exten => 3,2,Queue(tech)
exten => 4,1,Hangup

exten => 2,1,Wait,1
exten => 2,2,SetCallerID(TimeIPS)
exten => 2,3,AGI(openclose.agi)
exten => 2,4,GotoIf($[${STATUS} = closed]?7:5)
exten => 2,5,GotoIf($[${STATUS} = holiday]?9:11)
exten => 2,6,Goto(1,11)
exten => 2,7,BackGround(nighttime-greeting)
exten => 2,8,Goto(1,28)
exten => 2,9,BackGround(holiday-greeting)
exten => 2,10,Goto(1,28)
exten => 2,11,Dial(SIP/3085,15|m)
exten => 2,12,Dial(SIP/3082,15|m)
exten => 2,13,Dial(SIP/3006,15|m)
exten => 2,14,Dial(SIP/3007,15|m)
exten => 2,15,Background(sales-hold)
exten => 2,16,WaitMusicOnHold(60)
exten => 2,17,Dial(SIP/3085,15|m)
exten => 2,18,Dial(SIP/3082,15|m)
exten => 2,19,Dial(SIP/3006,15|m)
exten => 2,20,Dial(SIP/3007,15|m)
exten => 2,21,Background(sales-hold)
exten => 2,22,WaitMusicOnHold(60)
exten => 2,23,Dial(SIP/3085,15|m)
exten => 2,24,Dial(SIP/3082,15|m)
exten => 2,25,Dial(SIP/3006,15|m)
exten => 2,26,Dial(SIP/3007,15|m)
exten => 2,27,Voicemail(u3082)
exten => 2,28,Hangup

exten => 5,1,Wait,1
exten => 5,2,SetCallerID(Sales)
exten => 5,3,AGI(openclose.agi)
exten => 5,4,GotoIf($[${STATUS} = closed]?7:5)
exten => 5,5,GotoIf($[${STATUS} = holiday]?9:11)
exten => 5,6,Goto(1,11)
exten => 5,7,BackGround(nighttime-greeting)
exten => 5,8,Goto(1,28)
exten => 5,9,BackGround(holiday-greeting)
exten => 5,10,Goto(1,28)
exten => 5,11,Dial(SIP/3085,15|m)
exten => 5,12,Dial(SIP/3082,15|m)
exten => 5,13,Dial(SIP/3006,15|m)
exten => 5,14,Dial(SIP/3007,15|m)
exten => 5,15,Background(sales-hold)
exten => 5,16,WaitMusicOnHold(60)
exten => 5,17,Dial(SIP/3085,15|m)
exten => 5,18,Dial(SIP/3082,15|m)
exten => 5,19,Dial(SIP/3006,15|m)
exten => 5,20,Dial(SIP/3007,15|m)
exten => 5,21,Background(sales-hold)
exten => 5,22,WaitMusicOnHold(60)
exten => 5,23,Dial(SIP/3085,15|m)
exten => 5,24,Dial(SIP/3082,15|m)
exten => 5,25,Dial(SIP/3006,15|m)
exten => 5,26,Dial(SIP/3007,15|m)
exten => 5,27,Voicemail(u3082)
exten => 5,28,Hangup

exten => 7,1,Wait,1
exten => 7,2,SetCallerID(TimeIPS)
exten => 7,3,AGI(openclose.agi)
exten => 7,4,GotoIf($[${STATUS} = closed]?7:5)
exten => 7,5,GotoIf($[${STATUS} = holiday]?9:11)
exten => 7,6,Goto(1,11)
exten => 7,7,BackGround(nighttime-greeting)
exten => 7,8,Goto(1,28)
exten => 7,9,BackGround(holiday-greeting)
exten => 7,10,Goto(1,28)
exten => 7,11,Dial(SIP/3085,15|m)
exten => 7,12,Dial(SIP/3082,15|m)
exten => 7,13,Dial(SIP/3006,15|m)
exten => 7,14,Dial(SIP/3007,15|m)
exten => 7,15,Background(sales-hold)
exten => 7,16,WaitMusicOnHold(60)
exten => 7,17,Dial(SIP/3085,15|m)
exten => 7,18,Dial(SIP/3082,15|m)
exten => 7,19,Dial(SIP/3006,15|m)
exten => 7,20,Dial(SIP/3007,15|m)
exten => 7,21,Background(sales-hold)
exten => 7,22,WaitMusicOnHold(60)
exten => 7,23,Dial(SIP/3085,15|m)
exten => 7,24,Dial(SIP/3082,15|m)
exten => 7,25,Dial(SIP/3006,15|m)
exten => 7,26,Dial(SIP/3007,15|m)
exten => 7,27,Voicemail(u3082)
exten => 7,28,Hangup


Thanks,
Chris Locke
Systems Administrator
Stratitec INC



More information about the asterisk-users mailing list