Re: [Freeswitch-users] Putting javascript to sleep
Thanks Anthony, the msleep function is really nice, but I have some problems getting it to work. Somehow it fucks up the system, which becomes unresponsive after I have run it in a javascript. Should I just wait for the next release, or do you want a more detailed error report through the appropriate channels? /Jon
i don't know what you are talking about exactly i made this script test.js for(x = 0; x < 10; x++) { msleep(1000); consoleLog("info", "ITERATION " + (x + 1) + "\n"); } consoleLog("info", "DONE"); and did jsrun /path/to/test.js and it seems to work fine. On Sat, Nov 15, 2008 at 2:05 AM, Jon Bruel <jbr@consiglia.dk> wrote:
Thanks Anthony, the msleep function is really nice, but I have some problems getting it to work. Somehow it fucks up the system, which becomes unresponsive after I have run it in a javascript. Should I just wait for the next release, or do you want a more detailed error report through the appropriate channels? /Jon
_______________________________________________ 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/ 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:213-799-1400
Hi all, I noticed before that in order to sleep for 6 seconds I have to call msleep(600); and NOT msleep(6000); So I created the script /usr/local/freeswitch/scripts/sleep6.js: consoleLog("info", "sleep"); msleep(600); consoleLog("info", "after 600"); msleep(6000); consoleLog("info", "after 6000"); and when I run it jsrun sleep6.js I get the following output: 2008-11-17 14:25:08 [INFO] sleep6.js:1 console_log() sleep 2008-11-17 14:25:13 [INFO] sleep6.js:1 console_log() after 600 2008-11-17 14:26:01 [INFO] sleep6.js:1 console_log() after 6000 (I removed the prompt from the output for easy reading) Cheers, Birgit On 15/11/08 17:23, Anthony Minessale wrote:
i don't know what you are talking about exactly
i made this script test.js
for(x = 0; x < 10; x++) { msleep(1000); consoleLog("info", "ITERATION " + (x + 1) + "\n"); }
consoleLog("info", "DONE");
and did jsrun /path/to/test.js
and it seems to work fine.
On Sat, Nov 15, 2008 at 2:05 AM, Jon Bruel <jbr@consiglia.dk <mailto:jbr@consiglia.dk>> wrote:
Thanks Anthony, the msleep function is really nice, but I have some problems getting it to work. Somehow it fucks up the system, which becomes unresponsive after I have run it in a javascript. Should I just wait for the next release, or do you want a more detailed error report through the appropriate channels? /Jon
-- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- Company no: 1769350 -- Registered Office: -- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK. -- tel.: +44 (0)161 237 0660 -- <URL: http://www.westhawk.co.uk>
participants (3)
-
Anthony Minessale
-
Birgit Arkesteijn
-
Jon Bruel