[Freeswitch-users] call getting pre-answered

Ruchir Brahmbhatt ruchir.brahmbhatt at ecosmob.com
Sat Sep 13 13:26:29 PDT 2008


I think you should remove following line.
session.answer();

Thanks,
Ruchir Brahmbhatt
Director
Ecosmob Technologies Pvt. Ltd.


-----Original Message-----
From: Gayatri Kulkarni <xtpl.gayatri at gmail.com>
Reply-To: freeswitch-users at lists.freeswitch.org
To: freeswitch-users at lists.freeswitch.org
Subject: [Freeswitch-users] call getting pre-answered
Date: Sat, 13 Sep 2008 07:31:21 -0700

Hi
I am running this script:
 
session.answer();
var fd = new File("temp.txt");
var buff = fd.read(10);
console_log("notice","\nYou are trying to reach "+buff+"\n");
route = "sofia/gateway/net4india/"+buff;
session.execute("bridge", route);
session.waitForAnswer(5000);
console_log("notice", "Disconnect cause: " + session.cause + "\n");
 
Freeswitch does get the number, originates a new hannel for it but it
pre-answers the call !!!!
I am not able to figure out why?!!!!
 
if I read DTMF and bridge the call I.e.
 
route = "sofia/gateway/net4india" + dtmf.digits;
session.execute("bridge", route);

It works perfectly fine!
 
Here's what the console of FS looks like:
 
2008-09-13 07:13:19 [NOTICE] switch_channel.c:534
switch_channel_set_name() New
Channel sofia/internal/1001 at 58.68.117.40
[1eb5e917-82cb-6f4b-96da-ac75a3b2b25c]
2008-09-13 07:13:20 [INFO] mod_dialplan_xml.c:222 dialplan_hunt()
Processing Gay
atri->1200 at default
2008-09-13 07:13:20 [NOTICE] mod_spidermonkey.c:2034 session_answer()
Channel [s
ofia/internal/1001 at 58.68.117.40] has been answered
2008-09-13 07:13:20 [ERR] readFile.js:36 mod_spidermonkey()  File C:
\Program Fil
es\FreeSWITCH\scripts\temp.txt is closed, will open it for reading,
proceeding
2008-09-13 07:13:20 [NOTICE] readFile.js:1 console_log()
You are trying to reach 1408512193
2008-09-13 07:13:21 [NOTICE] switch_channel.c:534
switch_channel_set_name() New
Channel sofia/external/1408512193 [66dddbc2-58e1-3e4e-8a82-4c32cea51156]
2008-09-13 07:13:23 [NOTICE] switch_channel.c:534
switch_channel_set_name() New
Channel sofia/external/455 [f9a48afa-b08a-2941-9b64-3eb949aa6f95]
2008-09-13 07:13:24 [NOTICE] sofia.c:2183 sofia_handle_sip_i_state()
Ring-Ready
sofia/external/1408512193!
2008-09-13 07:13:24 [NOTICE] sofia_glue.c:2027 sofia_glue_tech_media()
Pre-Answe
r sofia/external/1408512193!
2008-09-13 07:13:24 [NOTICE] sofia.c:2561 sofia_handle_sip_i_state()
Hangup sofi
a/external/455 [CS_CONSUME_MEDIA] [CALL_REJECTED]
2008-09-13 07:13:25 [ERR] mod_xml_cdr.c:115 my_on_hangup() Error writing
[C:\Pro
gram Files\FreeSWITCH\log\xml_cdr
\f9a48afa-b08a-2941-9b64-3eb949aa6f95.cdr.xml][
No such file or directory]
2008-09-13 07:13:25 [NOTICE] switch_core_session.c:807
switch_core_session_threa
d() Session 8 (sofia/external/455) Ended
2008-09-13 07:13:25 [NOTICE] switch_core_session.c:809
switch_core_session_threa
d() Close Channel sofia/external/455 [CS_HANGUP]
2008-09-13 07:13:25 [NOTICE] sofia.c:2561 sofia_handle_sip_i_state()
Hangup sofi
a/external/1408512193 [CS_EXCHANGE_MEDIA] [INVALID_NUMBER_FORMAT]
2008-09-13 07:13:26 [NOTICE] switch_core_session.c:807
switch_core_session_threa
d() Session 7 (sofia/external/1408512193) Ended
2008-09-13 07:13:26 [NOTICE] switch_core_session.c:809
switch_core_session_threa
d() Close Channel sofia/external/1408512193 [CS_HANGUP]
2008-09-13 07:13:26 [NOTICE] readFile.js:1 console_log() Disconnect
cause: NONE
2008-09-13 07:13:26 [NOTICE] switch_core_state_machine.c:157
switch_core_standar
d_on_execute() Hangup sofia/internal/1001 at 58.68.117.40 [CS_EXECUTE]
[NORMAL_CLEA
RING]
 
 
if I call the destination with my cell phone, it rings - meaning the set
is in correct place - on hook!
Why would FS find it off-hook?!!
 
Regards,
Gayatri Kulkarni
 
-----
Whenever you find yourself on the side of the majority, it is time to
pause and reflect.

_______________________________________________
Freeswitch-users mailing list
Freeswitch-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080914/2d466024/attachment-0002.html 


More information about the FreeSWITCH-users mailing list