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 ?) PS: I've updated the wiki page. Von: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] Im Auftrag von Michael Collins Gesendet: Dienstag, 31. Jänner 2012 22:08 An: FreeSWITCH Users Help Betreff: Re: [Freeswitch-users] exit lua script in hangup hook That's what I get for being 2 months behind on the changelog! :D If we have any Lua peeps out there who could test this and update the wiki I would be eternally grateful... -MC On Tue, Jan 31, 2012 at 12:06 PM, Jeff Lenk <jeff@jefflenk.com<mailto:jeff@jefflenk.com>> wrote: Just to let you know mercutioviz that anthm did make some source code changes last week that should have enabled this to work. Commit:09ad887948f7513725ca8b53bdfe721d9008e73b * FS-3841 --resolve ok return the string "die" or "exit" from hanguphook to cause an error or call s:destroy("any err message"); either should now halt the script -- View this message in context: http://freeswitch-users.2379917.n2.nabble.com/exit-lua-script-in-hangup-hook... Sent from the freeswitch-users mailing list archive at Nabble.com. _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org