Re: [asterisk-users] branching in extensions.conf?

2019-02-20 Thread Brian J. Murrell
On Wed, 2019-02-20 at 12:38 -0700, John Kiniston wrote: > I don't see any other messages in this thread other than your initial > one > and my response, perhaps the listserv hasn't relayed it to me yet. I started a new thread: http://lists.digium.com/pipermail/asterisk-users/2019-February/293668.

Re: [asterisk-users] branching in extensions.conf?

2019-02-20 Thread Eric Wieling
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},

Re: [asterisk-users] branching in extensions.conf?

2019-02-20 Thread John Kiniston
I don't see any other messages in this thread other than your initial one and my response, perhaps the listserv hasn't relayed it to me yet. I switch between ExecIf/GotoIf/GosubIf and the IF function as needed in my dialplan design, if It's just a one liner I'll usually use either the IF function

Re: [asterisk-users] branching in extensions.conf?

2019-02-20 Thread Brian J. Murrell
On Wed, 2019-02-20 at 11:46 -0700, John Kiniston wrote: > Use the IF function to evaluate and change the dial command directly. Thanks for taking the time, but that doesn't actually answer the question I asked. It in fact answers the caveat I specifically mentioned: > Granted the particular abov

Re: [asterisk-users] branching in extensions.conf?

2019-02-20 Thread John Kiniston
Use the IF function to evaluate and change the dial command directly. My braces and parens may be off in this example sorry if it doesn't work out of the box. exten => s,n,Dial(${IF($["${SIP}" = "PJSIP"]? ${PJSIP_DIAL_CONTACTS(${STRREPLACE(ARG2,"PJSIP/","")})}{ARG2})},20,TtWw) On Wed, Feb 20, 201

[asterisk-users] branching in extensions.conf?

2019-02-20 Thread Brian J. Murrell
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,"PJS