<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 style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif">Thanks for the help everyone.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif">You were right Anthony. I put the relevant section of the trace below. I also got ahold of a VoicePulse line and tried it, and it worked fine.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif">I really appreciate it!</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif">Trace from my Gizmo line:</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif">2008-05-09 11:30:32 [DEBUG] sofia.c:222 sofia_event_callback() event [nua_i_state] status [0][INVITE sent] session: sofia/outbound/17818640108<BR>2008-05-09 11:30:32 [DEBUG] sofia.c:1714 sofia_handle_sip_i_state() Channel sofia/outbound/17818640108 entering state [calling]<BR>2008-05-09 11:30:34 [DEBUG] sofia.c:1714 sofia_handle_sip_i_state() Channel sofia/outbound/17818640108 entering state [ready]<BR>2008-05-09 11:30:34 [DEBUG] sofia.c:1718 sofia_handle_sip_i_state() Remote SDP:<BR>v=0<BR>o=root 3158 3158 IN IP4 130.94.88.90<BR>s=session<BR>c=IN IP4 130.94.88.90<BR>t=0 0<BR>m=audio 17186 RTP/AVP 0 8 101<BR>a=rtpmap:0 PCMU/8000<BR>a=rtpmap:8 PCMA/8000<BR>a=rtpmap:101 telephone-event/8000<BR>a=fmtp:101 0-16<BR>a=silenceSupp:off - - - -</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif">2008-05-09 11:30:34 [DEBUG] sofia_glue.c:2024 sofia_glue_negotiate_sdp() Audio Codec Compare [PCMU:0:8000]/[PCMU:0:8000]<BR>2008-05-09 11:30:34 [DEBUG] sofia_glue.c:1333 sofia_glue_tech_set_codec() Set Codec sofia/outbound/17818640108 PCMU/8000 20 ms 160 samples<BR>2008-05-09 11:30:34 [DEBUG] sofia_glue.c:1988 sofia_glue_negotiate_sdp() Set 2833 dtmf payload to 101<BR>2008-05-09 11:30:34 [DEBUG] sofia_glue.c:1523 sofia_glue_activate_rtp() AUDIO RTP [sofia/outbound/17818640108] 69.64.92.160:26720-&gt;130.94.88.90:17186 codec: 0 ms: 20<BR>2008-05-09 11:30:34 [DEBUG] switch_rtp.c:716 switch_rtp_create() Starting timer [soft] 160 bytes per 20000ms<BR>2008-05-09 11:30:34 [NOTICE] sofia.c:2064 sofia_handle_sip_i_state() Channel [sofia/outbound/17818640108] has been answered<BR>2008-05-09 11:30:34 [DEBUG] switch_ivr_originate.c:1213 switch_ivr_originate() Originate
 Resulted in Success: [sofia/outbound/17818640108]</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif"><BR><BR>&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Anthony Minessale &lt;anthony.minessale@gmail.com&gt;<BR>To: freeswitch-users@lists.freeswitch.org<BR>Sent: Friday, May 9, 2008 8:49:58 AM<BR>Subject: Re: [Freeswitch-users] waitForAnswer returns too soon<BR><BR><FONT color=#0060bf>This block :<BR><BR>&nbsp;&nbsp;&nbsp; new_session = new Session();<BR>&nbsp;&nbsp;&nbsp; new_session.originate(session, "sofia/gateway/gizmo/1xxxxxxxxxx");</FONT> 
