NAT and ACK (private IP/domain)

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

NAT and ACK (private IP/domain)

Julien Chavanton

I have a signaling problem, after connection "200 OK" the "ACK" is not sent correctly and the rest of the signaling as well.

Opensips is using the IP in the ACK line instead of the "To:", I am wandering how I should handle this  ?

I-phone (Siphone) : [hidden email]
X-lite : [hidden email]

Logging of ACK reception, where the problem start
Apr 23 13:51:09 osip /sbin/opensips[5446]: *****************signaling*****************
Apr 23 13:51:09 osip /sbin/opensips[5446]: 5 route[ACK][0] sip:[hidden email] -> sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 START PROCESSING MESSAGE
Apr 23 13:51:09 osip /sbin/opensips[5446]: *** RECORD ROUTE ***
Apr 23 13:51:09 osip /sbin/opensips[5446]: *** HOST NOT LOCAL ***  is_uri_host_local() !

I think this is my problem where the IP apear in the ACK line ?

"ACK sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 SIP/2.0."

#
U 74.56.45.88:5060 -> 10.0.4.201:5060
ACK sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.125:5060;rport;branch=z9hG4bKPjTSq-5uCDumvhdYNtigsDJwPrKvhqMM-C.
Max-Forwards: 70.
From: sip:[hidden email];tag=3FDO5jkip5p8pkCLNr.3TSz2gNrWxCy..
To: sip:[hidden email];tag=207ac245.
Call-ID: lywQ33yIAPEOG77lN93EbyXiHxji.FK-.
CSeq: 31501 ACK.
Route: <sip:10.0.4.201;lr;nat=yes>.
Content-Length:  0.
.


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: NAT and ACK (private IP/domain)

Bogdan-Andrei Iancu
HI Julian,

The ACK will be routed based on Route + RURI info. Route hdr made the
ACK to get to .201 and the RURI will continue to .71. The RURI from ACK
is taken from the Contact hdr of the 200 OK reply.

AMybe posting the whole stuff (INVITE+200 OK + ACK) will make things easier.

Regards,
Bogdan

Julien Chavanton wrote:

>
> I have a signaling problem, after connection "200 OK" the "ACK" is not
> sent correctly and the rest of the signaling as well.
>
> Opensips is using the IP in the ACK line instead of the "To:", I am
> wandering how I should handle this  ?
>
> I-phone (Siphone) : [hidden email] <mailto:[hidden email]>
> X-lite : [hidden email] <mailto:[hidden email]>
>
> Logging of ACK reception, where the problem start
> Apr 23 13:51:09 osip /sbin/opensips[5446]:
> *****************signaling*****************
> Apr 23 13:51:09 osip /sbin/opensips[5446]: 5 route[ACK][0]
> sip:[hidden email] ->
> sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 START PROCESSING
> MESSAGE
> Apr 23 13:51:09 osip /sbin/opensips[5446]: *** RECORD ROUTE ***
> Apr 23 13:51:09 osip /sbin/opensips[5446]: *** HOST NOT LOCAL ***  
> is_uri_host_local() !
>
> I think this is my problem where the IP apear in the ACK line ?
>
> "ACK sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 SIP/2.0."
>
> #
> U 74.56.45.88:5060 -> 10.0.4.201:5060
> ACK sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 SIP/2.0.
> Via: SIP/2.0/UDP
> 192.168.1.125:5060;rport;branch=z9hG4bKPjTSq-5uCDumvhdYNtigsDJwPrKvhqMM-C.
> Max-Forwards: 70.
> From: sip:[hidden email];tag=3FDO5jkip5p8pkCLNr.3TSz2gNrWxCy..
> To: sip:[hidden email];tag=207ac245.
> Call-ID: lywQ33yIAPEOG77lN93EbyXiHxji.FK-.
> CSeq: 31501 ACK.
> Route: <sip:10.0.4.201;lr;nat=yes>.
> Content-Length:  0.
> .
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

