[asterisk-users] Exec two commands with ExecIf

asterisk at phreaknet.org asterisk at phreaknet.org
Thu Dec 23 15:01:49 CST 2021



> -----Original Message-----
> From: asterisk-users <asterisk-users-bounces at lists.digium.com> On Behalf
> Of Antony Stone
> Sent: Thursday, December 23, 2021 3:32 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-
> users at lists.digium.com>
> Subject: Re: [asterisk-users] Exec two commands with ExecIf
> 
> On Thursday 23 December 2021 at 18:31:38, asterisk at phreaknet.org wrote:
> 
> > > -----Original Message-----
> > > From: asterisk-users <asterisk-users-bounces at lists.digium.com> On
> > > Behalf Of Dovid Bender
> > > Sent: Thursday, December 23, 2021 12:11 PM
> > > To: Asterisk Users Mailing List - Non-Commercial Discussion
> > > <asterisk- users at lists.digium.com>
> > > Subject: Re: [asterisk-users] Exec two commands with ExecIf
> > >
> > > Anyone know why this never made it into Asterisk?
> >
> > I believe it was deemed not to be of interest to the community.
> 
> Assuming that the dates in that ticket refer to 2021 (I see only months and
> days, not years), I don't recall any discussion taking place with the community
> about it, so that seems to me like a surprising explanation.
> 
> After all, if GotoIf(), ExecIf() and While() are "deemed to be of interest", and
> therefore exist, why would a simple If() be deemed not to be of interest?
> 
> And, taking it from the other point of view, even if many people genuinely
> think "meh, I don't think I'd use this", then surely they just avoid using it, as I
> suspect the majority of people do with DumpChan() (for example, to take a
> pretty obscure, yet still available, command at random).
> 
> In short, what's the drawback to making If() available for those who would
> use it?
> 
> Personally, I would very much like to see an If() statement made available.

Thanks, Anthony. I use If() a lot in my dialplan and do find it useful as well. Personally, I agree entirely with you. However, that seemed to be the assessment at the time and I didn't want to rock the boat too much. Along the same vein, ReturnIf() [2] is another abandoned conditional branch application that I also use quite a bit.

Given the renewed interest, I have unabandoned the Gerrit review[1] for this so that it appears on the review queue again. Still, this doesn't necessarily mean it will make it in.

[1] https://gerrit.asterisk.org/c/asterisk/+/16121
[2] https://issues.asterisk.org/jira/browse/ASTERISK-29493 




More information about the asterisk-users mailing list