[Asterisk-Users] Dial plan question

Kevin Smith kevin.smith at mercury.net
Sat Jun 10 16:27:01 MST 2006


Hey everyone,

Hopefully this will be simple enough to answer. I have a menu setup like 
below:

exten => 850,n,Set(MenuLoop=1)
exten => 850,n,Playback(mercury-prompts/welcome)
exten => 
850,n(MainMenu),Background(mercury-prompts/MainMenu-if-you-know-the-ext)

exten => t,1,Gotoif,$[${MenuLoop}=1]?|850|100:|t|2      ;Loops the main 
menu twice
exten => t,n,Goto(Mercury-Sales,852,1)                                  
                   
                                                                      
                                             
exten => 850,100(FirstLoop),Set(MenuLoop=2)                             
           
exten => 850,101(SecondLoop),Goto(Mercury-Network,850,MainMenu) 

Basically we want the caller to be routed through the menu twice which 
it does very well. I would like to make the code a little easier to 
update by using 'n' priorities instead of numbers. The part I am having 
trouble is from the 't' extension. I would like to have to say 
|850|FirstLoop, but that gives me an error saying it needs a number. I 
know if i am in the same extension I can just use the name and it works.

Is this possible, so far things that I have tried such as using 
?context|exten|label hasn't worked.

Thanks,
Kevin






More information about the asterisk-users mailing list