CDR Tools

Darren Sessions
Is using freeradius a requirement with CDRTools? or can I use DB  
access for everything? If so, how do I go about that or can someone  
point me in the right direction?

I've got CDRTools up and running btw with the Freeradius server, it  
just seems a bit of an extra component when I've got the database  
running anyways.

Just piped 15k calls through an opensips/cdrtools/mediaproxy install  
over the last week and have had very little to deal with (average load  
of 0 across all the servers as well). Many thanks to everyone involved  
with these projects!

Cheers,

  - Darren

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: NAT and ACK (private IP/domain)

Julien Chavanton
In reply to this post by Bogdan-Andrei Iancu
Re: [OpenSIPS-Users] NAT and ACK (private IP/domain)

Right, in the "200 OK" request the Contact as the private IP address.

I register with a domain name so I guess the same domain name as to be set in Contact so I was expecting :
- > Contact: <sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3>.
should be replaced by :
- > Contact: <sip:[hidden email]:33802;rinstance=8572c408a8cc28e3>.


I have fix_nated_contact(); both in ROUTE and in REPLY_ROUTE the make sure it is always executed, I understand it correctly
1.6.1. fix_nated_contact :  "Rewrites Contact HF to contain request's source address:port" 

In my case Opensips will need a domain name to find that the target is registered localy, how should I handle this, register with an IP ?


#
U 10.0.4.201:5060 -> 74.56.45.88:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 192.168.1.125:5060;received=74.56.45.88;rport=5060;branch=z9hG4bKPjSEGMUzJy5GjV8YCUETnWMdjV-gfyCn86.
Record-Route: <sip:10.0.4.201;lr;nat=yes>.
Contact: <sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3>.
To: <sip:[hidden email]>;tag=f9353e15.
From: <sip:[hidden email]>;tag=mpq.p-Mu98E8HBomB7Kh5SvmPzJisbwq.
Call-ID: eaFGOPK1Ah4PL8s0dQd2aDotzsaJTuHg.
CSeq: 2972 INVITE.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.
Record-Route: <sip:10.0.4.201;lr=on;nat=yes>.
Via: SIP/2.0/UDP 10.0.4.201;branch=z9hG4bK0135.5e99e0d.2.
Via: SIP/2.0/UDP 192.168.1.125:5060;received=74.56.45.88;rport=5060;branch=z9hG4bKPj2eYMnj8kZr0p7CSrA5rIIXRPI.uVmAQp.
Max-Forwards: 69.
From: sip:[hidden email];tag=mpq.p-Mu98E8HBomB7Kh5SvmPzJisbwq.
To: sip:[hidden email];tag=f9353e15.
Call-ID: eaFGOPK1Ah4PL8s0dQd2aDotzsaJTuHg.
CSeq: 2972 ACK.
Content-Length:  0.
P-hint: Route[6]: mediaproxy .
.
#
U 10.0.1.71:33802 -> 10.0.4.201:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 10.0.4.201;branch=z9hG4bK0135.5e99e0d.0.
Via: SIP/2.0/UDP 192.168.1.125:5060;received=74.56.45.88;rport=5060;branch=z9hG4bKPjSEGMUzJy5GjV8YCUETnWMdjV-gfyCn86.
Record-Route: <sip:10.0.4.201;lr;nat=yes>.
Contact: <sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3>.
To: <sip:[hidden email]>;tag=f9353e15.
From: <sip:[hidden email]>;tag=mpq.p-Mu98E8HBomB7Kh5SvmPzJisbwq.
Call-ID: eaFGOPK1Ah4PL8s0dQd2aDotzsaJTuHg.
CSeq: 2972 INVITE.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.
Content-Type: application/sdp.
User-Agent: X-Lite release 1100l stamp 47546.
Content-Length: 181.
.
v=0.
o=- 4 2 IN IP4 10.0.1.71.
s=CounterPath X-Lite 3.0.
c=IN IP4 10.0.1.71.
t=0 0.
m=audio 48428 RTP/AVP 3 0 8 101.
a=fmtp:101 0-15.
a=rtpmap:101 telephone-event/8000.
a=sendrecv.

 


