<p style="white-space: pre-wrap; word-wrap: break-word;">Additionally - dialplan expressions should already support doing this stuff:</p><p style="white-space: pre-wrap; word-wrap: break-word;">exten => s,1,Set(NUM=4)<br>exten => s,n,NoOp($[$[${NUM} > 5] ? 5 :: ${NUM}])</p><p style="white-space: pre-wrap; word-wrap: break-word;">If ${NUM} is greater than 5, then the expression will return 5 otherwise it returns ${NUM}</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15906">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15906">change 15906</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/+/15906"/><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: I2bda9269d18f9d54833c85e48e41fce0e0ce4d8d </div>
<div style="display:none"> Gerrit-Change-Number: 15906 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </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: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 17 May 2021 14:39:50 +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>