[Freeswitch-users] waitForAnswer returns too soon

Leonardo Alves leoalves at teltec.com.br
Fri May 9 01:05:45 EDT 2008


Try using the parameter early_media=true


From: Marc Orenberg 
Sent: Thursday, May 08, 2008 9:39 PM
To: freeswitch-users at lists.freeswitch.org 
Subject: [Freeswitch-users] waitForAnswer returns too soon


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

 


--------------------------------------------------------------------------------


_______________________________________________
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/20080509/9d3475df/attachment.html 


More information about the Freeswitch-users mailing list