new_session = new Session("", "sofia/test/888@10.200.68.194"); new_session.waitForAnswer(10000); for(x = 0; x < 3; x++) { if(new_session.ready) { console_log("hello " + new_session.state + "\n"); new_session.speak("cepstral", "david", "Hello I am a prank caller generated from javascript, boo"); console_log("hello " + new_session.state + "\n"); } } console_log("bye " + new_session.state + "\n"); new_session.hangup();