[asterisk-users] branching in extensions.conf?
Eric Wieling
ewieling at nyigc.com
Wed Feb 20 13:56:43 CST 2019
If you want your dialplan code to look pretty, use AEL.
On 02/20/2019 11:41 AM, Brian J. Murrell wrote:
> Is there any less cumbersome way of doing conditionalized/branching in
> extensions.conf other than something like:
>
> exten => s,n,GotoIf($["${SIP}" = "PJSIP" ]?pjsip)
> exten => s,n,Dial(${ARG2},20,TtWw)
> exten => s,n,Goto(afterdial)
> exten => s,n(pjsip),Dial(${PJSIP_DIAL_CONTACTS(${STRREPLACE(ARG2,"PJSIP/","")})},20,TtWw)
> exten => s,n(afterdial),Goto(s-${DIALSTATUS},1)
>
> Granted the particular above example could probably be better written
> to simply modify $ARG2 based on ${SIP} rather than having two Dial()
> branches, but using the above as just an example for wanting to have
> branches, is there a less cumbersome way?
>
> Cheers,
> b.
>
>
>
--
http://help.nyigc.net/
More information about the asterisk-users
mailing list