<DIV><FONT color=#0060bf>&nbsp;&nbsp;&nbsp; console_log("info","Waiting for answer!\n");<BR>&nbsp;&nbsp;&nbsp; new_session.waitForAnswer(10000);<BR>&nbsp;&nbsp;&nbsp; console_log("info","***ANSWERED\n");<BR><BR>Can be refactored to:<BR><BR></FONT><FONT color=#0060bf>&nbsp;&nbsp;&nbsp; new_session = new Session();<BR></FONT><FONT color=#0060bf>&nbsp;&nbsp;&nbsp; console_log("info","Waiting for answer!\n");</FONT><BR><FONT color=#0060bf>&nbsp;&nbsp;&nbsp; new_session.originate(session, "{ignore_early_media=true}sofia/gateway/gizmo/1xxxxxxxxxx");</FONT> 
<DIV><FONT color=#0060bf>&nbsp;&nbsp;&nbsp; console_log("info","***ANSWERED\n");<BR><BR>Can be refactored to:<BR></FONT><FONT color=#0060bf><BR>&nbsp;&nbsp;&nbsp; console_log("info","Waiting for answer!\n");</FONT><BR><FONT color=#0060bf>&nbsp;&nbsp;&nbsp; new_session = new Session(</FONT><FONT color=#0060bf>"{ignore_early_media=true}sofia/gateway/gizmo/1xxxxxxxxxx");</FONT> 
<DIV><FONT color=#0060bf>&nbsp;&nbsp;&nbsp; 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 &lt;<A href="mailto:jpalley@idapted.com" target=_blank rel=nofollow ymailto="mailto:jpalley@idapted.com">jpalley@idapted.com</A>&gt; wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">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>&gt; Doesn't that just allow media to be sent before a 200 ok? In that<BR>&gt; case, it doesn't solve the waitForAnswer problem?<BR>&gt;<BR>&gt; On Fri, May 9, 2008 at 7:05 AM, Leonardo Alves<BR>&gt; &lt;<A href="mailto:leoalves@teltec.com.br" target=_blank rel=nofollow ymailto="mailto:leoalves@teltec.com.br">leoalves@teltec.com.br</A>&gt; wrote:<BR>&gt;&gt; Try using the parameter early_media=true<BR>&gt;&gt; From: Marc Orenberg<BR>&gt;&gt; Sent: Thursday, May 08, 2008 9:39 PM<BR>&gt;&gt; To: <A href="mailto:freeswitch-users@lists.freeswitch.org" target=_blank rel=nofollow ymailto="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</A><BR>&gt;&gt; Subject: [Freeswitch-users] waitForAnswer returns too soon<BR>&gt;&gt; Hello everyone. I'm a new FreeSwitch user, and I'm having a<BR>&gt;&gt; problem with<BR>&gt;&gt; waitForAnswer() with SpiderMonkey.
 I'm using it to make an<BR>&gt;&gt; outbound call as<BR>&gt;&gt; follows:<BR>&gt;&gt;<BR>&gt;&gt; &nbsp; &nbsp; new_session = new Session();<BR>&gt;&gt; &nbsp; &nbsp; new_session.originate(session, "sofia/gateway/gizmo/<BR>&gt;&gt; 1xxxxxxxxxx");<BR>&gt;&gt; &nbsp; &nbsp; console_log("info","Waiting for answer!\n");<BR>&gt;&gt; &nbsp; &nbsp; new_session.waitForAnswer(10000);<BR>&gt;&gt; &nbsp; &nbsp; console_log("info","***ANSWERED\n");<BR>&gt;&gt; &nbsp; &nbsp; do {<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; console_log("info","***Playing file . . . \n");<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; playFile("we_are_trying_to_reach.wav");<BR>&gt;&gt; &nbsp; &nbsp; } while(1);<BR>&gt;&gt;<BR>&gt;&gt; When I run this code, the call is answered and it starts playing<BR>&gt;&gt; the file<BR>&gt;&gt; before my phone even starts ringing.<BR>&gt;&gt; I'm not sure if it's a bug with waitForAnswer, or a configuration<BR>&gt;&gt; issue on<BR>&gt;&gt; my side.<BR>&gt;&gt;<BR>&gt;&gt;
 For the SIP provider, I'm using Gizmo Phone with the following<BR>&gt;&gt; settings in<BR>&gt;&gt; sip_profiles/outbound/gizmo.xml:<BR>&gt;&gt;<BR>&gt;&gt; &nbsp; &nbsp; &lt;include&gt;<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &lt;gateway name="gizmo"&gt;<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;param name="username" value="1747xxxxxxx"/&gt;<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;param name="password" value="xxxxxxx"/&gt;<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;param name="realm" value="<A href="http://proxy01.sipphone.com/" target=_blank rel=nofollow>proxy01.sipphone.com</A>"/&gt;<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;param name="proxy" value="<A href="http://proxy01.sipphone.com/" target=_blank rel=nofollow>proxy01.sipphone.com</A>"/&gt;<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &nbsp; &lt;param name="register" value="true"/&gt;<BR>&gt;&gt; &nbsp; &nbsp; &nbsp; &lt;/gateway&gt;<BR>&gt;&gt; &nbsp; &nbsp; &lt;/include&gt;<BR>&gt;&gt;<BR>&gt;&gt; I'd
 really appreciate any help.<BR>&gt;&gt;<BR>&gt;&gt; Thanks,<BR>&gt;&gt; Marc<BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;&gt; ________________________________<BR>&gt;&gt;<BR>&gt;&gt; _______________________________________________<BR>&gt;&gt; Freeswitch-users mailing list<BR>&gt;&gt; <A href="mailto:Freeswitch-users@lists.freeswitch.org" target=_blank rel=nofollow ymailto="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</A><BR>&gt;&gt; <A href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target=_blank rel=nofollow>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>&gt;&gt; UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-" target=_blank rel=nofollow>http://lists.freeswitch.org/mailman/options/freeswitch-</A><BR>&gt;&gt; users<BR>&gt;&gt; <A href="http://www.freeswitch.org/" target=_blank rel=nofollow>http://www.freeswitch.org</A><BR>&gt;&gt;<BR>&gt;&gt;
 _______________________________________________<BR>&gt;&gt; Freeswitch-users mailing list<BR>&gt;&gt; <A href="mailto:Freeswitch-users@lists.freeswitch.org" target=_blank rel=nofollow ymailto="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</A><BR>&gt;&gt; <A href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target=_blank rel=nofollow>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>&gt;&gt; UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-" target=_blank rel=nofollow>http://lists.freeswitch.org/mailman/options/freeswitch-</A><BR>&gt;&gt; users<BR>&gt;&gt; <A href="http://www.freeswitch.org/" target=_blank rel=nofollow>http://www.freeswitch.org</A><BR>&gt;&gt;<BR>&gt;&gt;<BR>&gt;<BR>&gt; _______________________________________________<BR>&gt; Freeswitch-users mailing list<BR>&gt; <A href="mailto:Freeswitch-users@lists.freeswitch.org" target=_blank
 rel=nofollow ymailto="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</A><BR>&gt; <A href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target=_blank rel=nofollow>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>&gt; UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-" target=_blank rel=nofollow>http://lists.freeswitch.org/mailman/options/freeswitch-</A><BR>&gt; users<BR>&gt; <A href="http://www.freeswitch.org/" target=_blank rel=nofollow>http://www.freeswitch.org</A><BR><BR><BR>_______________________________________________<BR>Freeswitch-users mailing list<BR><A href="mailto:Freeswitch-users@lists.freeswitch.org" target=_blank rel=nofollow ymailto="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
 rel=nofollow>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</A><BR>UNSUBSCRIBE:<A href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target=_blank rel=nofollow>http://lists.freeswitch.org/mailman/options/freeswitch-users</A><BR><A href="http://www.freeswitch.org/" target=_blank rel=nofollow>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/" target=_blank rel=nofollow>http://www.freeswitch.org/</A><BR>ClueCon <A href="http://www.cluecon.com/" target=_blank rel=nofollow>http://www.cluecon.com/</A><BR><BR>AIM: anthm<BR><A href="mailto:MSN%3Aanthony_minessale@hotmail.com" target=_blank rel=nofollow ymailto="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</A><BR>GTALK/JABBER/<A href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target=_blank rel=nofollow
 ymailto="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</A><BR>IRC: <A href="http://irc.freenode.net/" target=_blank rel=nofollow>irc.freenode.net</A> #freeswitch<BR><BR>FreeSWITCH Developer Conference<BR><A href="mailto:sip%3A888@conference.freeswitch.org" target=_blank rel=nofollow ymailto="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</A><BR><A href="http://iax:guest@conference.freeswitch.org/888" target=_blank rel=nofollow>iax:guest@conference.freeswitch.org/888</A><BR><A href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target=_blank rel=nofollow ymailto="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</A><BR>pstn:213-799-1400</DIV></div></body></html>