<div dir="ltr"><div style="font-family:arial,sans-serif;font-size:13px">Hi everybody, please someone could help me to understand what "autonat:" 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'm going to explain and I solved it using "autonat" but I couldn'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 "A": 172.23.9.5<br></div><div style="font-family:arial,sans-serif;font-size:13px">IP phone "B": 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 "A" calls IP phone "B", 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 "A" when call is answered. Contact header is wrong, it is using Public IP instead of local IP. It produces that ACK from IP phone "A" 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>
<param name="ext-rtp-ip" value="190.190.190.190"/></div><div> <param name="ext-sip-ip" value="190.190.190.190"/></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><param name="ext-rtp-ip" value="<font color="#ff0000">autonat:</font>190.190.190.190"/></div>
<div> <param name="ext-sip-ip" value="<font color="#ff0000">autonat:</font>190.190.190.190"/></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 "contact header" 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> -> <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: "somebody" <<a href="http://sip:2320@172.23.9.4:5060/" target="_blank">sip:2320@172.23.9.4:5060</a>>;tag=87348974.</div><div>To: <<a href="http://sip:2340@172.23.9.4:5060/" target="_blank">sip:2340@172.23.9.4:5060</a>>;tag=1BQZX56QaNgZQ.</div>
<div>Call-ID: M2RhY2EzNDA0YmQ5Y2E5YmJkYWIxYzI5ZTM0ZjkxZWE..</div><div>CSeq: 2 INVITE.</div><div><font color="#ff0000">Contact: <sip:2340@190.190.190.190:5060;transport=udp>.</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: "2340" <<a href="mailto:sip%3A2340@172.23.9.4" target="_blank">sip:2340@172.23.9.4</a>>;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>