<div dir="ltr"><div style="font-family:arial,sans-serif;font-size:13px">Hi everybody, please someone could help me to understand what &quot;autonat:&quot; makes when is used to modify ext-rtp-ip and ext-sip-ip in profiles.</div>

<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I faced the problem I&#39;m going to explain and I solved it  using &quot;autonat&quot; but I couldn&#39;t understand why it fixed my problem:</div>

<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><b>Problem:</b></div><div style="font-family:arial,sans-serif;font-size:13px">

Calls from SIP phones are dropped after 32 seconds   </div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><b>Scenario (not real IPs):</b></div>
<div style="font-family:arial,sans-serif;font-size:13px">
FS IP: 172.23.9.4</div><div style="font-family:arial,sans-serif;font-size:13px">IP phone &quot;A&quot;: 172.23.9.5<br></div><div style="font-family:arial,sans-serif;font-size:13px">IP phone &quot;B&quot;: 172.23.9.10<br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px">  </div><div style="font-family:arial,sans-serif;font-size:13px">FS is behind NAT to call some VoIP providers.</div><div style="font-family:arial,sans-serif;font-size:13px">

Public IP: 190.190.190.190</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

<b>What happens:</b></div><div style="font-family:arial,sans-serif;font-size:13px">IP phone &quot;A&quot; calls IP phone &quot;B&quot;, no NAT is necesary. All devices are in the same LAN, FS and both IP phones.</div><div style="font-family:arial,sans-serif;font-size:13px">

<br></div><div style="font-family:arial,sans-serif;font-size:13px">I copy below profile configuration and  200 OK message that freeswitch sends to IP phone &quot;A&quot; when call is answered. Contact header is wrong, it is using Public IP instead of local IP. It produces that ACK from IP phone &quot;A&quot; never reaches FS and call is dropped by timeout. </div>

<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">In profile configuration file: </div><div style="font-family:arial,sans-serif;font-size:13px"><div>

&lt;param name=&quot;ext-rtp-ip&quot; value=&quot;190.190.190.190&quot;/&gt;</div><div> &lt;param name=&quot;ext-sip-ip&quot; value=&quot;190.190.190.190&quot;/&gt;</div></div><div style="font-family:arial,sans-serif;font-size:13px">

<br></div><div style="font-family:arial,sans-serif;font-size:13px">Then, I changed to:</div><div style="font-family:arial,sans-serif;font-size:13px"><div>&lt;param name=&quot;ext-rtp-ip&quot; value=&quot;<font color="#ff0000">autonat:</font>190.190.190.190&quot;/&gt;</div>

<div>    &lt;param name=&quot;ext-sip-ip&quot; value=&quot;<font color="#ff0000">autonat:</font>190.190.190.190&quot;/&gt;</div></div><div style="font-family:arial,sans-serif;font-size:13px">And it solved my problem.<br>
</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px"><b>My Questions:</b></div><div style="font-family:arial,sans-serif;font-size:13px">Why when I dont use autonat &quot;contact header&quot; contains public IP if all devices are in the local network? </div>

<div style="font-family:arial,sans-serif;font-size:13px">And why autonat change this behaviour?</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

Thanks for your help.</div><div style="font-family:arial,sans-serif;font-size:13px">Federico Castro</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

<div><b>Profile configuration:</b></div><div><a href="http://pastebin.com/X4DBg3yv" target="_blank">http://pastebin.com/X4DBg3yv</a><br></div></div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">

<br></div><div style="font-family:arial,sans-serif;font-size:13px"><b>SIP 200 OK:</b></div><div style="font-family:arial,sans-serif;font-size:13px"><b><br></b></div><div style="font-family:arial,sans-serif;font-size:13px">

<div>U 2013/10/03 16:22:35.536073 <a href="http://172.23.9.4:5060/" target="_blank">172.23.9.4:5060</a> -&gt; <a href="http://172.23.9.5:59453/" target="_blank">172.23.9.5:59453</a></div><div>SIP/2.0 200 OK.</div><div>Via: SIP/2.0/UDP 172.23.9.4:59453;branch=z9hG4bK-d8754z-c07981061a655f7f-1---d8754z-;rport=59453.</div>

<div>From: &quot;somebody&quot; &lt;<a href="http://sip:2320@172.23.9.4:5060/" target="_blank">sip:2320@172.23.9.4:5060</a>&gt;;tag=87348974.</div><div>To: &lt;<a href="http://sip:2340@172.23.9.4:5060/" target="_blank">sip:2340@172.23.9.4:5060</a>&gt;;tag=1BQZX56QaNgZQ.</div>

<div>Call-ID: M2RhY2EzNDA0YmQ5Y2E5YmJkYWIxYzI5ZTM0ZjkxZWE..</div><div>CSeq: 2 INVITE.</div><div><font color="#ff0000">Contact: &lt;sip:2340@190.190.190.190:5060;transport=udp&gt;.</font></div><div>User-Agent: FreeSWITCH-mod_sofia/1.2.11+git~20130703T205557Z~60adf50f86.</div>

<div>Accept: application/sdp.</div><div>Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE.</div><div>Supported: timer, precondition, path, replaces.</div><div>Allow-Events: talk, hold, conference, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer.</div>

<div>Content-Type: application/sdp.</div><div>Content-Disposition: session.</div><div>Content-Length: 269.</div><div>Remote-Party-ID: &quot;2340&quot; &lt;<a href="mailto:sip%3A2340@172.23.9.4" target="_blank">sip:2340@172.23.9.4</a>&gt;;party=calling;privacy=off;screen=no.</div>

<div>.</div><div>v=0.</div><div>o=FreeSWITCH 1380800075 1380800076 IN IP4 172.23.9.4.</div><div>s=FreeSWITCH.</div><div>c=IN IP4 172.23.9.4.</div><div>t=0 0.</div><div>m=audio 28080 RTP/AVP 0 101.</div><div>a=rtpmap:0 PCMU/8000.</div>

<div>a=rtpmap:101 telephone-event/8000.</div><div>a=fmtp:101 0-16.</div><div>a=silenceSupp:off - - - -.</div><div>a=ptime:20.</div><div>m=video 0 RTP/AVP 19.</div></div></div>