From: Bogdan-Andrei Iancu [mailto:[hidden email]]
Sent: Thu 23/04/2009 5:50 PM
To: Julien Chavanton
Cc: [hidden email]
Subject: Re: [OpenSIPS-Users] NAT and ACK (private IP/domain)

HI Julian,

The ACK will be routed based on Route + RURI info. Route hdr made the
ACK to get to .201 and the RURI will continue to .71. The RURI from ACK
is taken from the Contact hdr of the 200 OK reply.

AMybe posting the whole stuff (INVITE+200 OK + ACK) will make things easier.

Regards,
Bogdan

Julien Chavanton wrote:


>
> I have a signaling problem, after connection "200 OK" the "ACK" is not
> sent correctly and the rest of the signaling as well.
>
> Opensips is using the IP in the ACK line instead of the "To:", I am
> wandering how I should handle this  ?
>
> I-phone (Siphone) : [hidden email] <[hidden email]>
> X-lite : [hidden email] <[hidden email]>
>
> Logging of ACK reception, where the problem start
> Apr 23 13:51:09 osip /sbin/opensips[5446]:
> *****************signaling*****************
> Apr 23 13:51:09 osip /sbin/opensips[5446]: 5 route[ACK][0]
> sip:[hidden email] ->
> sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 START PROCESSING
> MESSAGE
> Apr 23 13:51:09 osip /sbin/opensips[5446]: *** RECORD ROUTE ***
> Apr 23 13:51:09 osip /sbin/opensips[5446]: *** HOST NOT LOCAL *** 
> is_uri_host_local() !
>
> I think this is my problem where the IP apear in the ACK line ?
>
> "ACK sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 SIP/2.0."
>
> #
> U 74.56.45.88:5060 -> 10.0.4.201:5060
> ACK sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 SIP/2.0.
> Via: SIP/2.0/UDP
> 192.168.1.125:5060;rport;branch=z9hG4bKPjTSq-5uCDumvhdYNtigsDJwPrKvhqMM-C.
> Max-Forwards: 70.
> From: sip:[hidden email];tag=3FDO5jkip5p8pkCLNr.3TSz2gNrWxCy..
> To: sip:[hidden email];tag=207ac245.
> Call-ID: lywQ33yIAPEOG77lN93EbyXiHxji.FK-.
> CSeq: 31501 ACK.
> Route: <sip:10.0.4.201;lr;nat=yes>.
> Content-Length:  0.
> .
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: NAT and ACK (private IP/domain)

Julien Chavanton
Re: [OpenSIPS-Users] NAT and ACK (private IP/domain)
I understand a concept I was missing, once record_route() is called I have to do a

if(loose_route()){
  route(x);
}
 
I was trying to route it again using is_uri_host_local() and lookup("location") but  is_uri_host_local()  was failing because the domain name was replaced by an IP address.
 
I will continue to read and practice to understand concepts I am still missunderstanding.
 
thank you for your help


From: [hidden email] on behalf of Julien Chavanton
Sent: Thu 23/04/2009 6:48 PM
To: Bogdan-Andrei Iancu
Cc: [hidden email]
Subject: Re: [OpenSIPS-Users] NAT and ACK (private IP/domain)

Right, in the "200 OK" request the Contact as the private IP address.

I register with a domain name so I guess the same domain name as to be set in Contact so I was expecting :
- > Contact: <sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3>.
should be replaced by :
- > Contact: <sip:[hidden email]:33802;rinstance=8572c408a8cc28e3>.


I have fix_nated_contact(); both in ROUTE and in REPLY_ROUTE the make sure it is always executed, I understand it correctly
1.6.1. fix_nated_contact :  "Rewrites Contact HF to contain request's source address:port" 

