On Wed, Feb 1, 2012 at 12:48 AM, Gerald Weber <gerald.weber@besharp.at>wrote:
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<http://dict.leo.org/ende?lp=ende&p=DOKJAA&search=asynchronous&trestr=0x804> call handling ?)
Yes, fully async call control is best handled with ESL or the new mod_httapi. If you do a Lua dialplan script then you are kind of in your own little world (or thread, as it were). External call control has many advantages and very few disadvantages.
****
** **
PS:****
I’ve updated the wiki page.
Thanks! -MC
****