Some context here would be helpful. Can you pastebin your Lua script, or at least the relevant lines that demonstrate what is happening? Also, when you say that the rest of the Lua dialplan is still processed, what does that mean? -MC From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Florent Krieg Sent: Thursday, March 12, 2015 11:43 AM To: FreeSWITCH Users Help Subject: [Freeswitch-users] Limit application usage in Lua Hi all, I wanted to implement call rate limits using this Lua instruction: session:execute("limit", "hash " .. billedcaller .. " caps 10/1 !REQUESTED_CHAN_UNAVAIL") It is actually working, but the rest of the Lua dialplan is still processed, which is a problem in my case. I made a dirty but quick workaround, looking like this: rate_var = session:getVariable("limit_rate_" .. billedcaller .. "_caps") if not rate_var then logz("[Calls limit] CAPS limit reached for " .. billedcaller .. ", aborting the dialplan.") return end How can it be done properly? Is there a way to be able to get the result of the 'limit' app call? Or shall I check the status of the a-leg just after to decide to process the rest of the dialplan or not? I know that this issue doesn't occur in a 'pure' XML dialplan, but I'm trying to find a solution for my Lua-only dialplan. Thanks in advance if you have any idea. I'm willing to try any possible solution you would think about! Florent