In my case Opensips will need a domain name to find that the target is registered localy, how should I handle this, register with an IP ?


#
U 10.0.4.201:5060 -> 74.56.45.88:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 192.168.1.125:5060;received=74.56.45.88;rport=5060;branch=z9hG4bKPjSEGMUzJy5GjV8YCUETnWMdjV-gfyCn86.
Record-Route: <sip:10.0.4.201;lr;nat=yes>.
Contact: <sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3>.
To: <sip:[hidden email]>;tag=f9353e15.
From: <sip:[hidden email]>;tag=mpq.p-Mu98E8HBomB7Kh5SvmPzJisbwq.
Call-ID: eaFGOPK1Ah4PL8s0dQd2aDotzsaJTuHg.
CSeq: 2972 INVITE.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.
Record-Route: <sip:10.0.4.201;lr=on;nat=yes>.
Via: SIP/2.0/UDP 10.0.4.201;branch=z9hG4bK0135.5e99e0d.2.
Via: SIP/2.0/UDP 192.168.1.125:5060;received=74.56.45.88;rport=5060;branch=z9hG4bKPj2eYMnj8kZr0p7CSrA5rIIXRPI.uVmAQp.
Max-Forwards: 69.
From: sip:[hidden email];tag=mpq.p-Mu98E8HBomB7Kh5SvmPzJisbwq.
To: sip:[hidden email];tag=f9353e15.
Call-ID: eaFGOPK1Ah4PL8s0dQd2aDotzsaJTuHg.
CSeq: 2972 ACK.
Content-Length:  0.
P-hint: Route[6]: mediaproxy .
.
#
U 10.0.1.71:33802 -> 10.0.4.201:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 10.0.4.201;branch=z9hG4bK0135.5e99e0d.0.
Via: SIP/2.0/UDP 192.168.1.125:5060;received=74.56.45.88;rport=5060;branch=z9hG4bKPjSEGMUzJy5GjV8YCUETnWMdjV-gfyCn86.
Record-Route: <sip:10.0.4.201;lr;nat=yes>.
Contact: <sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3>.
To: <sip:[hidden email]>;tag=f9353e15.
From: <sip:[hidden email]>;tag=mpq.p-Mu98E8HBomB7Kh5SvmPzJisbwq.
Call-ID: eaFGOPK1Ah4PL8s0dQd2aDotzsaJTuHg.
CSeq: 2972 INVITE.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.
Content-Type: application/sdp.
User-Agent: X-Lite release 1100l stamp 47546.
Content-Length: 181.
.
v=0.
o=- 4 2 IN IP4 10.0.1.71.
s=CounterPath X-Lite 3.0.
c=IN IP4 10.0.1.71.
t=0 0.
m=audio 48428 RTP/AVP 3 0 8 101.
a=fmtp:101 0-15.
a=rtpmap:101 telephone-event/8000.
a=sendrecv.

 


From: Bogdan-Andrei Iancu [mailto:[hidden email]]
Sent: Thu 23/04/2009 5:50 PM
To: Julien Chavanton
Cc: [hidden email]
Subject: Re: [OpenSIPS-Users] NAT and ACK (private IP/domain)

HI Julian,

The ACK will be routed based on Route + RURI info. Route hdr made the
ACK to get to .201 and the RURI will continue to .71. The RURI from ACK
is taken from the Contact hdr of the 200 OK reply.

AMybe posting the whole stuff (INVITE+200 OK + ACK) will make things easier.

Regards,
Bogdan

Julien Chavanton wrote:


