<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"> </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"> </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"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif"> </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->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"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: Courier New, courier, monaco, monospace, sans-serif"><BR><BR> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Anthony Minessale <anthony.minessale@gmail.com><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> 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" target=_blank rel=nofollow ymailto="mailto:jpalley@idapted.com">jpalley@idapted.com</A>> 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>> 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" target=_blank rel=nofollow ymailto="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" target=_blank rel=nofollow ymailto="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 rel=nofollow>proxy01.sipphone.com</A>"/><BR>>> <param name="proxy" value="<A href="http://proxy01.sipphone.com/" target=_blank rel=nofollow>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" 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-" target=_blank rel=nofollow>http://lists.freeswitch.org/mailman/options/freeswitch-</A><BR>>> users<BR>>> <A href="http://www.freeswitch.org/" target=_blank rel=nofollow>http://www.freeswitch.org</A><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-" target=_blank rel=nofollow>http://lists.freeswitch.org/mailman/options/freeswitch-</A><BR>>> users<BR>>> <A href="http://www.freeswitch.org/" target=_blank rel=nofollow>http://www.freeswitch.org</A><BR>>><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-" target=_blank rel=nofollow>http://lists.freeswitch.org/mailman/options/freeswitch-</A><BR>> users<BR>> <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>