<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6000.16705" name=GENERATOR></HEAD>
<BODY id=MailContainerBody 
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" 
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true" 
name="Compose message area">
<DIV><FONT face=Arial size=2>Hi</FONT></DIV>
<DIV><FONT face=Arial size=2>I am running this script:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="MS Serif" size=2><STRONG>session.answer();<BR>var fd = new 
File("temp.txt");<BR>var buff = fd.read(10);<BR>console_log("notice","\nYou are 
trying to reach "+buff+"\n");<BR>route = 
"sofia/gateway/net4india/"+buff;<BR>session.execute("bridge", 
route);<BR>session.waitForAnswer(5000);<BR>console_log("notice", "Disconnect 
cause: " + session.cause + "\n");</STRONG></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Freeswitch does get the number, originates a new 
hannel for it but it pre-answers the call !!!!</FONT></DIV>
<DIV><FONT face=Arial size=2>I am not able to figure out why?!!!!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>if I read DTMF and bridge the call 
I.e.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="MS Serif" size=2><STRONG>route = "sofia/gateway/net4india" + 
dtmf.digits;</STRONG></FONT></DIV>
<DIV><FONT face="MS Serif" size=2><STRONG>session.execute("bridge", 
route);<BR></STRONG></FONT></DIV>
<DIV><FONT face=Arial size=2>It <U>works perfectly fine!</U></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Here's what the&nbsp;console of FS looks 
like:</DIV></FONT>
<DIV>&nbsp;</DIV>
<DIV><FONT face="MS Serif">2008-09-13 07:13:19 [NOTICE] switch_channel.c:534 
switch_channel_set_name() New<BR>Channel </FONT><A 
title="mailto:sofia/internal/1001@58.68.117.40&#10;CTRL + Click to follow link" 
href="mailto:sofia/internal/1001@58.68.117.40"><FONT 
title="mailto:sofia/internal/1001@58.68.117.40&#10;CTRL + Click to follow link" 
face="MS Serif">sofia/internal/1001@58.68.117.40</FONT></A><FONT 
face="MS Serif"> [1eb5e917-82cb-6f4b-96da-ac75a3b2b25c]<BR>2008-09-13 07:13:20 
[INFO] mod_dialplan_xml.c:222 dialplan_hunt() Processing 
Gay<BR>atri-&gt;1200@default<BR>2008-09-13 07:13:20 [NOTICE] 
mod_spidermonkey.c:2034 session_answer() Channel [s<BR></FONT><A 
href="mailto:ofia/internal/1001@58.68.117.40"><FONT 
title="mailto:ofia/internal/1001@58.68.117.40&#10;CTRL + Click to follow link" 
face="MS Serif">ofia/internal/1001@58.68.117.40</FONT></A><FONT 
face="MS Serif">] has been answered<BR>2008-09-13 07:13:20 [ERR] readFile.js:36 
mod_spidermonkey()&nbsp; File C:\Program Fil<BR>es\FreeSWITCH\scripts\temp.txt 
is closed, will open it for reading, proceeding<BR>2008-09-13 07:13:20 [NOTICE] 
readFile.js:1 console_log()<BR><STRONG>You are trying to reach 
1408512193<BR></STRONG>2008-09-13 07:13:21 [NOTICE] switch_channel.c:534 
switch_channel_set_name() New<BR>Channel sofia/external/1408512193 
[66dddbc2-58e1-3e4e-8a82-4c32cea51156]<BR><STRONG>2008-09-13 07:13:23 [NOTICE] 
switch_channel.c:534 switch_channel_set_name() New<BR>Channel sofia/external/455 
[f9a48afa-b08a-2941-9b64-3eb949aa6f95]<BR>2008-09-13 07:13:24 [NOTICE] 
sofia.c:2183 sofia_handle_sip_i_state() 
Ring-Ready<BR>sofia/external/1408512193!<BR>2008-09-13 07:13:24 [NOTICE] 
sofia_glue.c:2027 sofia_glue_tech_media() Pre-Answe<BR>r 
sofia/external/1408512193!<BR>2008-09-13 07:13:24 [NOTICE] sofia.c:2561 
sofia_handle_sip_i_state() Hangup sofi<BR>a/external/455 [CS_CONSUME_MEDIA] 
[CALL_REJECTED]</STRONG><BR>2008-09-13 07:13:25 [ERR] mod_xml_cdr.c:115 
my_on_hangup() Error writing [C:\Pro<BR>gram 
Files\FreeSWITCH\log\xml_cdr\f9a48afa-b08a-2941-9b64-3eb949aa6f95.cdr.xml][<BR>No 
such file or directory]<BR>2008-09-13 07:13:25 [NOTICE] 
switch_core_session.c:807 switch_core_session_threa<BR>d() Session 8 
(sofia/external/455) Ended<BR>2008-09-13 07:13:25 [NOTICE] 
switch_core_session.c:809 switch_core_session_threa<BR>d() Close Channel 
sofia/external/455 [CS_HANGUP]<BR>2008-09-13 07:13:25 [NOTICE] sofia.c:2561 
sofia_handle_sip_i_state() Hangup sofi<BR>a/external/1408512193 
[CS_EXCHANGE_MEDIA] [INVALID_NUMBER_FORMAT]<BR>2008-09-13 07:13:26 [NOTICE] 
switch_core_session.c:807 switch_core_session_threa<BR>d() Session 7 
(sofia/external/1408512193) Ended<BR>2008-09-13 07:13:26 [NOTICE] 
switch_core_session.c:809 switch_core_session_threa<BR>d() Close Channel 
sofia/external/1408512193 [CS_HANGUP]<BR><STRONG>2008-09-13 07:13:26 [NOTICE] 
readFile.js:1 console_log() Disconnect cause: NONE<BR></STRONG>2008-09-13 
07:13:26 [NOTICE] switch_core_state_machine.c:157 
switch_core_standar<BR>d_on_execute() Hangup </FONT><A 
href="mailto:sofia/internal/1001@58.68.117.40"><FONT 
face="MS Serif">sofia/internal/1001@58.68.117.40</FONT></A><FONT 
face="MS Serif"> [CS_EXECUTE] [NORMAL_CLEA<BR>RING]</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>if I call the destination with my cell phone, it 
rings - meaning the set is in correct place - on hook!</FONT></DIV>
<DIV><FONT face=Arial size=2>Why would FS find it off-hook?!!</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Regards,<BR>Gayatri Kulkarni</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>-----<BR>Whenever you find yourself on the side of 
the majority, it is time to pause and reflect.<BR></FONT></DIV></BODY></HTML>