<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><DIV>
<DIV>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:</DIV>
<DIV> </DIV>
<DIV><FONT color=#0060bf> new_session = new Session();<BR> new_session.originate(session, "sofia/gateway/gizmo/1xxxxxxxxxx");</FONT></DIV>
<DIV><FONT color=#0060bf> console_log("info","Waiting for answer!\n");<BR> new_session.waitForAnswer(10000);<BR> console_log("info","***ANSWERED\n");<BR> do {<BR> console_log("info","***Playing file . . . \n");<BR> playFile("we_are_trying_to_reach.wav");</FONT></DIV>
<DIV><FONT color=#0060bf> } while(1);</FONT></DIV>
<DIV> </DIV>
<DIV>When I run this code, the call is answered and it starts playing the file before my phone even starts ringing.</DIV>
<DIV>I'm not sure if it's a bug with waitForAnswer, or a configuration issue on my side.</DIV>
<DIV> </DIV>
<DIV>For the SIP provider, I'm using Gizmo Phone with the following settings in sip_profiles/outbound/gizmo.xml:</DIV>
<DIV> </DIV>
<DIV><FONT color=#0060bf> <include><BR> <gateway name="gizmo"><BR> <param name="username" value="1747xxxxxxx"/><BR> <param name="password" value="xxxxxxx"/><BR> <param name="realm" value="<A href="http://proxy01.sipphone.com/" target=_blank><SPAN class=yshortcuts id=lw_1210293503_0>proxy01.sipphone.com</SPAN></A>"/><BR> <param name="proxy" value="<A href="http://proxy01.sipphone.com/" target=_blank><SPAN class=yshortcuts id=lw_1210293503_1>proxy01.sipphone.com</SPAN></A>"/><BR> <param name="register" value="true"/><BR> </gateway><BR> </include></FONT></DIV>
<DIV> </DIV>
<DIV>I'd really appreciate any help.</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>Marc</DIV>
<DIV><BR> </DIV></DIV></div></body></html>