Hi, I didn't see any documentation for this so I assume it can't be done but I figured I would check here first. Is there any way of using ExecIf to run two commands instead of 1? e.g. instead of Exten 123,1,ExecIf($["FOO" == "BAR"]?BackGround(you-owe)) Exten 123,1,ExecIf($["FOO" == "BAR"]?SayNUmber(1000000")) I would ideally like to do it in one line. TIA. Dovid -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20211223/685665ec/attachment.html>
On Thu, 23 Dec 2021, Dovid Bender wrote:> Is there any way of using ExecIf to run two commands instead of 1? e.g. > instead of > > Exten 123,1,ExecIf($["FOO" == "BAR"]?BackGround(you-owe)) > Exten 123,1,ExecIf($["FOO" == "BAR"]?SayNUmber(1000000")) > > I would ideally like to do it in one line.1) gotoif() 2) gosub() 3) AEL gosub() is probably 'cleaner' and more maintainable than gotoif(). AEL is good but sometimes fragile. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST https://www.linkedin.com/in/steve-edwards-4244281
The dialplan is a very complicated config file. It is often repetitive and ugly. Don't expect it to work like an actual programming language. If you want that, use an AGI. In this case, just call it an "Asterisk-ism" and move on. You'll find plenty more of them. On 12/23/21 01:37, Dovid Bender wrote:> Hi, > > I didn't see any documentation for this so I assume it can't be done but > I figured I would check here first. Is there any way of using ExecIf to > run two commands instead of 1? e.g. instead of > > Exten 123,1,ExecIf($["FOO" == "BAR"]?BackGround(you-owe)) > Exten 123,1,ExecIf($["FOO" == "BAR"]?SayNUmber(1000000")) > > I would ideally like to do it in one line. > > > TIA. > > Dovid > >-- http://help.nyigc.net/