[OpenSIPS-Users] two UACs behind the same nat

Nick Chang nick.chang at kland.com.tw
Fri Mar 15 09:29:12 CET 2013


Hello

SIP SERVER public IP 61.67.128.46
SIP SERVER private ip 10.10.12.111

Client Netwok 192.168.4.x

It's my sip trace.

----------------------------------------
-- 2013-03-15 10:44:30 - Received from 61.67.128.46:5060 from
192.168.4.197:5060
INVITE sip:9999 at 192.168.4.197:5060 SIP/2.0
Record-Route: <sip:10.10.12.111;lr;ftag=6ec31b5c70;did=e46.c32c2496>
Accept: application/reginfo+xml, application/sdp,
application/simple-message-summary, message/sipfrag, multipart/mixed,
multipart/related
Via: SIP/2.0/UDP 10.10.12.111:5060;branch=z9hG4bKe57e.1724a543.0
Via: SIP/2.0/UDP
211.75.166.164:5060;rport=5060;received=211.75.166.164;branch=z9hG4bK85dda1e
c7b4383de7
Max-Forwards: 69
From: "55688" <sip:55688 at 61.67.128.46:5060>;tag=6ec31b5c70
To: <sip:9999 at 61.67.128.46>
Call-ID: 24d694d137058efa
CSeq: 1522816869 INVITE
Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, REFER, SUBSCRIBE, UPDATE
Allow-Events: refer
Contact: <sip:55688 at 211.75.166.164:5060>
Supported: replaces
User-Agent: Media5-fone/3.6.1.961
Content-Disposition: session
Content-Type: application/sdp
Content-Length: 316

v=0
o=MxSIP 2117160280472408617 2117160280472408618 IN IP4 211.75.166.164
s=SIP Call
c=IN IP4 211.75.166.164
t=0 0
a=sendrecv
m=audio 10000 RTP/AVP 96 0 8 125
a=rtpmap:96 iLBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:125 telephone-event/8000
a=fmtp:96 mode=30
a=fmtp:125 0-15
a=sendrecv


----------------------------------------
-- 2013-03-15 10:44:30 - Sent to 61.67.128.46:5060 from 192.168.4.197:5060
SIP/2.0 180 Ringing
Accept: application/reginfo+xml, application/sdp,
application/simple-message-summary, message/sipfrag, multipart/mixed,
multipart/related
Via: SIP/2.0/UDP
10.10.12.111:5060;branch=z9hG4bKe57e.1724a543.0;received=61.67.128.46,
SIP/2.0/UDP
211.75.166.164:5060;rport=5060;received=211.75.166.164;branch=z9hG4bK85dda1e
c7b4383de7
Record-Route: <sip:10.10.12.111;lr;ftag=6ec31b5c70;did=e46.c32c2496>
From: "55688" <sip:55688 at 61.67.128.46:5060>;tag=6ec31b5c70
To: <sip:9999 at 61.67.128.46>;tag=1743253937
Call-ID: 24d694d137058efa
CSeq: 1522816869 INVITE
Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, REFER, SUBSCRIBE, UPDATE
Allow-Events: refer
Contact: <sip:9999 at 192.168.4.197:5060>
Server: Media5-fone/3.6.1.961
Supported: replaces
Content-Length: 0

----------------------------------------
-- 2013-03-15 10:44:30 - Received from 61.67.128.46:5060 from
192.168.4.197:5060
INVITE sip:9999 at 192.168.4.197:5060 SIP/2.0
Record-Route: <sip:10.10.12.111;lr;ftag=6ec31b5c70;did=e46.c32c2496>
Accept: application/reginfo+xml, application/sdp,
application/simple-message-summary, message/sipfrag, multipart/mixed,
multipart/related
Via: SIP/2.0/UDP 10.10.12.111:5060;branch=z9hG4bKe57e.1724a543.0
Via: SIP/2.0/UDP
211.75.166.164:5060;rport=5060;received=211.75.166.164;branch=z9hG4bK85dda1e
c7b4383de7
Max-Forwards: 69
From: "55688" <sip:55688 at 61.67.128.46:5060>;tag=6ec31b5c70
To: <sip:9999 at 61.67.128.46>
Call-ID: 24d694d137058efa
CSeq: 1522816869 INVITE
Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, REFER, SUBSCRIBE, UPDATE
Allow-Events: refer
Contact: <sip:55688 at 211.75.166.164:5060>
Supported: replaces
User-Agent: Media5-fone/3.6.1.961
Content-Disposition: session
Content-Type: application/sdp
Content-Length: 316

v=0
o=MxSIP 2117160280472408617 2117160280472408618 IN IP4 211.75.166.164
s=SIP Call
c=IN IP4 211.75.166.164
t=0 0
a=sendrecv
m=audio 10000 RTP/AVP 96 0 8 125
a=rtpmap:96 iLBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:125 telephone-event/8000
a=fmtp:96 mode=30
a=fmtp:125 0-15
a=sendrecv


