<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>Hi all,<br><br></div></div>I wanted to implement call rate limits using this Lua instruction:<br>session:execute(&quot;limit&quot;, &quot;hash &quot; .. billedcaller .. &quot; caps 10/1 !REQUESTED_CHAN_UNAVAIL&quot;)<br><br></div>It is actually working, but the rest of the Lua dialplan is still processed, which is a problem in my case.<br><br></div>I made a dirty but quick workaround, looking like this:<br>rate_var = session:getVariable(&quot;limit_rate_&quot; .. billedcaller .. &quot;_caps&quot;)<br>if not rate_var then<br>    logz(&quot;[Calls limit] CAPS limit reached for &quot; .. billedcaller .. &quot;, aborting the dialplan.&quot;)<br>    return<br>end<br><br></div>How can it be done properly?<br></div>Is there a way to be able to get the result of the &#39;limit&#39; app call?<br></div>Or shall I check the status of the a-leg just after to decide to process the rest of the dialplan or not?<br><br></div>I know that this issue doesn&#39;t occur in a &#39;pure&#39; XML dialplan, but I&#39;m trying to find a solution for my Lua-only dialplan.<br><br></div>Thanks in advance if you have any idea.<br></div>I&#39;m willing to try any possible solution you would think about!<br><br></div>Florent<br><div><div><div><div><div><div><div><div><br><br></div></div></div></div></div></div></div></div></div>