If STUN isn&#39;t available you can also check if your router supports SIP ALG which will let your router rewrite the IPs for you. If it works it should fix both signalling (Contact) and media (SDP).<div><br></div><div>It&#39;s not normally our recommended option though. Some implementations don&#39;t work as well as others, and it can never work with TLS. It might also fail to recognise any SIP on a non-standard port (eg 5080). It might also interfere with other SIP clients on your LAN that are handling the NAT traversal correctly themselves.</div>

<div><br></div><div>-Steve</div><div><br></div><div><br></div><div><br></div><div><div><br><div class="gmail_quote">On 12 July 2013 20:01, Steven Ayre <span dir="ltr">&lt;<a href="mailto:steveayre@gmail.com" target="_blank">steveayre@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Basically when softphone makes an INVITE to FS it always sends the private IP on the SDP and when the media flow starts it&#39;s being sent out by FS to the public lan address resulting on a audioless call. However if the phone sends the public IP on the SDP there&#39;s no issue at all.</span></blockquote>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">I know there&#39;s a variable available  </span><font size="1" style="color:rgb(34,34,34);font-family:arial,sans-serif">disable_rtp_auto_adjust</font><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"> that shoud make freeswitch ignore the SDP IP and use the INVITE IP instead, but it isn&#39;t working for me.</span></blockquote>


<div> </div></div>The phone needs to send the external IP:port in its SDP, not its internal one. That can be done easily if the phone supports STUN. Ditto for the Contact header.</div><div><br></div><div>Otherwise you&#39;ll have to resort to FreeSWITCH&#39;s workarounds. For the Contact header use <a href="http://wiki.freeswitch.org/wiki/NDLB#NDLB-connectile-dysfunction" target="_blank">http://wiki.freeswitch.org/wiki/NDLB#NDLB-connectile-dysfunction</a>, but that only covers the SIP signalling.</div>


<div><br></div><div>For SDP the only workaround is rtp auto adjust. Note you want it enabled, ie disable_rtp_auto_adjust=false.</div><div><br></div><div>FS cannot autoadjust until it receives media from the phone so it knows where to send back to. That means you will not hear any ringback, and won&#39;t hear anything until shortly after the call is answered (the softphone won&#39;t send media until then).</div>


<div><br></div><div>The best fix is to enable STUN on the phone.</div><div><br></div><div>-Steve</div><div><br></div><div><br></div><div><br></div><br><br><div class="gmail_quote"><div><div class="h5">On 12 July 2013 14:34, Nuno Reis <span dir="ltr">&lt;<a href="mailto:nreis@wavecom.pt" target="_blank">nreis@wavecom.pt</a>&gt;</span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">Good day all.<br><br>I&#39;m experiencing the following sinptom when using some softphones behind nat on a private LAN, sometimes the same happen with hardphones.<br>


<br>Here&#39;s the scenario:<br><br> FS : &lt;public IP&gt;  _______ &lt;public IP&gt;LAN ROUTER &lt;private LAN&gt; --- softphone<br>
<br>Basically when softphone makes an INVITE to FS it always sends the private IP on the SDP and when the media flow starts it&#39;s being sent out by FS to the public lan address resulting on a audioless call. However if the phone sends the public IP on the SDP there&#39;s no issue at all.<br>



I know there&#39;s a variable available  <font size="1">disable_rtp_auto_adjust</font> that shoud make freeswitch ignore the SDP IP and use the INVITE IP instead, but it isn&#39;t working for me.<br><br>Here&#39;s what i currently have on my internal SIP profile:<br>