----------------------------------------
-- 2013-03-15 10:44:30 - Sent to 61.67.128.46:5060 from 192.168.4.197:5060
SIP/2.0 180 Ringing
Accept: application/reginfo+xml, application/sdp,
application/simple-message-summary, message/sipfrag, multipart/mixed,
multipart/related
Via: SIP/2.0/UDP
10.10.12.111:5060;branch=z9hG4bKe57e.1724a543.0;received=61.67.128.46,
SIP/2.0/UDP
211.75.166.164:5060;rport=5060;received=211.75.166.164;branch=z9hG4bK85dda1e
c7b4383de7
Record-Route: <sip:10.10.12.111;lr;ftag=6ec31b5c70;did=e46.c32c2496>
From: "55688" <sip:55688 at 61.67.128.46:5060>;tag=6ec31b5c70
To: <sip:9999 at 61.67.128.46>;tag=1743253937
Call-ID: 24d694d137058efa
CSeq: 1522816869 INVITE
Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, REFER, SUBSCRIBE, UPDATE
Allow-Events: refer
Contact: <sip:9999 at 192.168.4.197:5060>
Server: Media5-fone/3.6.1.961
Supported: replaces
Content-Length: 0



----------------------------------------
-- 2013-03-15 10:44:32 - Sent to 61.67.128.46:5060 from 192.168.4.197:5060
SIP/2.0 200 OK
Accept: application/reginfo+xml, application/sdp,
application/simple-message-summary, message/sipfrag, multipart/mixed,
multipart/related
Via: SIP/2.0/UDP
10.10.12.111:5060;branch=z9hG4bKe57e.1724a543.0;received=61.67.128.46,
SIP/2.0/UDP
211.75.166.164:5060;rport=5060;received=211.75.166.164;branch=z9hG4bK85dda1e
c7b4383de7
Record-Route: <sip:10.10.12.111;lr;ftag=6ec31b5c70;did=e46.c32c2496>
From: "55688" <sip:55688 at 61.67.128.46:5060>;tag=6ec31b5c70
To: <sip:9999 at 61.67.128.46>;tag=1743253937
Call-ID: 24d694d137058efa
CSeq: 1522816869 INVITE
Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, REFER, SUBSCRIBE, UPDATE
Allow-Events: refer
Contact: <sip:9999 at 192.168.4.197:5060>
Server: Media5-fone/3.6.1.961
Supported: replaces
Content-Disposition: session
Content-Type: application/sdp
Content-Length: 314

v=0
o=MxSIP 3518443235876611044 3518443235876611045 IN IP4 192.168.4.197
s=SIP Call
c=IN IP4 192.168.4.197
t=0 0
a=sendrecv
m=audio 10000 RTP/AVP 96 0 8 125
a=rtpmap:96 iLBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:125 telephone-event/8000
a=fmtp:96 mode=30
a=fmtp:125 0-15
a=sendrecv


----------------------------------------
-- 2013-03-15 10:44:34 - Sent to 61.67.128.46:5060 from 192.168.4.197:5060
SIP/2.0 200 OK
Accept: application/reginfo+xml, application/sdp,
application/simple-message-summary, message/sipfrag, multipart/mixed,
multipart/related
Via: SIP/2.0/UDP
10.10.12.111:5060;branch=z9hG4bKe57e.1724a543.0;received=61.67.128.46,
SIP/2.0/UDP
211.75.166.164:5060;rport=5060;received=211.75.166.164;branch=z9hG4bK85dda1e
c7b4383de7
Record-Route: <sip:10.10.12.111;lr;ftag=6ec31b5c70;did=e46.c32c2496>
From: "55688" <sip:55688 at 61.67.128.46:5060>;tag=6ec31b5c70
To: <sip:9999 at 61.67.128.46>;tag=1743253937
Call-ID: 24d694d137058efa
CSeq: 1522816869 INVITE
Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, REFER, SUBSCRIBE, UPDATE
Allow-Events: refer
Contact: <sip:9999 at 192.168.4.197:5060>
Server: Media5-fone/3.6.1.961
Supported: replaces
Content-Disposition: session
Content-Type: application/sdp
Content-Length: 314

v=0
o=MxSIP 3518443235876611044 3518443235876611045 IN IP4 192.168.4.197
s=SIP Call
c=IN IP4 192.168.4.197
t=0 0
a=sendrecv
m=audio 10000 RTP/AVP 96 0 8 125
a=rtpmap:96 iLBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:125 telephone-event/8000
a=fmtp:96 mode=30
a=fmtp:125 0-15
a=sendrecv


----------------------------------------
-- 2013-03-15 10:44:37 - Sent to 61.67.128.46:5060 from 192.168.4.197:5060
SIP/2.0 200 OK
Accept: application/reginfo+xml, application/sdp,
application/simple-message-summary, message/sipfrag, multipart/mixed,
multipart/related
Via: SIP/2.0/UDP
10.10.12.111:5060;branch=z9hG4bKe57e.1724a543.0;received=61.67.128.46,
SIP/2.0/UDP
211.75.166.164:5060;rport=5060;received=211.75.166.164;branch=z9hG4bK85dda1e
c7b4383de7
Record-Route: <sip:10.10.12.111;lr;ftag=6ec31b5c70;did=e46.c32c2496>
From: "55688" <sip:55688 at 61.67.128.46:5060>;tag=6ec31b5c70
To: <sip:9999 at 61.67.128.46>;tag=1743253937
Call-ID: 24d694d137058efa
CSeq: 1522816869 INVITE
Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, REFER, SUBSCRIBE, UPDATE
Allow-Events: refer
Contact: <sip:9999 at 192.168.4.197:5060>
Server: Media5-fone/3.6.1.961
Supported: replaces
Content-Disposition: session
Content-Type: application/sdp
Content-Length: 314

v=0
o=MxSIP 3518443235876611044 3518443235876611045 IN IP4 192.168.4.197
s=SIP Call
c=IN IP4 192.168.4.197
t=0 0
a=sendrecv
m=audio 10000 RTP/AVP 96 0 8 125
a=rtpmap:96 iLBC/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:125 telephone-event/8000
a=fmtp:96 mode=30
a=fmtp:125 0-15
a=sendrecv



-----Original Message-----
From: users-bounces at lists.opensips.org
[mailto:users-bounces at lists.opensips.org] On Behalf Of Nick Khamis
Sent: Friday, March 15, 2013 9:48 AM
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] two UACs behind the same nat

If OpenSIPS is behind the same NAT (i.e., 10.10.12), the you don't need the
nat fixups or even the RTPProxy stuff. Try commenting them out and checking.
Also, are you "rtpproxy_answer"  in the reply route?
Finally make sure you are starting rtp proxy correctly:

rtpproxy -f -s udp:192.168.2.5:7789 -l private/public -m 20000 -M
40000 -u root root -F -d INFO LOG_LOCAL0_

Hope this helps,

Nick.

On 3/14/13, Nick Chang <nick.chang at kland.com.tw> wrote:
> Hello Bodgan
>
>
>
> 2 UACs behind the same nat, I check my routing.
>
>
>
> UAC don't route to nat_fixups.
>
>
>
> But UACs checked My OpenSIPS private IP (10.10.12.111), Not Public IP.
>
>
>
> I don't know why? Do you have any suggestion??
>
>
>
> My Config
>
>
>
> route[generic_relay] {
>
> xlog("L_NOTICE","3 invite $si");
>
>         # for INVITEs enable some additional helper routes
>
>         #---- Helper route, if nat=yes in the R-URI  set flag 6 ----#
>
>         #----        This is used to Process REINVITES          ----#
>
>         if (subst_uri('/((sip:.*)||(sip:.*:.*));nat=yes/\1/')){
>
>                 setbflag(6);
>
>         };
>
>
>
>         #---- If caller(flag 5) or callee(flag 6) are behind NAT  ---#
>
>         #---- Call the route(6) to force the use of the RTP Proxy ---#
>
>         if (isflagset(5) || isbflagset(6)) {
>
>                 route(nat_fixups);
>
>         };
>
>
>
>         if (!t_relay()) {
>
>                 sl_reply_error();
>
>         };
>
>         exit;
>
> }
>
>
>
> route[nat_fixups] {
>
> xlog("L_NOTICE","4 NAT FIXED - $fu call $ru ");
>
>         #---- RTP Proxy handling ---#
>
>         if (is_method("BYE|CANCEL")) {
>
>                 unforce_rtp_proxy();
>
>         } else if (is_method("INVITE")){
>
>                 #---- Activates the RTP Proxy for the CALLEE ---#
>
>                 rtpproxy_offer();
>
>         };
>
>         # catch and fix replies
>
>         t_on_reply("2");
>
> }
>
>
>
> Thanks
>
> Nick
>
>
>
> From: Bogdan-Andrei Iancu [mailto:bogdan at opensips.org]
> Sent: Friday, March 15, 2013 12:32 AM
> To: OpenSIPS users mailling list
> Cc: Nick Chang
> Subject: Re: [OpenSIPS-Users] two UACs behind the same nat
>
>
>
> Hi Nick,
>
> Assuming routing is possible between the 2 UACs, you need to double 
> check that the IPs in SDP are not changed by proxy and points to the
actual UACs.
>
> Regards,
>
>
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
>
> On 03/11/2013 11:40 AM, Nick Chang wrote:
>
> Hello
>
>
>
> I have two UACs behind the same nat.
>
>
>
> A call B is OK. But it's not voice.
>
>
>
> Can everyone give me a suggestion??
>
>
>
> Thanks
>
> Nick
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
Users at lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list