[Freeswitch-users] exit lua script in hangup hook

Michael Collins msc at freeswitch.org
Thu Feb 2 00:12:08 MSK 2012


On Wed, Feb 1, 2012 at 12:48 AM, Gerald Weber <gerald.weber at 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

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


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