[SR-Users] app_lua in kamailio
Daniel-Constantin Mierla
miconda at gmail.com
Tue May 24 12:38:48 CEST 2011
Hello,
please do not write direct private emails for questions about kamailio,
use public mailing list sr-users at lists.sip-router.org (cc-ed) -- private
emails are ignored, after the first notification.
exit is not a function exported by a module, it is implemented in core.
On the other hand, you try to stop the kamailio cfg interpreter when lua
interpreter is executing the Lua script, so it won't work
straightforward. Set a variable in kamailio from Lua, then check it
after executing the lua script to decide to further exit or not.
Cheers,
Daniel
On 5/24/11 11:44 AM, Bret McDanel wrote:
> I am having a terrible time trying to get a conditional response from a
> lua script.
>
> Basically I want
>
> if error then
> sr.sl.send_reply(404,"Not Found");
> sr.modf("exit"); -- this does not work!
> end
>
>
> How can I have such a conditional? I have tried with return values from
> the script to see if that would change anything but that did not seem to
> work, sr.modf("exit") is not found.
>
> Any assistance would be greatly appreciated.
>
--
Daniel-Constantin Mierla -- http://www.asipto.com
http://linkedin.com/in/miconda -- http://twitter.com/miconda
More information about the sr-users
mailing list