>
> I have a signaling problem, after connection "200 OK" the "ACK" is not
> sent correctly and the rest of the signaling as well.
>
> Opensips is using the IP in the ACK line instead of the "To:", I am
> wandering how I should handle this  ?
>
> I-phone (Siphone) : [hidden email] <[hidden email]>
> X-lite : [hidden email] <[hidden email]>
>
> Logging of ACK reception, where the problem start
> Apr 23 13:51:09 osip /sbin/opensips[5446]:
> *****************signaling*****************
> Apr 23 13:51:09 osip /sbin/opensips[5446]: 5 route[ACK][0]
> sip:[hidden email] ->
> sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 START PROCESSING
> MESSAGE
> Apr 23 13:51:09 osip /sbin/opensips[5446]: *** RECORD ROUTE ***
> Apr 23 13:51:09 osip /sbin/opensips[5446]: *** HOST NOT LOCAL *** 
> is_uri_host_local() !
>
> I think this is my problem where the IP apear in the ACK line ?
>
> "ACK sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 SIP/2.0."
>
> #
> U 74.56.45.88:5060 -> 10.0.4.201:5060
> ACK sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 SIP/2.0.
> Via: SIP/2.0/UDP
> 192.168.1.125:5060;rport;branch=z9hG4bKPjTSq-5uCDumvhdYNtigsDJwPrKvhqMM-C.
> Max-Forwards: 70.
> From: sip:[hidden email];tag=3FDO5jkip5p8pkCLNr.3TSz2gNrWxCy..
> To: sip:[hidden email];tag=207ac245.
> Call-ID: lywQ33yIAPEOG77lN93EbyXiHxji.FK-.
> CSeq: 31501 ACK.
> Route: <sip:10.0.4.201;lr;nat=yes>.
> Content-Length:  0.
> .
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CDR Tools

Adrian Georgescu
In reply to this post by Darren Sessions
As long as you end up in MySQL with the same data as Radius server use to write you do not need per se Freeradius.

Adrian


On Apr 23, 2009, at 7:15 PM, Darren Sessions wrote:

Is using freeradius a requirement with CDRTools? or can I use DB  
access for everything? If so, how do I go about that or can someone  
point me in the right direction?

I've got CDRTools up and running btw with the Freeradius server, it  
just seems a bit of an extra component when I've got the database  
running anyways.

Just piped 15k calls through an opensips/cdrtools/mediaproxy install  
over the last week and have had very little to deal with (average load  
of 0 across all the servers as well). Many thanks to everyone involved  
with these projects!

Cheers,

 - Darren

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: NAT and ACK (private IP/domain)

Bogdan-Andrei Iancu
In reply to this post by Julien Chavanton
Hi Julian,

If you take a look at the default cfg file that comes with opensips, you
will find it a good frame/example to understand the basics of routing in
SIP / OpenSIPS.

Regards,
Bogdan

Julien Chavanton wrote:

> I understand a concept I was missing, once record_route() is called I
> have to do a
>
> if(loose_route()){
>   route(x);
> }
>  
> I was trying to route it again using is_uri_host_local() and
> lookup("location") but  is_uri_host_local()  was failing because the
> domain name was replaced by an IP address.
>  
> I will continue to read and practice to understand concepts I am still
> missunderstanding.
>  
> thank you for your help
>
> ------------------------------------------------------------------------
> *From:* [hidden email] on behalf of Julien Chavanton
> *Sent:* Thu 23/04/2009 6:48 PM
> *To:* Bogdan-Andrei Iancu
> *Cc:* [hidden email]
> *Subject:* Re: [OpenSIPS-Users] NAT and ACK (private IP/domain)
>
> Right, in the "200 OK" request the Contact as the private IP address.
>
> I register with a domain name so I guess the same domain name as to be
> set in Contact so I was expecting :
> - > Contact: <sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3>.
> should be replaced by :
> - > Contact: <sip:[hidden email]:33802;rinstance=8572c408a8cc28e3>.
>
>
> I have fix_nated_contact(); both in ROUTE and in REPLY_ROUTE the make
> sure it is always executed, I understand it correctly
> 1.6.1. fix_nated_contact :  "Rewrites Contact HF to contain request's
> source address:port"
>
> In my case Opensips will need a domain name to find that the target is
> registered localy, how should I handle this, register with an IP ?
>
>
> #
> U 10.0.4.201:5060 -> 74.56.45.88:5060
> SIP/2.0 200 OK.
> Via: SIP/2.0/UDP
> 192.168.1.125:5060;received=74.56.45.88;rport=5060;branch=z9hG4bKPjSEGMUzJy5GjV8YCUETnWMdjV-gfyCn86.
> Record-Route: <sip:10.0.4.201;lr;nat=yes>.
> Contact: <sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3>.
> To: <sip:[hidden email]>;tag=f9353e15.
> From: <sip:[hidden email]>;tag=mpq.p-Mu98E8HBomB7Kh5SvmPzJisbwq.
> Call-ID: eaFGOPK1Ah4PL8s0dQd2aDotzsaJTuHg.
> CSeq: 2972 INVITE.
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
> SUBSCRIBE, INFO.
> Record-Route: <sip:10.0.4.201;lr=on;nat=yes>.
> Via: SIP/2.0/UDP 10.0.4.201;branch=z9hG4bK0135.5e99e0d.2.
> Via: SIP/2.0/UDP
> 192.168.1.125:5060;received=74.56.45.88;rport=5060;branch=z9hG4bKPj2eYMnj8kZr0p7CSrA5rIIXRPI.uVmAQp.
> Max-Forwards: 69.
> From: sip:[hidden email];tag=mpq.p-Mu98E8HBomB7Kh5SvmPzJisbwq.
> To: sip:[hidden email];tag=f9353e15.
> Call-ID: eaFGOPK1Ah4PL8s0dQd2aDotzsaJTuHg.
> CSeq: 2972 ACK.
> Content-Length:  0.
> P-hint: Route[6]: mediaproxy .
> .
> #
> U 10.0.1.71:33802 -> 10.0.4.201:5060
> SIP/2.0 200 OK.
> Via: SIP/2.0/UDP 10.0.4.201;branch=z9hG4bK0135.5e99e0d.0.
> Via: SIP/2.0/UDP
> 192.168.1.125:5060;received=74.56.45.88;rport=5060;branch=z9hG4bKPjSEGMUzJy5GjV8YCUETnWMdjV-gfyCn86.
> Record-Route: <sip:10.0.4.201;lr;nat=yes>.
> Contact: <sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3>.
> To: <sip:[hidden email]>;tag=f9353e15.
> From: <sip:[hidden email]>;tag=mpq.p-Mu98E8HBomB7Kh5SvmPzJisbwq.
> Call-ID: eaFGOPK1Ah4PL8s0dQd2aDotzsaJTuHg.
> CSeq: 2972 INVITE.
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
> SUBSCRIBE, INFO.
> Content-Type: application/sdp.
> User-Agent: X-Lite release 1100l stamp 47546.
> Content-Length: 181.
> .
> v=0.
> o=- 4 2 IN IP4 10.0.1.71.
> s=CounterPath X-Lite 3.0.
> c=IN IP4 10.0.1.71.
> t=0 0.
> m=audio 48428 RTP/AVP 3 0 8 101.
> a=fmtp:101 0-15.
> a=rtpmap:101 telephone-event/8000.
> a=sendrecv.
>
>  
>
> ------------------------------------------------------------------------
> *From:* Bogdan-Andrei Iancu [mailto:[hidden email]]
> *Sent:* Thu 23/04/2009 5:50 PM
> *To:* Julien Chavanton
> *Cc:* [hidden email]
> *Subject:* Re: [OpenSIPS-Users] NAT and ACK (private IP/domain)
>
> HI Julian,
>
> The ACK will be routed based on Route + RURI info. Route hdr made the
> ACK to get to .201 and the RURI will continue to .71. The RURI from ACK
> is taken from the Contact hdr of the 200 OK reply.
>
> AMybe posting the whole stuff (INVITE+200 OK + ACK) will make things
> easier.
>
> Regards,
> Bogdan
>
> Julien Chavanton wrote:
> >
> > I have a signaling problem, after connection "200 OK" the "ACK" is not
> > sent correctly and the rest of the signaling as well.
> >
> > Opensips is using the IP in the ACK line instead of the "To:", I am
> > wandering how I should handle this  ?
> >
> > I-phone (Siphone) : [hidden email] <mailto:[hidden email]>
> > X-lite : [hidden email] <mailto:[hidden email]>
> >
> > Logging of ACK reception, where the problem start
> > Apr 23 13:51:09 osip /sbin/opensips[5446]:
> > *****************signaling*****************
> > Apr 23 13:51:09 osip /sbin/opensips[5446]: 5 route[ACK][0]
> > sip:[hidden email] ->
> > sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 START PROCESSING
> > MESSAGE
> > Apr 23 13:51:09 osip /sbin/opensips[5446]: *** RECORD ROUTE ***
> > Apr 23 13:51:09 osip /sbin/opensips[5446]: *** HOST NOT LOCAL ***
> > is_uri_host_local() !
> >
> > I think this is my problem where the IP apear in the ACK line ?
> >
> > "ACK sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 SIP/2.0."
> >
> > #
> > U 74.56.45.88:5060 -> 10.0.4.201:5060
> > ACK sip:778@10.0.1.71:33802;rinstance=8572c408a8cc28e3 SIP/2.0.
> > Via: SIP/2.0/UDP
> >
> 192.168.1.125:5060;rport;branch=z9hG4bKPjTSq-5uCDumvhdYNtigsDJwPrKvhqMM-C.
> > Max-Forwards: 70.
> > From: sip:[hidden email];tag=3FDO5jkip5p8pkCLNr.3TSz2gNrWxCy..
> > To: sip:[hidden email];tag=207ac245.
> > Call-ID: lywQ33yIAPEOG77lN93EbyXiHxji.FK-.
> > CSeq: 31501 ACK.
> > Route: <sip:10.0.4.201;lr;nat=yes>.
> > Content-Length:  0.
> > .
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >  
>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: NAT and ACK (private IP/domain)

