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.
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:
Problem:
Calls from SIP phones are dropped after 32 seconds
Scenario (not real IPs):
FS IP: 172.23.9.4
IP phone "A": 172.23.9.5
IP phone "B": 172.23.9.10
FS is behind NAT to call some VoIP providers.
Public IP: 190.190.190.190
What happens:
IP phone "A" calls IP phone "B", no NAT is necesary. All devices are in the same LAN, FS and both IP phones.
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.
In profile configuration file:
<param name="ext-rtp-ip" value="190.190.190.190"/>
<param name="ext-sip-ip" value="190.190.190.190"/>
Then, I changed to:
<param name="ext-rtp-ip" value="autonat:190.190.190.190"/>
<param name="ext-sip-ip" value="autonat:190.190.190.190"/>
And it solved my problem.
My Questions:
Why when I dont use autonat "contact header" contains public IP if all devices are in the local network?
And why autonat change this behaviour?
Thanks for your help.
Federico Castro
SIP 200 OK:
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 172.23.9.4:59453;branch=z9hG4bK-d8754z-c07981061a655f7f-1---d8754z-;rport=59453.
Call-ID: M2RhY2EzNDA0YmQ5Y2E5YmJkYWIxYzI5ZTM0ZjkxZWE..
CSeq: 2 INVITE.
Contact: <sip:2340@190.190.190.190:5060;transport=udp>.
User-Agent: FreeSWITCH-mod_sofia/1.2.11+git~20130703T205557Z~60adf50f86.
Accept: application/sdp.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE.
Supported: timer, precondition, path, replaces.
Allow-Events: talk, hold, conference, presence, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer.
Content-Type: application/sdp.
Content-Disposition: session.
Content-Length: 269.
.
v=0.
o=FreeSWITCH 1380800075 1380800076 IN IP4 172.23.9.4.
s=FreeSWITCH.
c=IN IP4 172.23.9.4.
t=0 0.
m=audio 28080 RTP/AVP 0 101.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-16.
a=silenceSupp:off - - - -.
a=ptime:20.
m=video 0 RTP/AVP 19.