[Freeswitch-users] exit lua script in hangup hook
gerald.weber at besharp.at
Wed Feb 1 11:48:53 MSK 2012
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 ?)
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...
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.
* 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
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>
Official FreeSWITCH Sites
FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org<mailto:FreeSWITCH-users at lists.freeswitch.org>
-------------- next part --------------
An HTML attachment was scrubbed...
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users