[RESOLVED] How to simplify dialplan with asterisk 1.8 syntax

Hi guys,

I was experienced with asterisk some years back. The new possibilities are pure gem! However, I need your advices to clean the below IVR syntax:

exten => 1,1,Set(Lang=FR) same => n,Goto(NextMenu,s,1) exten => 2,1,Set(Lang=EN) same => n,Goto(NextMenu,s,1) exten => 3,1,Set(Lang=DE) same => n,Goto(NextMenu,s,1) exten => 4,1,Set(Lang=PL) same => n,Goto(NextMenu,s,1) exten => 5,1,Set(Lang=ES) same => n,Goto(NextMenu,s,1)

I’m sure there’s no need to replicate many times

However, I tried

and

which both clearly proved not to be working /:

Well, it’s working, just looking forward to making it more “clean” (:

exten => 1,1,Set(Lang=FR)
exten => 2,1,Set(Lang=EN)
exten => 3,1,Set(Lang=DE)
exten => 4,1,Set(Lang=PL)
exten => 5,1,Set(Lang=ES)
same => [color=#FF0000]_[/color]X,n,Goto(NextMenu,s,1)

It seems not to be functionnal

Here is console output:

-- Executing [2@IVR1:1] Set("SIP/0001-00000011", "Lang=EN") in new stack -- Auto fallthrough, channel 'SIP/0001-00000011' status is 'UNKNOWN'

And I finally manage to correct ouselves (aka 2 brains are always better than one):

Thanks a million for directing me to the right path (: