Problem with NAT configuration. Trying to understand autonat.
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 *Profile configuration:* http://pastebin.com/X4DBg3yv *SIP 200 OK:* * * U 2013/10/03 16:22:35.536073 172.23.9.4:5060 -> 172.23.9.5:59453 SIP/2.0 200 OK. Via: SIP/2.0/UDP 172.23.9.4:59453 ;branch=z9hG4bK-d8754z-c07981061a655f7f-1---d8754z-;rport=59453. From: "somebody" <sip:2320@172.23.9.4:5060>;tag=87348974. To: <sip:2340@172.23.9.4:5060>;tag=1BQZX56QaNgZQ. 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. Remote-Party-ID: "2340" <sip:2340@172.23.9.4
;party=calling;privacy=off;screen=no. . 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.
On 10/03/2013 04:05 PM, Federico Castro wrote:
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:
I second the question. -- but first, I think auto-nat has a hyphen in it? I dug into this once and still have no idea what is going on - thus I have little hope of believing I have a secure configuration. particularly : sip_profiles/internal.xml: <param name="ext-rtp-ip" value="auto-nat"/> sip_profiles/internal.xml: <param name="ext-sip-ip" value="auto-nat"/> and sip_profiles/external.xml: <param name="ext-rtp-ip" value="auto-nat"/> sip_profiles/external.xml: <param name="ext-sip-ip" value="auto-nat"/> I guessed that auto-nat would return the correct IP address - but filling in the real IP address values didn't work as far as I could tell??? Thus, the following comment in the default file does not appear to be correct?? <!-- external_sip_ip Used as the public IP address for SDP. Can be an one of: ip address - "12.34.56.78" a stun server lookup - "stun:stun.server.com" a DNS name - "host:host.server.com" auto - Use guessed ip. auto-nat - Use ip learned from NAT-PMP or UPNP --> And global_getvar shows external_rtp_ip and external_sip_ip set to the correct IP, but external_sip_ip is not ext_sip_ip I'm not using NAT-PMP or UPNP - but it appears to work - I have no idea why. -------------------------------------------------------------------------------- Karl Schmidt EMail Karl@xtronics.com Transtronics, Inc. WEB http://secure.transtronics.com 3209 West 9th Street Ph (785) 841-3089 Lawrence, KS 66049 FAX (785) 841-0434 "If you don't read the newspaper you are uninformed, if you do read the newspaper you are misinformed." -- Mark Twain --------------------------------------------------------------------------------
participants (2)
-
Federico Castro
-
Karl Schmidt