[Freeswitch-users] waitForAnswer returns too soon
Marc Orenberg
marc at kasteris.com
Thu May 8 17:39:53 PDT 2008
Hello everyone. I'm a new FreeSwitch user, and I'm having a problem with waitForAnswer() with SpiderMonkey. I'm using it to make an outbound call as follows:
new_session = new Session();
new_session.originate(session, "sofia/gateway/gizmo/1xxxxxxxxxx");
console_log("info","Waiting for answer!\n");
new_session.waitForAnswer(10000);
console_log("info","***ANSWERED\n");
do {
console_log("info","***Playing file . . . \n");
playFile("we_are_trying_to_reach.wav");
} while(1);
When I run this code, the call is answered and it starts playing the file before my phone even starts ringing.
I'm not sure if it's a bug with waitForAnswer, or a configuration issue on my side.
For the SIP provider, I'm using Gizmo Phone with the following settings in sip_profiles/outbound/gizmo.xml:
<include>
<gateway name="gizmo">
<param name="username" value="1747xxxxxxx"/>
<param name="password" value="xxxxxxx"/>
<param name="realm" value="proxy01.sipphone.com"/>
<param name="proxy" value="proxy01.sipphone.com"/>
<param name="register" value="true"/>
</gateway>
</include>
I'd really appreciate any help.
Thanks,
Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080508/b43bfa5a/attachment-0002.html
More information about the FreeSWITCH-users
mailing list