Hello, i tried to use Lua script to replace xml macro in dialplan, but I found out that Lua wont terminate if client hangup, ,so the session is still on but client is already hangup, is there a way to avoid this ?
Hello, Can you pastebin your script? http://pastebin.freeswitch.org On 02/10/2010 01:17 PM, Chia-Yen Wu wrote:
Hello, i tried to use Lua script to replace xml macro in dialplan, but I found out that Lua wont terminate if client hangup, ,so the session is still on but client is already hangup, is there a way to avoid this ?
_______________________________________________ FreeSWITCH-users mailing list 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
thx for reply, but shouldnt Lua script terminate when client hangs up? maybe it will stuck in a few situation before it reach to session:status check point. like GetDigit or something else? (sorry, I dont have FS right now, need test it tomorrow) 2010/2/10 Nazim Agabekov <nazim.agabekov@gmail.com>
Hello, Can you pastebin your script?
http://pastebin.freeswitch.org
On 02/10/2010 01:17 PM, Chia-Yen Wu wrote:
Hello, i tried to use Lua script to replace xml macro in dialplan, but I found out that Lua wont terminate if client hangup, ,so the session is still on but client is already hangup, is there a way to avoid this ?
_______________________________________________ FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_______________________________________________ FreeSWITCH-users mailing list 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
Lua script is not terminating immediately on hangup. This behavior allows user to finalize the script nicely (free dynamically allocated resources, update logs, e.t.c)
maybe it will stuck in a few situation before it reach to session:status check point.
like GetDigit or something else? (sorry, I dont have FS right now, need test it tomorrow) I've never encountered such a problem. Usually GetDigit-like functions have timeout parameter, so they don't block forever. Just check the session status often and it will work like a charm ;
On 02/10/2010 08:00 PM, Chia-Yen Wu wrote:
thx for reply, but shouldnt Lua script terminate when client hangs up?
maybe it will stuck in a few situation before it reach to session:status check point.
like GetDigit or something else? (sorry, I dont have FS right now, need test it tomorrow)
2010/2/10 Nazim Agabekov <nazim.agabekov@gmail.com <mailto:nazim.agabekov@gmail.com>>
Hello, Can you pastebin your script?
http://pastebin.freeswitch.org
On 02/10/2010 01:17 PM, Chia-Yen Wu wrote:
Hello, i tried to use Lua script to replace xml macro in dialplan, but I found out that Lua wont terminate if client hangup, ,so the session is still on but client is already hangup, is there a way to avoid this ?
_______________________________________________ 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
_______________________________________________ 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
_______________________________________________ FreeSWITCH-users mailing list 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
On Wed, Feb 10, 2010 at 1:34 PM, Nazim Agabekov <nazim.agabekov@gmail.com>wrote:
Lua script is not terminating immediately on hangup.
When does it terminate then? Will the script terminate when it finishes running or does it need some special instruction?
This behavior allows user to finalize the script nicely (free dynamically allocated resources, update logs, e.t.c)
maybe it will stuck in a few situation before it reach to session:status check point.
like GetDigit or something else? (sorry, I dont have FS right now, need test it tomorrow)
I've never encountered such a problem. Usually GetDigit-like functions have timeout parameter, so they don't block forever. Just check the session status often and it will work like a charm ;
On 02/10/2010 08:00 PM, Chia-Yen Wu wrote:
thx for reply, but shouldnt Lua script terminate when client hangs up?
maybe it will stuck in a few situation before it reach to session:status check point.
like GetDigit or something else? (sorry, I dont have FS right now, need test it tomorrow)
2010/2/10 Nazim Agabekov <nazim.agabekov@gmail.com>
Hello, Can you pastebin your script?
http://pastebin.freeswitch.org
On 02/10/2010 01:17 PM, Chia-Yen Wu wrote:
Hello, i tried to use Lua script to replace xml macro in dialplan, but I found out that Lua wont terminate if client hangup, ,so the session is still on but client is already hangup, is there a way to avoid this ?
_______________________________________________ FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_______________________________________________ FreeSWITCH-users mailing list 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
I think it continues to run until it finishes. I'll check it tomorrow on my test system. On 02/10/2010 09:32 PM, Nicolas Brenner wrote:
On Wed, Feb 10, 2010 at 1:34 PM, Nazim Agabekov <nazim.agabekov@gmail.com <mailto:nazim.agabekov@gmail.com>> wrote:
Lua script is not terminating immediately on hangup.
When does it terminate then? Will the script terminate when it finishes running or does it need some special instruction?
This behavior allows user to finalize the script nicely (free dynamically allocated resources, update logs, e.t.c)
maybe it will stuck in a few situation before it reach to session:status check point.
like GetDigit or something else? (sorry, I dont have FS right now, need test it tomorrow)
I've never encountered such a problem. Usually GetDigit-like functions have timeout parameter, so they don't block forever. Just check the session status often and it will work like a charm ;
On 02/10/2010 08:00 PM, Chia-Yen Wu wrote:
thx for reply, but shouldnt Lua script terminate when client hangs up?
maybe it will stuck in a few situation before it reach to session:status check point.
like GetDigit or something else? (sorry, I dont have FS right now, need test it tomorrow)
2010/2/10 Nazim Agabekov <nazim.agabekov@gmail.com <mailto:nazim.agabekov@gmail.com>>
Hello, Can you pastebin your script?
http://pastebin.freeswitch.org
On 02/10/2010 01:17 PM, Chia-Yen Wu wrote:
Hello, i tried to use Lua script to replace xml macro in dialplan, but I found out that Lua wont terminate if client hangup, ,so the session is still on but client is already hangup, is there a way to avoid this ?
_______________________________________________ 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
_______________________________________________ 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
_______________________________________________ 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
_______________________________________________ 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
_______________________________________________ FreeSWITCH-users mailing list 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
lua runs until you finish your script. You need to exit when you are supposed to. We have session::ready() for you to test this. Mike On Feb 10, 2010, at 12:53 PM, Nazim Agabekov wrote:
I think it continues to run until it finishes. I'll check it tomorrow on my test system.
On 02/10/2010 09:32 PM, Nicolas Brenner wrote:
On Wed, Feb 10, 2010 at 1:34 PM, Nazim Agabekov <nazim.agabekov@gmail.com> wrote: Lua script is not terminating immediately on hangup.
When does it terminate then? Will the script terminate when it finishes running or does it need some special instruction?
This behavior allows user to finalize the script nicely (free dynamically allocated resources, update logs, e.t.c)
maybe it will stuck in a few situation before it reach to session:status check point.
like GetDigit or something else? (sorry, I dont have FS right now, need test it tomorrow) I've never encountered such a problem. Usually GetDigit-like functions have timeout parameter, so they don't block forever. Just check the session status often and it will work like a charm ;
On 02/10/2010 08:00 PM, Chia-Yen Wu wrote:
thx for reply, but shouldnt Lua script terminate when client hangs up?
maybe it will stuck in a few situation before it reach to session:status check point.
like GetDigit or something else? (sorry, I dont have FS right now, need test it tomorrow)
2010/2/10 Nazim Agabekov <nazim.agabekov@gmail.com> Hello, Can you pastebin your script?
http://pastebin.freeswitch.org
On 02/10/2010 01:17 PM, Chia-Yen Wu wrote:
Hello, i tried to use Lua script to replace xml macro in dialplan, but I found out that Lua wont terminate if client hangup, ,so the session is still on but client is already hangup, is there a way to avoid this ?
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing list 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
Thanks Mike! Mod_Lua is great. I had experience with a lot of proprietary IVR systems in the past. FreeSWITCH and Mod_lua + luasql beats them all. Functionality is really impressive. On 02/11/2010 09:21 AM, Michael Jerris wrote:
lua runs until you finish your script. You need to exit when you are supposed to. We have session::ready() for you to test this.
Mike
On Feb 10, 2010, at 12:53 PM, Nazim Agabekov wrote:
I think it continues to run until it finishes. I'll check it tomorrow on my test system.
On 02/10/2010 09:32 PM, Nicolas Brenner wrote:
On Wed, Feb 10, 2010 at 1:34 PM, Nazim Agabekov <nazim.agabekov@gmail.com <mailto:nazim.agabekov@gmail.com>> wrote:
Lua script is not terminating immediately on hangup.
When does it terminate then? Will the script terminate when it finishes running or does it need some special instruction?
This behavior allows user to finalize the script nicely (free dynamically allocated resources, update logs, e.t.c)
maybe it will stuck in a few situation before it reach to session:status check point.
like GetDigit or something else? (sorry, I dont have FS right now, need test it tomorrow)
I've never encountered such a problem. Usually GetDigit-like functions have timeout parameter, so they don't block forever. Just check the session status often and it will work like a charm ;
On 02/10/2010 08:00 PM, Chia-Yen Wu wrote:
thx for reply, but shouldnt Lua script terminate when client hangs up?
maybe it will stuck in a few situation before it reach to session:status check point.
like GetDigit or something else? (sorry, I dont have FS right now, need test it tomorrow)
2010/2/10 Nazim Agabekov <nazim.agabekov@gmail.com <mailto:nazim.agabekov@gmail.com>>
Hello, Can you pastebin your script?
http://pastebin.freeswitch.org <http://pastebin.freeswitch.org/>
On 02/10/2010 01:17 PM, Chia-Yen Wu wrote:
Hello, i tried to use Lua script to replace xml macro in dialplan, but I found out that Lua wont terminate if client hangup, ,so the session is still on but client is already hangup, is there a way to avoid this ?
_______________________________________________ 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 <http://www.freeswitch.org/>
_______________________________________________ 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 <http://www.freeswitch.org/>
_______________________________________________ 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 <http://www.freeswitch.org/>
_______________________________________________ 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 <http://www.freeswitch.org/>
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ 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
_______________________________________________ FreeSWITCH-users mailing list 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
luasql, now with free memory leaks, while supplies last (don't use mysql with lua… or really ever) Mike On Feb 11, 2010, at 2:45 AM, Nazim Agabekov wrote:
Thanks Mike! Mod_Lua is great. I had experience with a lot of proprietary IVR systems in the past. FreeSWITCH and Mod_lua + luasql beats them all. Functionality is really impressive.
On 02/11/2010 09:21 AM, Michael Jerris wrote:
lua runs until you finish your script. You need to exit when you are supposed to. We have session::ready() for you to test this.
Mike
On Feb 10, 2010, at 12:53 PM, Nazim Agabekov wrote:
I think it continues to run until it finishes. I'll check it tomorrow on my test system.
I'm using luasql with ODBC MySQL driver in production. I've never tried to use luasql with "native" mysql driver, but ODBC one works great. On 02/11/2010 12:36 PM, Michael Jerris wrote:
luasql, now with free memory leaks, while supplies last (don't use mysql with lua… or really ever)
Mike
On Feb 11, 2010, at 2:45 AM, Nazim Agabekov wrote:
Thanks Mike! Mod_Lua is great. I had experience with a lot of proprietary IVR systems in the past. FreeSWITCH and Mod_lua + luasql beats them all. Functionality is really impressive.
On 02/11/2010 09:21 AM, Michael Jerris wrote:
lua runs until you finish your script. You need to exit when you are supposed to. We have session::ready() for you to test this.
Mike
On Feb 10, 2010, at 12:53 PM, Nazim Agabekov wrote:
I think it continues to run until it finishes. I'll check it tomorrow on my test system.
_______________________________________________ FreeSWITCH-users mailing list 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
The script cannot end if you are stuck in a while loop that never exits. The same thing is true in any script in any language. On Thu, Feb 11, 2010 at 7:26 AM, Brian West <brian@freeswitch.org> wrote:
Yes ODBC doesn't seem to leak... while the native one leaks like a sieve.
/b
On Feb 11, 2010, at 2:56 AM, Nazim Agabekov wrote:
I'm using luasql with ODBC MySQL driver in production. I've never tried to use luasql with "native" mysql driver, but ODBC one works great.
_______________________________________________ FreeSWITCH-users mailing list 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:+19193869900
D'oh! I am currently working on a project that uses Lua and the native MySQL driver, so as soon as I read this comment, I decided that I had better do a bit of research. I wrote a Lua test script that makes 10 queries against a MySQL database, then ran it repeatedly. My results show that "leaks like a sieve" is quite correct. To me, it doesn't look like any memory is released, ever. After only 5000 queries or so, the memory allocated for FreeSWITCH balloons from 15 Mb to 50 Mb, and never goes back down. Thanks, Brian, for the heads up! Mike van Lammeren On Thu, Feb 11, 2010 at 8:26 AM, Brian West <brian@freeswitch.org> wrote:
Yes ODBC doesn't seem to leak... while the native one leaks like a sieve.
/b
On Feb 11, 2010, at 2:56 AM, Nazim Agabekov wrote:
I'm using luasql with ODBC MySQL driver in production. I've never tried to use luasql with "native" mysql driver, but ODBC one works great.
_______________________________________________ FreeSWITCH-users mailing list 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
I've noticed that session:ready() stays set to true when initiating a call from lua and the end point never picks up or rejects the call: session = freeswitch.Session(DIALSTRING) session:setVariable("caller_id_number", phonenum) session:setVariable("playback_terminators", "#"); session:setHangupHook("hangup"); while (session:ready() == true) do ... <when call is never picked up, session stays true> How do I detect if the call was never accepted? -Neil On Thu, Feb 11, 2010 at 2:51 PM, Mike van Lammeren <mike@van.lammeren.net>wrote:
D'oh!
I am currently working on a project that uses Lua and the native MySQL driver, so as soon as I read this comment, I decided that I had better do a bit of research.
I wrote a Lua test script that makes 10 queries against a MySQL database, then ran it repeatedly.
My results show that "leaks like a sieve" is quite correct. To me, it doesn't look like any memory is released, ever. After only 5000 queries or so, the memory allocated for FreeSWITCH balloons from 15 Mb to 50 Mb, and never goes back down.
Thanks, Brian, for the heads up!
Mike van Lammeren
On Thu, Feb 11, 2010 at 8:26 AM, Brian West <brian@freeswitch.org> wrote:
Yes ODBC doesn't seem to leak... while the native one leaks like a sieve.
/b
On Feb 11, 2010, at 2:56 AM, Nazim Agabekov wrote:
I'm using luasql with ODBC MySQL driver in production. I've never tried to use luasql with "native" mysql driver, but ODBC one works great.
_______________________________________________ FreeSWITCH-users mailing list 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
_______________________________________________ FreeSWITCH-users mailing list 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
Generally you could avoid this by checking session status. Below is an example. function selectAge (langId) session:flushDigits() digits = "" while ("" == digits) do if not session:ready() then return nil end digits = session:playAndGetDigits(2, 3, 1, 5000, "#", wav_base .. langId .. "/" .. age_prompt_wav, wav_base .. langId .. "/" .. age_incorrect_wav, "\\d+"); log("info", "Got dtmf: ".. digits .."\n"); if "" ~= digits then if (age_max < tonumber(digits) or age_min > tonumber(digits) ) then log("info", "Incorrect age: ".. digits ..".. retrying\n"); session:streamFile (wav_base .. langId .. "/" .. age_incorrect_wav) digits = "" end end end log("info", "Got age dtmf: ".. digits .."\n"); return tonumber(digits) end On 02/10/2010 01:17 PM, Chia-Yen Wu wrote:
Hello, i tried to use Lua script to replace xml macro in dialplan, but I found out that Lua wont terminate if client hangup, ,so the session is still on but client is already hangup, is there a way to avoid this ?
_______________________________________________ FreeSWITCH-users mailing list 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
participants (8)
-
Anthony Minessale
-
Brian West
-
Chia-Yen Wu
-
Michael Jerris
-
Mike van Lammeren
-
Nazim Agabekov
-
Neil Patel
-
Nicolas Brenner