<font color="#0060bf">This block :<br><br> new_session = new Session();<br> new_session.originate(session, "sofia/gateway/gizmo/1xxxxxxxxxx");</font>
<div><font color="#0060bf"> console_log("info","Waiting for answer!\n");<br> new_session.waitForAnswer(10000);<br> console_log("info","***ANSWERED\n");<br><br>Can be refactored to:<br>
<br></font><font color="#0060bf"> new_session = new Session();<br></font><font color="#0060bf"> console_log("info","Waiting for answer!\n");</font><br><font color="#0060bf"> new_session.originate(session, "{ignore_early_media=true}sofia/gateway/gizmo/1xxxxxxxxxx");</font>
<div><font color="#0060bf"> console_log("info","***ANSWERED\n");<br><br>Can be refactored to:<br></font><font color="#0060bf"><br> console_log("info","Waiting for answer!\n");</font><br>
<font color="#0060bf"> new_session = new Session(</font><font color="#0060bf">"{ignore_early_media=true}sofia/gateway/gizmo/1xxxxxxxxxx");</font>
<div><font color="#0060bf"> console_log("info","***ANSWERED\n");<br>
</font></div><br></div>
You may want to compare the console log with debug level (press f8 on cli) and start FS with TPORT_LOG=1 env var set.<br>Many voip providers mistakenly answer calls on the inbound SIP leg before bridging it to the PSTN.<br>
You should be able to see the SIP dialog and other console lines telling you if the call was actually answered or not.<br><br><font color="#0060bf"><br></font></div><br><div class="gmail_quote">On Fri, May 9, 2008 at 12:56 AM, Jonathan Palley <<a href="mailto:jpalley@idapted.com">jpalley@idapted.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I think you want:<br>
<br>
ignore_early_media=true<br>
<font color="#888888"><br>
JP<br>
</font><div><div></div><div class="Wj3C7c">On May 9, 2008, at 1:29 PM, Jonas Gauffin wrote:<br>
<br>
> Doesn't that just allow media to be sent before a 200 ok? In that<br>
> case, it doesn't solve the waitForAnswer problem?<br>
><br>
> On Fri, May 9, 2008 at 7:05 AM, Leonardo Alves<br>
> <<a href="mailto:leoalves@teltec.com.br">leoalves@teltec.com.br</a>> wrote:<br>
>> Try using the parameter early_media=true<br>
>> From: Marc Orenberg<br>
>> Sent: Thursday, May 08, 2008 9:39 PM<br>
>> To: <a href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
>> Subject: [Freeswitch-users] waitForAnswer returns too soon<br>
>> Hello everyone. I'm a new FreeSwitch user, and I'm having a<br>
>> problem with<br>
>> waitForAnswer() with SpiderMonkey. I'm using it to make an<br>
>> outbound call as<br>
>> follows:<br>
>><br>
>> new_session = new Session();<br>
>> new_session.originate(session, "sofia/gateway/gizmo/<br>
>> 1xxxxxxxxxx");<br>
>> 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");<br>
>> } while(1);<br>
>><br>
>> When I run this code, the call is answered and it starts playing<br>
>> the file<br>
>> before my phone even starts ringing.<br>
>> I'm not sure if it's a bug with waitForAnswer, or a configuration<br>
>> issue on<br>
>> my side.<br>
>><br>
>> For the SIP provider, I'm using Gizmo Phone with the following<br>
>> settings in<br>
>> sip_profiles/outbound/gizmo.xml:<br>
>><br>
>> <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">proxy01.sipphone.com</a>"/><br>
>> <param name="proxy" value="<a href="http://proxy01.sipphone.com" target="_blank">proxy01.sipphone.com</a>"/><br>
>> <param name="register" value="true"/><br>
>> </gateway><br>
>> </include><br>
>><br>
>> I'd really appreciate any help.<br>
>><br>
>> Thanks,<br>
>> Marc<br>
>><br>
>><br>
>> ________________________________<br>
>><br>
>> _______________________________________________<br>
>> Freeswitch-users mailing list<br>
>> <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-</a><br>
>> users<br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>><br>
>> _______________________________________________<br>
>> Freeswitch-users mailing list<br>
>> <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-</a><br>
>> users<br>
>> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
>><br>
>><br>
><br>
> _______________________________________________<br>
> Freeswitch-users mailing list<br>
> <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-</a><br>
> users<br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400