Are you using the transfer app from your javascript?<br>If so, and the script is running on the target channel that is being transferred it will cause the script to exit because <br>transfer is effectively hangup as the act of transfer stops all execution of apps and sends the call to the dialplan.<br>
<br>You can instead session.execute(&quot;execute_extenson&quot;, &quot;1000&quot;);<br>Which unlike transfer runs the extension inline and returns back to the same place.<br><br><div class="gmail_quote">On Wed, Apr 16, 2008 at 8:29 AM, Jonas Gauffin &lt;<a href="mailto:jonas.gauffin@gmail.com">jonas.gauffin@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello again =)<br>
<br>
I&#39;ve made a call queue in javascript where the js takes orders from a<br>
server through a socket.<br>
The server monitors all extensions (through eventsocket) in the queue<br>
and tells the javascript to originate the call to a extension as soon<br>
as it becomes idle.<br>
<br>
Everything works fine except when the extension do not answer.<br>
Freeswitch seems to kill the javascript and executes the dialplan<br>
instead.<br>
This only happens when the destination do not answer.<br>
<br>
Small log (from when entering the javascript and forward)<br>
<br>
2008-04-16 15:21:01 [CONSOLE] mod_spidermonkey_socket.c:109<br>
socket_connect() Connecting to: <a href="http://127.0.0.1:23341" target="_blank">127.0.0.1:23341</a>.<br>
2008-04-16 15:21:01 [DEBUG] switch_core_session.c:383<br>
switch_core_session_receive_message() Kill<br>
sofia/default/anonymous@anonymous.invalid [BREAK]<br>
2008-04-16 15:21:01 [NOTICE] mod_spidermonkey.c:1948 session_answer()<br>
Channel [sofia/default/anonymous@anonymous.invalid] has been answered<br>
2008-04-16 15:21:01 [DEBUG] mod_spidermonkey.c:3132 js_api_use() Loading Socket<br>
2008-04-16 15:21:01 [DEBUG] log.js:7 console_log() DEBUG: Sending register<br>
2008-04-16 15:21:01 [DEBUG] sofia.c:1648 sofia_handle_sip_i_state()<br>
Channel sofia/default/anonymous@anonymous.invalid entering state<br>
[completed]<br>
2008-04-16 15:21:01 [DEBUG] sofia.c:1648 sofia_handle_sip_i_state()<br>
Channel sofia/default/anonymous@anonymous.invalid entering state<br>
[ready]<br>
2008-04-16 15:21:02 [DEBUG] log.js:7 console_log() DEBUG: Receivied:<br>
transfer &nbsp; 20 &nbsp; &nbsp; &nbsp;<a href="http://192.168.1.110" target="_blank">192.168.1.110</a> &nbsp; u1000022<br>
2008-04-16 15:21:02 [DEBUG] log.js:7 console_log() DEBUG: Calling<br>
sofia/<a href="http://192.168.1.110/u10000222008-04-16" target="_blank">192.168.1.110/u1000022<br>
2008-04-16</a> 15:21:02 [DEBUG] log.js:7 console_log() DEBUG: DESTINATION:<br>
{ignore_early_media=true,originate_timeout=15}sofia/<a href="http://192.168.1.110/u10000222008-04-16" target="_blank">192.168.1.110/u1000022<br>
2008-04-16</a> 15:21:02 [DEBUG] switch_ivr_originate.c:607<br>
switch_ivr_originate() variable string 0 = [ignore_early_media=true]<br>
2008-04-16 15:21:02 [DEBUG] switch_ivr_originate.c:607<br>
switch_ivr_originate() variable string 1 = [originate_timeout=15]<br>
2008-04-16 15:21:02 [NOTICE] switch_channel.c:531<br>
switch_channel_set_name() New Channel sofia/default/u1000022<br>
[91daaf25-4f6f-8848-8d10-596f45c13238]<br>
2008-04-16 15:21:02 [DEBUG] mod_sofia.c:1830 sofia_outgoing_channel()<br>
sofia/default/u1000022 State Change CS_NEW -&gt; CS_INIT<br>
2008-04-16 15:21:02 [DEBUG] switch_core_session.c:670<br>
switch_core_session_signal_state_change() Kill sofia/default/u1000022<br>
[BREAK]<br>
2008-04-16 15:21:02 [DEBUG] switch_core_state_machine.c:364<br>
switch_core_session_run() sofia/default/u1000022 Running State Change<br>
CS_INIT<br>
2008-04-16 15:21:02 [DEBUG] switch_core_state_machine.c:413<br>
switch_core_session_run() (sofia/default/u1000022) State INIT<br>
2008-04-16 15:21:02 [DEBUG] mod_sofia.c:80 sofia_on_init()<br>
sofia/default/u1000022 SOFIA INIT<br>
2008-04-16 15:21:02 [DEBUG] mod_sofia.c:107 sofia_on_init()<br>
sofia/default/u1000022 State Change CS_INIT -&gt; CS_RING<br>
2008-04-16 15:21:02 [DEBUG] switch_core_session.c:670<br>
switch_core_session_signal_state_change() Kill sofia/default/u1000022<br>
[BREAK]<br>
2008-04-16 15:21:02 [DEBUG] switch_core_state_machine.c:413<br>
switch_core_session_run() (sofia/default/u1000022) State INIT going to<br>
sleep<br>
2008-04-16 15:21:02 [DEBUG] switch_core_state_machine.c:364<br>
switch_core_session_run() sofia/default/u1000022 Running State Change<br>
CS_RING<br>
2008-04-16 15:21:02 [DEBUG] sofia.c:222 sofia_event_callback() event<br>
[nua_i_state] status [0][INVITE sent] session: sofia/default/u1000022<br>
2008-04-16 15:21:02 [DEBUG] sofia.c:1648 sofia_handle_sip_i_state()<br>
Channel sofia/default/u1000022 entering state [calling]<br>
2008-04-16 15:21:02 [DEBUG] switch_ivr_originate.c:951<br>
switch_ivr_originate() Raw Codec Activation Success L16@8000hz 1<br>
channel 20ms<br>
2008-04-16 15:21:02 [DEBUG] switch_core_state_machine.c:418<br>
switch_core_session_run() (sofia/default/u1000022) State RING<br>
2008-04-16 15:21:02 [DEBUG] mod_sofia.c:119 sofia_on_ring()<br>
sofia/default/u1000022 SOFIA RING<br>
2008-04-16 15:21:02 [DEBUG] switch_ivr_originate.c:55<br>
originate_on_ring() sofia/default/u1000022 State Change CS_RING -&gt;<br>
CS_HOLD<br>
2008-04-16 15:21:02 [DEBUG] switch_core_session.c:670<br>
switch_core_session_signal_state_change() Kill sofia/default/u1000022<br>
[BREAK]<br>
2008-04-16 15:21:02 [DEBUG] switch_core_state_machine.c:418<br>
switch_core_session_run() (sofia/default/u1000022) State RING going to<br>
sleep<br>
2008-04-16 15:21:02 [DEBUG] switch_core_state_machine.c:364<br>
switch_core_session_run() sofia/default/u1000022 Running State Change<br>
CS_HOLD<br>
2008-04-16 15:21:02 [DEBUG] switch_core_state_machine.c:440<br>
switch_core_session_run() (sofia/default/u1000022) State HOLD<br>
2008-04-16 15:21:02 [DEBUG] sofia.c:222 sofia_event_callback() event<br>
[nua_r_invite] status [180][Ringing] session: sofia/default/u1000022<br>
2008-04-16 15:21:02 [DEBUG] sofia.c:222 sofia_event_callback() event<br>
[nua_i_state] status [180][Ringing] session: sofia/default/u1000022<br>
2008-04-16 15:21:02 [DEBUG] sofia.c:1648 sofia_handle_sip_i_state()<br>
Channel sofia/default/u1000022 entering state [proceeding]<br>
2008-04-16 15:21:02 [NOTICE] sofia.c:1686 sofia_handle_sip_i_state()<br>
Ring-Ready sofia/default/u1000022!<br>
2008-04-16 15:21:02 [DEBUG] switch_core_session.c:383<br>
switch_core_session_receive_message() Kill<br>
sofia/default/anonymous@anonymous.invalid [BREAK]<br>
2008-04-16 15:21:02 [DEBUG] sofia.c:350 sofia_event_callback()<br>
nua_r_prack: unknown event 39: 200 OK<br>
2008-04-16 15:21:33 [DEBUG] sofia.c:1648 sofia_handle_sip_i_state()<br>
Channel sofia/default/u1000022 entering state [calling]<br>
2008-04-16 15:21:33 [NOTICE] switch_channel.c:531<br>
switch_channel_set_name() New Channel sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a><br>
[e59265ba-8486-7546-af60-8da7b25e87<br>
2008-04-16 15:21:33 [DEBUG] sofia.c:1648 sofia_handle_sip_i_state()<br>
Channel sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a> entering state [received]<br>
2008-04-16 15:21:33 [DEBUG] switch_core_state_machine.c:364<br>
switch_core_session_run() sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a> Running<br>
State Change CS_NEW<br>
2008-04-16 15:21:33 [DEBUG] sofia.c:1652 sofia_handle_sip_i_state() Remote SDP:<br>
v=0<br>
o=FreeSWITCH 4934107701406015977 4314135494661389300 IN IP4 <a href="http://192.168.1.110" target="_blank">192.168.1.110</a><br>
s=FreeSWITCH<br>
c=IN IP4 <a href="http://192.168.1.110" target="_blank">192.168.1.110</a><br>
t=0 0<br>
a=sendrecv<br>
m=audio 25866 RTP/AVP 0 8 9 101 13<br>
a=rtpmap:0 PCMU/8000<br>
a=rtpmap:8 PCMA/8000<br>
a=rtpmap:9 G722/8000<br>
a=rtpmap:101 telephone-event/8000<br>
a=fmtp:101 0-16<br>
a=rtpmap:13 CN/8000<br>
a=ptime:20<br>
<br>
2008-04-16 15:21:33 [DEBUG] sofia_glue.c:2011<br>
sofia_glue_negotiate_sdp() Audio Codec Compare<br>
[PCMU:0:8000]/[PCMU:0:8000]<br>
2008-04-16 15:21:33 [DEBUG] sofia_glue.c:1333<br>
sofia_glue_tech_set_codec() Set Codec sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a><br>
PCMU/8000 20 ms 160 samples<br>
2008-04-16 15:21:33 [DEBUG] switch_core_state_machine.c:368<br>
switch_core_session_run() (sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a>) State NEW<br>
2008-04-16 15:21:33 [DEBUG] sofia_glue.c:1975<br>
sofia_glue_negotiate_sdp() Set 2833 dtmf payload to 101<br>
2008-04-16 15:21:33 [DEBUG] sofia_glue.c:1983<br>
sofia_glue_negotiate_sdp() Set comfort noise payload to 13<br>
2008-04-16 15:21:33 [DEBUG] sofia.c:1789 sofia_handle_sip_i_state()<br>
sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a> State Change CS_NEW -&gt; CS_INIT<br>
2008-04-16 15:21:33 [DEBUG] switch_core_session.c:670<br>
switch_core_session_signal_state_change() Kill<br>
sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a> [BREAK]<br>
2008-04-16 15:21:33 [DEBUG] switch_core_state_machine.c:364<br>
switch_core_session_run() sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a> Running<br>
State Change CS_INIT<br>
2008-04-16 15:21:33 [DEBUG] switch_core_state_machine.c:413<br>
switch_core_session_run() (sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a>) State<br>
INIT<br>
2008-04-16 15:21:33 [DEBUG] mod_sofia.c:80 sofia_on_init()<br>
sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a> SOFIA INIT<br>
2008-04-16 15:21:33 [DEBUG] mod_sofia.c:107 sofia_on_init()<br>
sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a> State Change CS_INIT -&gt; CS_RING<br>
2008-04-16 15:21:33 [DEBUG] switch_core_session.c:670<br>
switch_core_session_signal_state_change() Kill<br>
sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a> [BREAK]<br>
2008-04-16 15:21:33 [DEBUG] switch_core_state_machine.c:413<br>
switch_core_session_run() (sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a>) State<br>
INIT going to sleep<br>
2008-04-16 15:21:33 [DEBUG] switch_core_state_machine.c:364<br>
switch_core_session_run() sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a> Running<br>
State Change CS_RING<br>
2008-04-16 15:21:33 [DEBUG] switch_core_state_machine.c:418<br>
switch_core_session_run() (sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a>) State<br>
RING<br>
2008-04-16 15:21:33 [DEBUG] mod_sofia.c:119 sofia_on_ring()<br>
sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a> SOFIA RING<br>
2008-04-16 15:21:33 [DEBUG] switch_core_state_machine.c:65<br>
switch_core_standard_on_ring() Standard RING<br>
sofia/default/<a href="mailto:1202@192.168.1.110">1202@192.168.1.110</a><br>
2008-04-16 15:21:33 [INFO] mod_dialplan_xml.c:223 dialplan_hunt()<br>
Processing Arne Rubin-&gt;82378009@public<br>
2008-04-16 15:21:35 [DEBUG] mod_dialplan_xml.c:107 parse_exten() test<br>
conditions destination_number(82378009) =~ /^\+4623666(12[01][0-9])$/<br>
2008-04-16 15:21:35 [DEBUG] mod_dialplan_xml.c:109 parse_exten() Regex mismatch<br>
2008-04-16 15:21:35 [DEBUG] mod_dialplan_xml.c:107 parse_exten() test<br>
conditions destination_number(82378009) =~ /^(5551212)$/<br>
2008-04-16 15:21:35 [DEBUG] mod_dialplan_xml.c:109 parse_exten() Regex mismatch<br>
2008-04-16 15:21:35 [DEBUG] mod_dialplan_xml.c:107 parse_exten() test<br>
conditions destination_number(82378009) =~ /1202/<br>
2008-04-16 15:21:35 [DEBUG] mod_dialplan_xml.c:109 parse_exten() Regex mismatch<br>
2008-04-16 15:21:35 [INFO] switch_core_state_machine.c:113<br>
switch_core_standard_on_ring() No Route, Aborting<br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400