<br>                &lt;profile name=&quot;internal&quot;&gt;<br>                        &lt;aliases&gt;<br>                        &lt;/aliases&gt;<br>                        &lt;gateways&gt;<br>                        &lt;/gateways&gt;<br>



                        &lt;domains&gt;<br>                                &lt;domain name=&quot;all&quot; alias=&quot;true&quot; parse=&quot;false&quot;/&gt;<br>                        &lt;/domains&gt;<br>                        &lt;settings&gt;<br>



                                &lt;param name=&quot;debug&quot; value=&quot;0&quot;/&gt;<br>                                &lt;param name=&quot;sip-trace&quot; value=&quot;no&quot;/&gt;<br>                                &lt;param name=&quot;sip-capture&quot; value=&quot;no&quot;/&gt;<br>



                                &lt;param name=&quot;watchdog-enabled&quot; value=&quot;no&quot;/&gt;<br>                                &lt;param name=&quot;watchdog-step-timeout&quot; value=&quot;30000&quot;/&gt;<br>                                &lt;param name=&quot;watchdog-event-timeout&quot; value=&quot;30000&quot;/&gt;<br>



                                &lt;param name=&quot;log-auth-failures&quot; value=&quot;true&quot;/&gt;<br>                                &lt;param name=&quot;forward-unsolicited-mwi-notify&quot; value=&quot;false&quot;/&gt;<br>



                                &lt;param name=&quot;context&quot; value=&quot;public&quot;/&gt;<br>                                &lt;param name=&quot;rfc2833-pt&quot; value=&quot;101&quot;/&gt;<br>                                &lt;param name=&quot;sip-port&quot; value=&quot;5060&quot;/&gt;<br>



                                &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;<br>                                &lt;param name=&quot;dtmf-duration&quot; value=&quot;2000&quot;/&gt;<br>                                &lt;param name=&quot;inbound-codec-prefs&quot; value=&quot;H264,G722,PCMA,GSM&quot;/&gt;<br>



                                &lt;param name=&quot;outbound-codec-prefs&quot; value=&quot;H264,G722,PCMA,GSM&quot;/&gt;<br>                                &lt;param name=&quot;rtp-timer-name&quot; value=&quot;soft&quot;/&gt;<br>



                                &lt;param name=&quot;rtp-ip&quot; value=&quot;&lt;PUBLIC_IP&gt;&quot;/&gt;<br>                                &lt;param name=&quot;sip-ip&quot; value=&quot;&lt;PUBLIC_IP&gt;&quot;/&gt;<br>


                                &lt;param name=&quot;hold-music&quot; value=&quot;local_stream://moh&quot;/&gt;<br>
                                &lt;param name=&quot;apply-inbound-acl&quot; value=&quot;domains&quot;/&gt;<br>                                &lt;param name=&quot;apply-nat-acl&quot; value=&quot;rfc1918&quot;/&gt;<br>                                &lt;param name=&quot;local-network-acl&quot; value=&quot;localnet.auto&quot;/&gt;<br>



                                &lt;param name=&quot;record-path&quot; value=&quot;/opt/freeswitch/recordings&quot;/&gt;<br>                                &lt;param name=&quot;record-template&quot; value=&quot;${caller_id_number}.${target_domain}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav&quot;/&gt;<br>



                                &lt;param name=&quot;manage-presence&quot; value=&quot;true&quot;/&gt;<br>                                &lt;param name=&quot;presence-privacy&quot; value=&quot;&quot;/&gt;<br>                                &lt;param name=&quot;inbound-codec-negotiation&quot; value=&quot;generous&quot;/&gt;<br>



                                &lt;param name=&quot;tls&quot; value=&quot;true&quot;/&gt;<br>                                &lt;param name=&quot;tls-only&quot; value=&quot;false&quot;/&gt;<br>                                &lt;param name=&quot;tls-bind-params&quot; value=&quot;transport=tls&quot;/&gt;<br>



                                &lt;param name=&quot;tls-sip-port&quot; value=&quot;5061&quot;/&gt;<br>                                &lt;param name=&quot;tls-cert-dir&quot; value=&quot;/opt/freeswitch/conf/ssl&quot;/&gt;<br>



                                &lt;param name=&quot;tls-passphrase&quot; value=&quot;&quot;/&gt;<br>                                &lt;param name=&quot;tls-verify-date&quot; value=&quot;true&quot;/&gt;<br>                                &lt;param name=&quot;tls-verify-policy&quot; value=&quot;none&quot;/&gt;<br>



                                &lt;param name=&quot;tls-verify-depth&quot; value=&quot;2&quot;/&gt;<br>                                &lt;param name=&quot;tls-verify-in-subjects&quot; value=&quot;&quot;/&gt;<br>                                &lt;param name=&quot;tls-version&quot; value=&quot;sslv23&quot;/&gt;<br>



                                &lt;param name=&quot;odbc-dsn&quot; value=&quot;freeswitch:user:password&quot;/&gt;<br>                                &lt;param name=&quot;nonce-ttl&quot; value=&quot;60&quot;/&gt;<br>                                &lt;param name=&quot;auth-calls&quot; value=&quot;true&quot;/&gt;<br>



                                &lt;param name=&quot;inbound-reg-force-matching-username&quot; value=&quot;true&quot;/&gt;<br>                                &lt;param name=&quot;auth-all-packets&quot; value=&quot;false&quot;/&gt;<br>



                                &lt;param name=&quot;rtp-timeout-sec&quot; value=&quot;300&quot;/&gt;<br>                                &lt;param name=&quot;rtp-hold-timeout-sec&quot; value=&quot;1800&quot;/&gt;<br>                                &lt;param name=&quot;challenge-realm&quot; value=&quot;auto_from&quot;/&gt;<br>



                                &lt;param name=&quot;ext-rtp-ip&quot; value=&quot;&lt;PUBLIC_IP&gt;&quot;/&gt;<br>                                &lt;param name=&quot;ext-sip-ip&quot; value=&quot;&lt;PUBLIC_IP&gt;&quot;/&gt;<br>



                                &lt;param name=&quot;presence-hosts&quot; value=&quot;_DISABLED_&quot;/&gt;<br>                                &lt;param name=&quot;NDLB-received-in-nat-reg-contact&quot; value=&quot;true&quot;/&gt;<br>



                                &lt;param name=&quot;NDLB-broken-auth-hash&quot; value=&quot;true&quot;/&gt;<br>                                &lt;param name=&quot;dbname&quot; value=&quot;share_presence&quot;/&gt;<br>                                &lt;param name=&quot;send-presence-on-register&quot; value=&quot;true&quot;/&gt;<br>



                                &lt;param name=&quot;manage-shared-appearance&quot; value=&quot;true&quot;/&gt;<br>                                &lt;param name=&quot;registration-thread-frequency&quot; value=&quot;30&quot;/&gt;<br>



                                &lt;param name=&quot;enable-timer&quot; value=&quot;false&quot;/&gt;<br>                                &lt;param name=&quot;aggressive-nat-detection&quot; value=&quot;true&quot;/&gt;<br>                                &lt;param name=&quot;send-message-query-on-register&quot; value=&quot;true&quot;/&gt;<br>



                                &lt;param name=&quot;all-reg-options-ping&quot; value=&quot;true&quot;/&gt;<br>                                &lt;param name=&quot;sip-force-expires&quot; value=&quot;3600&quot;/&gt;<br>                                &lt;param name=&quot;sip-expires-max-deviation&quot; value=&quot;300&quot;/&gt;<br>



                                &lt;param name=&quot;multiple-registrations&quot; value=&quot;contact&quot;/&gt;<br>                        &lt;/settings&gt;<br>                &lt;/profile&gt;<br><br>Any suggestions on how to make FS use the INVITE IP for RTP instead of using the IP on the SDP?<br>



