[Freeswitch-users] Any alternative to repetitive lua session:ready() calls?

Adam Kelloway adam.kelloway at newpace.ca
Tue Mar 6 20:36:01 MSK 2012


Kind of, all of those solutions consider the script exiting an 'error'. 
I am looking for something that exits without considering it an error 
and thus does not emit an [ERR] log.

On 3:59 PM, Peter Olsson wrote:
> Maybe this is what you are looking for?
>
> commit 09ad887948f7513725ca8b53bdfe721d9008e73b
> Author: Anthony Minessale<anthm at freeswitch.org>
> Date:   Fri Jan 27 19:03:04 2012 -0600
>
>      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
>
>
> ________________________________________
> Från: freeswitch-users-bounces at lists.freeswitch.org [freeswitch-users-bounces at lists.freeswitch.org] f&#246;r Adam Kelloway [adam.kelloway at newpace.ca]
> Skickat: den 6 mars 2012 17:22
> Till: FreeSWITCH Users Help
> Ämne: [Freeswitch-users] Any alternative to repetitive lua      session:ready() calls?
>
> Hi there,
>
> If I am running a lua script during a call, and the call terminates
> (caller hangs up, for instance), the lua script continues to execute
> while the session has already been terminated. This causes ERR entries
> in the freeswitch log, which I would like to try and minimize. The only
> way I can see doing this is to frequently call session:ready() before
> doing anything that could break the script. Is there a better way to
> exit a script cleanly, without having to add X number of session:ready()
> calls scattered about the script? Currently, I only call it once (at the
> beginning of the script). I tried using the hangup hook, but I'm not
> sure how I can get it to immediately exit the script.
>
> Thanks,
>
> Adam
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> 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
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
> !DSPAM:4f56388f32766945510869!
>
>
>

-- 
Adam
-- 
NewPace Logo 	
	
	
	Adam Kelloway

	Software Engineer, NewPace
phone 	+1 (902) 406--8375  x1031
email 	Adam.Kelloway at NewPace.com <mailto:Adam.Kelloway at newpace.com>
aim <aim:GoIm?screenname=Adam.Kelloway at newpace.com>/msn 
<msnim:chat?contact=Adam.Kelloway at newpace.com> 	Adam.Kelloway 
<aim:GoIm?screenname=Adam.Kelloway at newpace.ca>@NewPace.ca

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120306/c11625b9/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Newpace_50x50.png
Type: image/png
Size: 4620 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20120306/c11625b9/attachment.png 


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