<div dir="ltr">Hi,
<br>I am new to freeswitch and trying to run a javascript example
calltest.js.I have put that code inside &nbsp;the folder
/usr/local/freeswitch.I have started the freeswitch and from that
console I have tried to run the program like jsrun
/usr/local/freeswitch/<div dir="ltr">calltest.js.
<br>but i am getting the following error:
<br><br>&nbsp;2008-09-20 15:49:32 [NOTICE] switch_channel.c:534
switch_channel_set_name() New Channel sofia/internal/<a href="mailto:1001@192.168.1.2" target="_blank">1001@192.168.1.2</a>
[d1987c09-ebd2-4590-b072-ce851e4b5794]
<br>2008-09-20 15:49:32 [NOTICE] switch_channel.c:534
switch_channel_set_name() New Channel
sofia/internal/<a href="mailto:0000000000@192.168.1.2" target="_blank">0000000000@192.168.1.2</a>
[c98bc58d-2ef9-4656-8f74-9c024000d18c]
<br>2008-09-20 15:49:32 [INFO] mod_dialplan_xml.c:222 dialplan_hunt() Processing FreeSWITCH-&gt;1001@public
<br>2008-09-20 15:49:32 [ERR] sofia.c:2845 sofia_handle_sip_i_refer() Cannot Blind Transfer 1 Legged calls
<br>2008-09-20 15:49:32 [NOTICE] switch_core_state_machine.c:157
switch_core_standard_on_execute() Hangup
sofia/internal/<a href="mailto:0000000000@192.168.1.2" target="_blank">0000000000@192.168.1.2</a> [CS_EXECUTE] [NORMAL_CLEARING]
<br>2008-09-20 15:49:32 [NOTICE] sofia.c:2545
sofia_handle_sip_i_state() Hangup sofia/internal/<a href="mailto:1001@192.168.1.2" target="_blank">1001@192.168.1.2</a>
[CS_ROUTING] [NO_USER_RESPONSE]
<br>2008-09-20 15:49:32 [NOTICE] switch_core_session.c:807
switch_core_session_thread() Session 23
(sofia/internal/<a href="mailto:0000000000@192.168.1.2" target="_blank">0000000000@192.168.1.2</a>) Ended
<br>2008-09-20 15:49:32 [NOTICE] switch_core_session.c:809
switch_core_session_thread() Close Channel
sofia/internal/<a href="mailto:0000000000@192.168.1.2" target="_blank">0000000000@192.168.1.2</a> [CS_HANGUP]
<br>2008-09-20 15:49:32 [WARNING] mod_spidermonkey.c:2933
session_originate() Cannot Create Outgoing Channel!
[sofia/default/<a href="mailto:1001@192.168.1.2" target="_blank">1001@192.168.1.2</a>]
<br>2008-09-20 15:49:32 [ERR] inline:1 mod_spidermonkey() &nbsp;You must call the session.originate method before calling this method!
<br>2008-09-20 15:49:32 [NOTICE] switch_core_session.c:807
switch_core_session_thread() Session 22
(sofia/internal/<a href="mailto:1001@192.168.1.2" target="_blank">1001@192.168.1.2</a>) Ended
<br>2008-09-20 15:49:32 [NOTICE] switch_core_session.c:809
switch_core_session_thread() Close Channel
sofia/internal/<a href="mailto:1001@192.168.1.2" target="_blank">1001@192.168.1.2</a> [CS_HANGUP]
<br><br>the code is:
<br>new_session = new Session();
<br><br>new_session.originate(session, &quot;sofia/default/<a href="mailto:1001@192.168.1.2" target="_blank">1001@192.168.1.2</a>&quot;);
<br><br>new_session = new Session(session, &quot;sofia/default/<a href="mailto:1001@192.168.1.2" target="_blank">1001@192.168.1.2</a>&quot;);
<br><br>// wait for it ... answer
<br>new_session.waitForAnswer(10000);
<br><br>// IF everybody is ready, then bridge our current session &amp; the new_session
<br>if (session.ready() &amp;&amp; new_session.ready()) {
<br>&nbsp; &nbsp; bridge(session, new_session);
<br>}
<br><br>// log to the console
<br>console_log(&quot;***********Voila!\n&quot;);
<br><br>// hangup when done
<br>new_session.hangup();
<br><br><br>Is there anything i have to add to the program or any other requirements are needed to run this javascript successfully?
<br>please assist me to do this. </div></div>