<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Patch Set 1: Code-Review-1</p><p style="white-space: pre-wrap; word-wrap: break-word;">(6 comments)</p><p style="white-space: pre-wrap; word-wrap: break-word;">Ready through the code I'm still not sure what an example might look like and why the substitution is being done the way it is. Could you provide an example dialplan of what a call would look like?</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Here's an example:<br>WaitForCondition(#,#[#{EPOCH}>#{futuretime}],10,1)</p><p style="white-space: pre-wrap; word-wrap: break-word;">In this case, I use # to replace $ since that doesn't appear in my expression. This example waits until ${EPOCH} is greater than the variable ${futuretime}, for up to 10 seconds, checking every 1 second.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The substitution is being done this way because normally the main PBX parser eats up the expression and evaluates it before passing it to the application. I looked around in the code and could not find anything that actually receives the expression from the dialplan. So, I had to get a bit creative with that, this was just one of the ways I thought of passing the expression itself into the application without the parser eating it up, so that way we can convert it back and keep evaluating it.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Obviously, that's not the intended use case, that's just to show the syntax, it's more suited for checking variables that were set on other channels (shared/global), or evaluating functions/expressions whose values could change at some point, but we're not sure when.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15928">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15928">change 15928</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/15928"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I08adf2824b8bc63405778cf355963b5005612f41 </div>
<div style="display:none"> Gerrit-Change-Number: 15928 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-CC: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-CC: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 26 May 2021 00:59:24 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>