Hello,
Just tried all 4 cases (error(), return “exit”, return “die”, session:destroy(“42”))
All of them are working as expected. Thanks for implementing !
I just checked the wiki and the example for the setHangupHook Call (http://wiki.freeswitch.org/wiki/Mod_lua#session:setHangupHook)
In the code, error() is used to exit the script – which is now working.
So I guess the possibility to exit the script was already there, but not working until the patch from Anthony ?
Anyways, thanks !
Now I have to figure out how to handle outgoing calls from lua. And how to control them.
(seems like ESL is the only choice for fully asynchronous call handling ?)
PS:
I’ve updated the wiki page.