[Asterisk-code-review] app_waitforcond: New application (asterisk[16])

Joshua Colp asteriskteam at digium.com
Mon May 24 11:47:24 CDT 2021


Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/15928 )

Change subject: app_waitforcond: New application
......................................................................


Patch Set 1:

> Patch Set 1:
> 
> > Patch Set 1:
> > 
> > What are actual real world use cases for this? It feels like this is taking dialplan into some sort of external manipulation cross synchronization weird area.
> 
> There's no manipulation at all of anything. I wrote it as an optimization to some of my existing dialplan code.
> 
> For instance, suppose you have:
> same => n(loop),GotoIf($["${somesetofconditions}"="1"|"${somethingelse}"="42"]?dosomething)
> same => n,Wait(0.1)
> same => n,Goto(loop)
> 
> Well, now the Asterisk CLI is a mess with any verbosity at least 3.
> 
> I try to avoid polling like this as much as possible, using ChannelRedirect instead, but in some cases, this kind of behavior is needed and it would be very useful to just have an application that waits for some amount of time or until some condition(s) are true.
> 
> It doesn't enable anything new per se, it's just a much cleaner and more efficient way to do that, and a generic Wait function unlike the existing functions which are very specific (e.g. WaitUntil, which is for time only, or WaitForRing, which is for ring only). This is just an ultra-generic version of that.

What are some real world example conditions?


-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15928
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I08adf2824b8bc63405778cf355963b5005612f41
Gerrit-Change-Number: 15928
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-CC: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Mon, 24 May 2021 16:47:24 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210524/109db981/attachment.html>


More information about the asterisk-code-review mailing list