[Freeswitch-users] What is so dangeres in "freeswitch.msleep()" in LUA?

Dmitry Saratsky simpot at simpot.com
Mon Mar 7 01:48:26 MSK 2011


Hi All,

According to: http://wiki.freeswitch.org/wiki/Mod_lua#freeswitch.msleep
It is not good to use: "freeswitch.msleep()" in session-based script:
NOTE: Do not use this on a session-based script or bad things will happen.

Can anyone explain please why not and what does author mean with "session-based script".

I want to use it inside some function between I originate session and hangup it in the following way:

   repeat
--      os.execute("sleep 1");
        freeswitch.msleep(1000);
        until ((not new_session:ready() == true) or (new_session:getVariable("fax_result_code") >= "0"))
   new_session:hangup();

Is it danger for me to use this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110307/a4fcbe90/attachment.html 


More information about the FreeSWITCH-users mailing list