<br>Looking forward to hear from you.<br><br>Best Regards,<br><b><span style="font-size:8.0pt;font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;;color:#1f497d"><br><br>Nuno Miguel Reis</span></b><span style="font-size:8.0pt;font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;;color:#133770"> | <b>Unified Communication</b></span><b><span style="font-size:8.0pt;font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;;color:#1f497d"> Systems</span></b><br>



<div><p><span style="font-size:8.0pt;font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;;color:#133770">
M. <a value="+351918919465">+351 913907481</a> | <a href="mailto:nreis@wavecom.pt" target="_blank"><span style="color:blue">nreis@wavecom.pt</span></a></span><span style="font-size:8.0pt;font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;"></span><span style="font-size:10.0pt;font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;;color:#1f497d"></span><span style="font-size:8.0pt;font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;;color:#133770"><br>



</span></p><span style="font-size:8.0pt;font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;;color:#133770">WAVECOM-Soluções Rádio, S.A.</span><span style="font-size:8.0pt;font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;;color:#133770"><br>




Cacia Park | Rua do Progresso, Lote 15</span><span style="font-size:8.0pt;font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;;color:#133770"><br>3800-639 AVEIRO | Portugal</span><span style="font-size:8pt;font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;;color:rgb(19,55,112)"><br>




T. <a value="+351234919190">+351 309 700 225</a> | F. <a value="+351234919191">+351 234 919 191</a></span><span style="font-size:8pt;font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;;color:rgb(19,55,112)"><br></span><b><span style="font-size:9.0pt;font-family:&quot;Trebuchet MS&quot;,&quot;sans-serif&quot;;color:#1f497d"><a href="http://maps.google.com/maps/ms?msa=0&amp;msid=202333747613191340808.0004b4b227a6144f0df88" target="_blank"><span style="color:#1f497d">GPS</span></a> | <a href="http://www.wavecom.pt/" target="_blank"><span style="color:#1f497d">www.wavecom.pt</span></a></span></b><b><a href="http://www.wavecom.pt/" target="_blank"><span style="color:#1f497d"></span></a></b><p>



<span style="border-collapse:collapse"></span></p><p><a href="http://www.wavecom.pt/pt/wavecom/premios.php" style="color:rgb(17,85,204)" target="_blank"><span style="text-decoration:none"><img src="cid:image001.png@01CD4A22.D45EAB90" alt="Description: Description: WavecomSignature" width="400" height="100" border="0"></span></a><span style="color:rgb(31,73,125)"></span></p>





<p><a href="http://www.wavecom.pt/pt/mail_eventos.php" style="color:rgb(17,85,204);font-size:medium;font-family:&#39;Times New Roman&#39;" target="_blank"><img alt="Publicity" width="389" height="71" border="0"></a>
</p><p></p><p><span><br></span></p></div>
<br></div></div><div class="im">_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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>
<br></div></blockquote></div><br>
</blockquote></div><br></div></div>