<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.18.1">
</HEAD>
<BODY BGCOLOR="#ffffff" LEFTMARGIN="0" TOPMARGIN="0">
I think you should remove following line.<BR>
&#65279;<B><FONT SIZE="2">session.answer();</FONT></B><BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<BR>
Thanks,<BR>
Ruchir Brahmbhatt<BR>
Director<BR>
Ecosmob Technologies Pvt. Ltd.
</TD>
</TR>
</TABLE>
<BR>
<BR>
-----Original Message-----<BR>
<B>From</B>: Gayatri Kulkarni &lt;<A HREF="mailto:Gayatri%20Kulkarni%20%3cxtpl.gayatri@gmail.com%3e">xtpl.gayatri@gmail.com</A>&gt;<BR>
<B>Reply-To</B>: <A HREF="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</A><BR>
<B>To</B>: <A HREF="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</A><BR>
<B>Subject</B>: [Freeswitch-users] call getting pre-answered<BR>
<B>Date</B>: Sat, 13 Sep 2008 07:31:21 -0700<BR>
<BR>
<FONT SIZE="2">Hi</FONT>
<FONT SIZE="2">I am running this script:</FONT>
&nbsp;
<B><FONT SIZE="2">session.answer();</FONT></B><BR>
<B><FONT SIZE="2">var fd = new File(&quot;temp.txt&quot;);</FONT></B><BR>
<B><FONT SIZE="2">var buff = fd.read(10);</FONT></B><BR>
<B><FONT SIZE="2">console_log(&quot;notice&quot;,&quot;\nYou are trying to reach &quot;+buff+&quot;\n&quot;);</FONT></B><BR>
<B><FONT SIZE="2">route = &quot;sofia/gateway/net4india/&quot;+buff;</FONT></B><BR>
<B><FONT SIZE="2">session.execute(&quot;bridge&quot;, route);</FONT></B><BR>
<B><FONT SIZE="2">session.waitForAnswer(5000);</FONT></B><BR>
<B><FONT SIZE="2">console_log(&quot;notice&quot;, &quot;Disconnect cause: &quot; + session.cause + &quot;\n&quot;);</FONT></B>
&nbsp;
<FONT SIZE="2">Freeswitch does get the number, originates a new hannel for it but it pre-answers the call !!!!</FONT>
<FONT SIZE="2">I am not able to figure out why?!!!!</FONT>
&nbsp;
<FONT SIZE="2">if I read DTMF and bridge the call I.e.</FONT>
&nbsp;
<B><FONT SIZE="2">route = &quot;sofia/gateway/net4india&quot; + dtmf.digits;</FONT></B>
<B><FONT SIZE="2">session.execute(&quot;bridge&quot;, route);</FONT></B><BR>
<BR>
<FONT SIZE="2">It </FONT><U><FONT SIZE="2">works perfectly fine!</FONT></U>
&nbsp;
<FONT SIZE="2">Here's what the&nbsp;console of FS looks like:</FONT>
&nbsp;
2008-09-13 07:13:19 [NOTICE] switch_channel.c:534 switch_channel_set_name() New<BR>
Channel <A HREF="mailto:sofia/internal/1001@58.68.117.40">sofia/internal/1001@58.68.117.40</A> [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>
<A HREF="mailto:ofia/internal/1001@58.68.117.40">ofia/internal/1001@58.68.117.40</A>] 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>
<B>You are trying to reach 1408512193</B><BR>
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>
<B>2008-09-13 07:13:23 [NOTICE] switch_channel.c:534 switch_channel_set_name() New</B><BR>
<B>Channel sofia/external/455 [f9a48afa-b08a-2941-9b64-3eb949aa6f95]</B><BR>
<B>2008-09-13 07:13:24 [NOTICE] sofia.c:2183 sofia_handle_sip_i_state() Ring-Ready</B><BR>
<B>sofia/external/1408512193!</B><BR>
<B>2008-09-13 07:13:24 [NOTICE] sofia_glue.c:2027 sofia_glue_tech_media() Pre-Answe</B><BR>
<B>r sofia/external/1408512193!</B><BR>
<B>2008-09-13 07:13:24 [NOTICE] sofia.c:2561 sofia_handle_sip_i_state() Hangup sofi</B><BR>
<B>a/external/455 [CS_CONSUME_MEDIA] [CALL_REJECTED]</B><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>
<B>2008-09-13 07:13:26 [NOTICE] readFile.js:1 console_log() Disconnect cause: NONE</B><BR>
2008-09-13 07:13:26 [NOTICE] switch_core_state_machine.c:157 switch_core_standar<BR>
d_on_execute() Hangup <A HREF="mailto:sofia/internal/1001@58.68.117.40">sofia/internal/1001@58.68.117.40</A> [CS_EXECUTE] [NORMAL_CLEA<BR>
RING]
&nbsp;
&nbsp;
<FONT SIZE="2">if I call the destination with my cell phone, it rings - meaning the set is in correct place - on hook!</FONT>
<FONT SIZE="2">Why would FS find it off-hook?!!</FONT>
&nbsp;
<FONT SIZE="2">Regards,</FONT><BR>
<FONT SIZE="2">Gayatri Kulkarni</FONT>
&nbsp;
<FONT SIZE="2">-----</FONT><BR>
<FONT SIZE="2">Whenever you find yourself on the side of the majority, it is time to pause and reflect.</FONT><BR>
<BR>
<PRE>
_______________________________________________
Freeswitch-users mailing list
<A HREF="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</A>
<A HREF="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A>
UNSUBSCRIBE:<A HREF="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</A>
<A HREF="http://www.freeswitch.org">http://www.freeswitch.org</A>
</PRE>
</BODY>
</HTML>