[asterisk-users] branching in extensions.conf?

Brian J. Murrell brian at interlinx.bc.ca
Wed Feb 20 10:41:01 CST 2019


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20190220/93793158/attachment.sig>


More information about the asterisk-users mailing list