Jacek Konieczny
In reply to this post by Bogdan-Andrei Iancu
On Thu, Apr 23, 2009 at 07:50:06PM +0300, Bogdan-Andrei Iancu wrote:
> The ACK will be routed based on Route + RURI info. Route hdr made the
> ACK to get to .201 and the RURI will continue to .71. The RURI from ACK
> is taken from the Contact hdr of the 200 OK reply.

That is true, but Contact header may get corrupted in the way. I was
troubleshooting a NAT & ACK problem today too.

My setup was two SIP ATAs behind a NAT connecting via two chained
opensips proxies (with mediaproxy at one of them).

ATA1 --{NAT}--> PROXY1 --> PROXY2 --{NAT}--> ATA2


And that is what I found:


1. First, I did not have fix_contact() in onreply_route. So, the call
was nearly established, the called party (ATA2) responded with "200 OK",
but it never received the ACK, as it was sent (by PROXY2) to a private
address instead of NAT public IP. The private address was taken by ATA1
from the Contact header of the "200 OK" response.

2. I have added:

        if (client_nat_test("3")) {
                fix_contact();
        }

To both proxy opensips.cfg onreply_route. The same code was used in the
main route.  This didn't help much, as the called party still didn't
receive its ACK. This time it was not sent to the private IP, but to the
proxy.

After inspecting the traffic I found out, that both proxies had replaced
Contact header in the "200 OK" response. PROXY2 did it right: replaced
ATA2 private IP with the IP message was received from, so Contact was
valid. But the other proxy rewritten it again, replacing the public NAT
IP with the IP of PROXY2. This caused the ACK to loop inside PROXY2
instead of being sent to ATA2.

