SIP and nat traversal IPv4/IPv6 issue
this is an issue which I've been discussing with Brian West on IRC and in e-mail correspondence, which I thought I should bring to the list so that others can look at it as well. The configuration My external SIP profile has its ext-sip-ip and ext-rtp-ip set to stun:stun.freeswitch.org. This is necessary for nat traversal. I have an internal-ipv6 profile as well, which is working, but for some reason it's interfering with calls on the external profile (which of course is an IPv4 profile). The symptom is the following line in outgoing SIP messages while attempting to establish a call to a gateway via the external profile: o=FreeSWITCH 1245193059 1245193060 IN IP6 stun:stun.freeswitch.org in response to which, the other side returns a 488 (invalid session description). I can confirm that ext-sip-ip and ext-rtp-ip are *not* set in the internal-ipv6.xml profile, but they are said as explained above in the external profile, where the problem lies. This looks like a bug to me but I want to rule out misconfiguration first. This has been tested on revision 13806.
Jason White <jason@jasonjgw.net> wrote:
The symptom is the following line in outgoing SIP messages while attempting to establish a call to a gateway via the external profile:
o=FreeSWITCH 1245193059 1245193060 IN IP6 stun:stun.freeswitch.org
However, if I place an IPv6 call via the internal-ipv6 profile, the o= line contains the correct IPv6 address - so this is only adversely affecting the IPv4 external profile, it seems.
Right which is what you have to do... I haven't been able to reproduce the issue... which is odd. /b On Jun 17, 2009, at 2:36 AM, Jason White wrote:
Jason White <jason@jasonjgw.net> wrote:
The symptom is the following line in outgoing SIP messages while attempting to establish a call to a gateway via the external profile:
o=FreeSWITCH 1245193059 1245193060 IN IP6 stun:stun.freeswitch.org
However, if I place an IPv6 call via the internal-ipv6 profile, the o= line contains the correct IPv6 address - so this is only adversely affecting the IPv4 external profile, it seems.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I can confirm the same issue, but it happens even with all the IPv6 stuff removed. This is my sofia status: freeswitch@internal> sofia status Name Type Data State ================================================================================================= internal profile sip:mod_sofia@10.0.13.10:5060 RUNNING (0) imxtony.sytes.net alias internal ALIASED external profile sip:mod_sofia@10.0.13.10:5080 RUNNING (0) example.com gateway sip:joeuser@example.com NOREG italk2 gateway sip:6499744069@akl.italk.co.nz REGED italk gateway sip:6499744074@akl.italk.co.nz REGED ================================================================================================= 2 profiles 1 alias And this is the INVITE for a gateway from an internal endpoint: freeswitch@internal> originate sofia/imxtony.sytes.net/218 &bridge(sofia/gateway/italk/6499744074) ------------------------------------------------------------------------ send 1344 bytes to udp/[203.184.16.2]:5060 at 20:01:50.190193: ------------------------------------------------------------------------ INVITE sip:6499744074@akl.italk.co.nz SIP/2.0 Via: SIP/2.0/UDP 60.234.179.34:5080;rport;branch=z9hG4bKgypXrUy0889Np Max-Forwards: 70 From: "FreeSWITCH" <sip:6499744074@akl.italk.co.nz;transport=udp>;tag=KSgjD3t33N9yp To: <sip:6499744074@akl.italk.co.nz> Call-ID: 893ed581-d61c-122c-d885-00237dc8dc02 CSeq: 116516120 INVITE Contact: <sip:gw+italk@60.234.179.34:5080;transport=udp> Expires: 3600 User-Agent: FreeSWITCH-mod_sofia/1.0.trunk-@SWITCH_VERSION_REVISION@ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO Supported: timer, precondition, path, replaces Allow-Events: talk, refer Proxy-Authorization: Digest username="6499744074", realm="italk.co.nz", nonce="75444262", algorithm=MD5, uri="sip:6499744074@akl.italk.co.nz", response="89bb5673f48252622025641153b882de" Content-Type: application/sdp Content-Disposition: session Content-Length: 315 Remote-Party-ID: "FreeSWITCH" <sip:0000000000@akl.italk.co.nz>;party=calling;screen=yes;privacy=off v=0 o=FreeSWITCH 1245252480 1245252481 IN IP6 stun:stun.freeswitch.org s=FreeSWITCH c=IN IP6 stun:stun.freeswitch.org t=0 0 m=audio 16430 RTP/AVP 0 3 8 101 13 a=rtpmap:0 PCMU/8000 a=rtpmap:3 GSM/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=rtpmap:13 CN/8000 a=ptime:20 ------------------------------------------------------------------------ 2009-06-18 08:01:50.191067 [DEBUG] sofia.c:3210 Channel sofia/external/6499744074 entering state [calling][0] recv 469 bytes from udp/[203.184.16.2]:5060 at 20:01:50.252230: ------------------------------------------------------------------------ SIP/2.0 488 Not acceptable here Via: SIP/2.0/UDP 60.234.179.34:5080;rport;branch=z9hG4bKgypXrUy0889Np;received=60.234.179.34 From: "FreeSWITCH" <sip:6499744074@akl.italk.co.nz;transport=udp>;tag=KSgjD3t33N9yp To: <sip:6499744074@akl.italk.co.nz>;tag=as34133b10 Call-ID: 893ed581-d61c-122c-d885-00237dc8dc02 CSeq: 116516120 INVITE User-Agent: italk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Content-Length: 0 ------------------------------------------------------------------------ send 360 bytes to udp/[203.184.16.2]:5060 at 20:01:50.252988: ------------------------------------------------------------------------ ACK sip:6499744074@akl.italk.co.nz SIP/2.0 Via: SIP/2.0/UDP 60.234.179.34:5080;rport;branch=z9hG4bKgypXrUy0889Np Max-Forwards: 70 From: "FreeSWITCH" <sip:6499744074@akl.italk.co.nz;transport=udp>;tag=KSgjD3t33N9yp To: <sip:6499744074@akl.italk.co.nz>;tag=as34133b10 Call-ID: 893ed581-d61c-122c-d885-00237dc8dc02 CSeq: 116516120 ACK Content-Length: 0 ------------------------------------------------------------------------ 2009-06-18 08:01:50.253252 [DEBUG] sofia.c:3210 Channel sofia/external/6499744074 entering state [terminated][488] That IP6 is clearly messing things up. Regards, Raul On Wed, 2009-06-17 at 17:36 +1000, Jason White wrote:
Jason White <jason@jasonjgw.net> wrote:
The symptom is the following line in outgoing SIP messages while attempting to establish a call to a gateway via the external profile:
o=FreeSWITCH 1245193059 1245193060 IN IP6 stun:stun.freeswitch.org
However, if I place an IPv6 call via the internal-ipv6 profile, the o= line contains the correct IPv6 address - so this is only adversely affecting the IPv4 external profile, it seems.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Raul Fragoso <raul@etellicom.com> wrote:
I can confirm the same issue, but it happens even with all the IPv6 stuff removed.
Thank you for the corroboration. It only happens to me if I have the following in my external.xml profile: <param name="local-network-acl" value="localnet.auto"/> Note that I need the above line for nat traversal; if I leave it out, FreeSWITCH uses a private IPv4 address in outgoing invites, and can't establish a call.
I need in one of your boxs... there is no way this is doing this unless you are putting stun:stun.freeswitch.org into the ext-rtp-ip or sip ip... which could make it trigger the ipv6 check since its just looking for : in the ip address. And stun: has that.. so you're triggering it... tar up your entire conf folder and mail it to me ASAP. /b On Jun 17, 2009, at 8:01 PM, Jason White wrote:
Raul Fragoso <raul@etellicom.com> wrote:
I can confirm the same issue, but it happens even with all the IPv6 stuff removed.
Thank you for the corroboration.
It only happens to me if I have the following in my external.xml profile: <param name="local-network-acl" value="localnet.auto"/>
Note that I need the above line for nat traversal; if I leave it out, FreeSWITCH uses a private IPv4 address in outgoing invites, and can't establish a call.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Ok you both didn't notice you CAN NOT put stun:stun.freeswitch.org in rtp-ip, thats the problem. It clearly says IP ADDRESSES ONLY in the comments. DO not use $${external_rtp_ip} for rtp-ip either :P /b On Jun 17, 2009, at 3:10 PM, Raul Fragoso wrote:
I can confirm the same issue, but it happens even with all the IPv6 stuff removed. This is my sofia status:
freeswitch@internal> sofia status
Name Type Data State = = = = = = = = = = = = = = = = = = = = = = = = = = = ====================================================================== internal profile sip:mod_sofia@10.0.13.10:5060 RUNNING (0) imxtony.sytes.net alias internal ALIASED external profile sip:mod_sofia@10.0.13.10:5080 RUNNING (0) example.com gateway sip:joeuser@example.com NOREG italk2 gateway sip:6499744069@akl.italk.co.nz REGED italk gateway sip:6499744074@akl.italk.co.nz REGED = = = = = = = = = = = = = = = = = = = = = = = = = = = ====================================================================== 2 profiles 1 alias
And this is the INVITE for a gateway from an internal endpoint:
freeswitch@internal> originate sofia/imxtony.sytes.net/218 &bridge(sofia/gateway/italk/6499744074)
------------------------------------------------------------------------ send 1344 bytes to udp/[203.184.16.2]:5060 at 20:01:50.190193:
------------------------------------------------------------------------ INVITE sip:6499744074@akl.italk.co.nz SIP/2.0 Via: SIP/2.0/UDP 60.234.179.34:5080;rport;branch=z9hG4bKgypXrUy0889Np Max-Forwards: 70 From: "FreeSWITCH" <sip: 6499744074@akl.italk.co.nz;transport=udp>;tag=KSgjD3t33N9yp To: <sip:6499744074@akl.italk.co.nz> Call-ID: 893ed581-d61c-122c-d885-00237dc8dc02 CSeq: 116516120 INVITE Contact: <sip:gw+italk@60.234.179.34:5080;transport=udp> Expires: 3600 User-Agent: FreeSWITCH-mod_sofia/1.0.trunk- @SWITCH_VERSION_REVISION@ Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE, REGISTER, INFO Supported: timer, precondition, path, replaces Allow-Events: talk, refer Proxy-Authorization: Digest username="6499744074", realm="italk.co.nz", nonce="75444262", algorithm=MD5, uri="sip:6499744074@akl.italk.co.nz ", response="89bb5673f48252622025641153b882de" Content-Type: application/sdp Content-Disposition: session Content-Length: 315 Remote-Party-ID: "FreeSWITCH" <sip: 0000000000@akl.italk.co.nz>;party=calling;screen=yes;privacy=off
v=0 o=FreeSWITCH 1245252480 1245252481 IN IP6 stun:stun.freeswitch.org s=FreeSWITCH c=IN IP6 stun:stun.freeswitch.org t=0 0 m=audio 16430 RTP/AVP 0 3 8 101 13 a=rtpmap:0 PCMU/8000 a=rtpmap:3 GSM/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 a=rtpmap:13 CN/8000 a=ptime:20
------------------------------------------------------------------------ 2009-06-18 08:01:50.191067 [DEBUG] sofia.c:3210 Channel sofia/ external/6499744074 entering state [calling][0] recv 469 bytes from udp/[203.184.16.2]:5060 at 20:01:50.252230:
------------------------------------------------------------------------ SIP/2.0 488 Not acceptable here Via: SIP/2.0/UDP 60.234.179.34 :5080;rport;branch=z9hG4bKgypXrUy0889Np;received=60.234.179.34 From: "FreeSWITCH" <sip: 6499744074@akl.italk.co.nz;transport=udp>;tag=KSgjD3t33N9yp To: <sip:6499744074@akl.italk.co.nz>;tag=as34133b10 Call-ID: 893ed581-d61c-122c-d885-00237dc8dc02 CSeq: 116516120 INVITE User-Agent: italk PBX Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY Supported: replaces Content-Length: 0
------------------------------------------------------------------------ send 360 bytes to udp/[203.184.16.2]:5060 at 20:01:50.252988:
------------------------------------------------------------------------ ACK sip:6499744074@akl.italk.co.nz SIP/2.0 Via: SIP/2.0/UDP 60.234.179.34:5080;rport;branch=z9hG4bKgypXrUy0889Np Max-Forwards: 70 From: "FreeSWITCH" <sip: 6499744074@akl.italk.co.nz;transport=udp>;tag=KSgjD3t33N9yp To: <sip:6499744074@akl.italk.co.nz>;tag=as34133b10 Call-ID: 893ed581-d61c-122c-d885-00237dc8dc02 CSeq: 116516120 ACK Content-Length: 0
------------------------------------------------------------------------ 2009-06-18 08:01:50.253252 [DEBUG] sofia.c:3210 Channel sofia/ external/6499744074 entering state [terminated][488]
That IP6 is clearly messing things up.
Regards,
Raul
On Wed, 2009-06-17 at 17:36 +1000, Jason White wrote:
Jason White <jason@jasonjgw.net> wrote:
The symptom is the following line in outgoing SIP messages while attempting to establish a call to a gateway via the external profile:
o=FreeSWITCH 1245193059 1245193060 IN IP6 stun:stun.freeswitch.org
However, if I place an IPv6 call via the internal-ipv6 profile, the o= line contains the correct IPv6 address - so this is only adversely affecting the IPv4 external profile, it seems.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I no longer need your configs... I didn't try to put stun:stun.freeswitch.org in sip-ip or rtp-ip because I know you shouldn't. We clearly can not try to do a stun request in either of these fields because you can't bind to IP's that aren't directly on the machine... so do as per the config and put ONLY ip's that are local on the machine... if you need to set the external rtp or sip ip please set them with the ext-rtp-ip and ext-sip-ip params on the profile. You CAN set the ext-rtp-ip and ext-sip-ip to stun:stun.freeswitch.org and those will resolve. /b On Jun 17, 2009, at 3:10 PM, Raul Fragoso wrote:
I can confirm the same issue, but it happens even with all the IPv6 stuff removed. This is my sofia status:
can you confirm that they are not being inherited by some of the helper variables exported from vars.xml? can you minimalise your ip4 profile by cutting all the commented lines and actually remove the ext-rtp-ip and ext-sip-ip params? Then possibly post your config for each profile. On Wed, Jun 17, 2009 at 2:00 AM, Jason White <jason@jasonjgw.net> wrote:
this is an issue which I've been discussing with Brian West on IRC and in e-mail correspondence, which I thought I should bring to the list so that others can look at it as well.
The configuration
My external SIP profile has its ext-sip-ip and ext-rtp-ip set to stun:stun.freeswitch.org. This is necessary for nat traversal.
I have an internal-ipv6 profile as well, which is working, but for some reason it's interfering with calls on the external profile (which of course is an IPv4 profile).
The symptom is the following line in outgoing SIP messages while attempting to establish a call to a gateway via the external profile:
o=FreeSWITCH 1245193059 1245193060 IN IP6 stun:stun.freeswitch.org
in response to which, the other side returns a 488 (invalid session description).
I can confirm that ext-sip-ip and ext-rtp-ip are *not* set in the internal-ipv6.xml profile, but they are said as explained above in the external profile, where the problem lies.
This looks like a bug to me but I want to rule out misconfiguration first.
This has been tested on revision 13806.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
participants (4)
-
Anthony Minessale
-
Brian West
-
Jason White
-
Raul Fragoso