[Freeswitch-users] exit lua script in hangup hook

Gerald Weber gerald.weber at besharp.at
Wed Feb 1 11:48:53 MSK 2012


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 at lists.freeswitch.org [mailto:freeswitch-users-bounces at 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 at jefflenk.com<mailto:jeff at 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-tp7223506p7241003.html
Sent from the freeswitch-users mailing list archive at Nabble.com.

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org<mailto:consulting at freeswitch.org>
http://www.freeswitchsolutions.com




Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org<mailto:FreeSWITCH-users at lists.freeswitch.org>
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120201/cbaf16a6/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list