It seem client_nat_test("3") in onreply_route matches even if request
came directly (no NAT) from another proxy, which had already do the NAT
fix on Contact.  This doesn't seem to be the same way in main route
block.

3. I have replaced client_nat_test("3") with client_nat_test("1") and
this solved the problem.

Greets,
        Jacek

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CDR Tools

Darren Sessions
In reply to this post by Adrian Georgescu
Does that mean I can't delete the radacct tables? or can I just point CDRTools in a different direction via global.inc? and if so, what would I point it to? the acc table?


On Apr 24, 2009, at 1:42 AM, Adrian Georgescu wrote:

As long as you end up in MySQL with the same data as Radius server use to write you do not need per se Freeradius.

Adrian


On Apr 23, 2009, at 7:15 PM, Darren Sessions wrote:

Is using freeradius a requirement with CDRTools? or can I use DB  
access for everything? If so, how do I go about that or can someone  
point me in the right direction?

I've got CDRTools up and running btw with the Freeradius server, it  
just seems a bit of an extra component when I've got the database  
running anyways.

Just piped 15k calls through an opensips/cdrtools/mediaproxy install  
over the last week and have had very little to deal with (average load  
of 0 across all the servers as well). Many thanks to everyone involved  
with these projects!

Cheers,

 - Darren

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CDR Tools

Adrian Georgescu
You ask questions that can lead to infinite directions. You are the only one who can decide what is best to do if you do not like the standard setup.

Adrian

On Apr 24, 2009, at 4:17 PM, Darren Sessions wrote:

Does that mean I can't delete the radacct tables? or can I just point CDRTools in a different direction via global.inc? and if so, what would I point it to? the acc table?


On Apr 24, 2009, at 1:42 AM, Adrian Georgescu wrote:

As long as you end up in MySQL with the same data as Radius server use to write you do not need per se Freeradius.

Adrian


On Apr 23, 2009, at 7:15 PM, Darren Sessions wrote:

Is using freeradius a requirement with CDRTools? or can I use DB  
access for everything? If so, how do I go about that or can someone  
point me in the right direction?

I've got CDRTools up and running btw with the Freeradius server, it  
just seems a bit of an extra component when I've got the database  
running anyways.

Just piped 15k calls through an opensips/cdrtools/mediaproxy install  
over the last week and have had very little to deal with (average load  
of 0 across all the servers as well). Many thanks to everyone involved  
with these projects!

Cheers,

 - Darren

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: CDR Tools

Darren Sessions
Not that I don't like the standard setup, I just think that one less layer of things to have to work with, the better is all.

Mainly just making sure that I'm not shooting myself in the foot trying to get away from the radius piece and also that I'm not going doing a path that's going to be uber complex or difficult to setup.

Many thanks,

 - Darren


On Apr 24, 2009, at 8:26 AM, Adrian Georgescu wrote:

You ask questions that can lead to infinite directions. You are the only one who can decide what is best to do if you do not like the standard setup.

Adrian

On Apr 24, 2009, at 4:17 PM, Darren Sessions wrote:

Does that mean I can't delete the radacct tables? or can I just point CDRTools in a different direction via global.inc? and if so, what would I point it to? the acc table?


On Apr 24, 2009, at 1:42 AM, Adrian Georgescu wrote:

As long as you end up in MySQL with the same data as Radius server use to write you do not need per se Freeradius.

Adrian


On Apr 23, 2009, at 7:15 PM, Darren Sessions wrote:

Is using freeradius a requirement with CDRTools? or can I use DB  
access for everything? If so, how do I go about that or can someone  
point me in the right direction?

I've got CDRTools up and running btw with the Freeradius server, it  
just seems a bit of an extra component when I've got the database  
running anyways.

Just piped 15k calls through an opensips/cdrtools/mediaproxy install  
over the last week and have had very little to deal with (average load  
of 0 across all the servers as well). Many thanks to everyone involved  
with these projects!

Cheers,

 - Darren

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users