Hi Bogdan,

I understand that 200 OK should not be fixed by proxyA. Maybe what I
don't understand is what nat_uac_test("2") does and when to use it. 

Following is an example where 
clientA = [EMAIL PROTECTED]
clientB = [EMAIL PROTECTED]
proxyA = 213.5.43.4
proxyB = 213.5.43.134

When proxyA goes in the onreply_route for the 200 OK, nat_uac_test("23")
returns true (I guess because of the "2" flag) and proxyA fixes the
contact again which is wrong. So, would it be safe to use
nat_uac_test("23") for the requests and nat_uac_test("21") for the
replies? I am afraid this would break the simple case with 2 NATed
clients and only one proxy:
clientA ------> proxyA ------> clientC

thank you for your help

George

#
U 2007/08/08 10:11:34.233164 213.5.43.134:5060 -> 213.5.43.4:5060
SIP/2.0 200 Ok.
Via: SIP/2.0/UDP 213.5.43.4;rport=5060;branch=z9hG4bK322.eea78413.0.
Via: SIP/2.0/UDP
192.168.1.39;received=213.5.17.226;rport=5060;branch=z9hG4bKc0a801270000
002c46b96cbb000000a000000087.
Record-Route: <sip:213.5.43.134;lr=on;ftag=109517115931019>.
Record-Route: <sip:213.5.43.4;lr=on;ftag=109517115931019>.
From: "222" <sip:[EMAIL PROTECTED]>;tag=109517115931019.
To: <sip:[EMAIL PROTECTED]>;tag=0r8u9ziv3g.
Call-ID: [EMAIL PROTECTED]
CSeq: 2 INVITE.
Contact: <sip:[EMAIL PROTECTED]:5060;transport=udp;line=9yt55o5b>.
User-Agent: snom190-3.56w.
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE,
PRACK, MESSAGE, INFO.
Allow-Events: talk, hold, refer.
Supported: timer, 100rel, replaces.
Content-Type: application/sdp.
Content-Length: 208.
.
v=0.
o=root 1592588598 1592588598 IN IP4 213.5.17.236.
s=call.
c=IN IP4 213.5.17.236.
t=0 0.
m=audio 10116 RTP/AVP 8 101.
a=rtpmap:8 pcma/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=sendrecv.

#
U 2007/08/08 10:11:34.234013 213.5.43.4:5060 -> 213.5.17.226:5060
SIP/2.0 200 Ok.
Via: SIP/2.0/UDP
192.168.1.39;received=213.5.17.226;rport=5060;branch=z9hG4bKc0a801270000
002c46b96cbb000000a000000087.
Record-Route: <sip:213.5.43.134;lr=on;ftag=109517115931019>.
Record-Route: <sip:213.5.43.4;lr=on;ftag=109517115931019>.
From: "222" <sip:[EMAIL PROTECTED]>;tag=109517115931019.
To: <sip:[EMAIL PROTECTED]>;tag=0r8u9ziv3g.
Call-ID: [EMAIL PROTECTED]
CSeq: 2 INVITE.
Contact: <sip:[EMAIL PROTECTED]:5060;transport=udp;line=9yt55o5b>.
User-Agent: snom190-3.56w.
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE,
PRACK, MESSAGE, INFO.
Allow-Events: talk, hold, refer.
Supported: timer, 100rel, replaces.
Content-Type: application/sdp.
Content-Length: 208.
P-hint: NATed reply.
.
v=0.
o=root 1592588598 1592588598 IN IP4 213.5.17.236.
s=call.
c=IN IP4 213.5.17.236.
t=0 0.
m=audio 10116 RTP/AVP 8 101.
a=rtpmap:8 pcma/8000.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=sendrecv.




> -----Original Message-----
> From: Bogdan-Andrei Iancu [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, August 08, 2007 9:50 AM
> To: Papadopoulos Georgios
> Cc: users@openser.org
> Subject: Re: [OpenSER-Users] NAT question
> 
> Hi George,
> 
> each proxy should fix what it detects. ProxyA will take care 
> of the traffic related to A (since it detects A as NATed) and 
> ProxyB should take care of traffic for B (as it sees B as 
> nated). So, the 200 OK must be fixed only by proxyB.
> 
> Regards,
> bogdan
> 
> Papadopoulos Georgios wrote:
> > Hello all,
> >  
> > I need some advice from all you NAT experts. Assume that we 
> have two 
> > OpenSER proxies serving two different domains and they both use 
> > nathelper. Also assume that their configuration is 
> identical and looks 
> > roughly like:
> >  
> > route {
> > ...
> >         record_route();
> >  
> >         if (nat_uac_test("23")) {
> >                 if (method!="REGISTER" &&
> > !is_present_hf("Record-Route")) {
> >                     fix_nated_contact();
> >                 }
> >         }
> >  
> >         t_on_reply("1");
> > }
> >  
> > onreply_route[1] {
> >         if (nat_uac_test("23")) {
> >                 fix_nated_contact();
> >         };
> > }
> > clientA and clientB are both behind NAT. [EMAIL PROTECTED] 
> > <mailto:[EMAIL PROTECTED]> sends an INVITE to [EMAIL PROTECTED] 
> > <mailto:[EMAIL PROTECTED]> through proxyA:
> >  
> > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>  -----> ProxyA 
> -----> ProxyB
> > ------> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> >  
> > ProxyA detects that clientA is behind NAT and fixes the contact. 
> > ProxyB finds the Record-Route header, so it does not fix 
> the contact. 
> > My question is about how to handle the 200 OK. With this 
> configuration 
> > both proxies detect that clientB is behind NAT and the contact gets 
> > fixed twice. Is there a way to avoid this?
> >  
> > thank you
> >  
> > George
> >  
> >  
> >  
> >  
> >
> >
> >   Disclaimer
> >
> > The information in this e-mail and any attachments is 
> confidential. It 
> > is intended solely for the attention and use of the named 
> > addressee(s). If you are not the intended recipient, or person 
> > responsible for delivering this information to the intended 
> recipient, 
> > please notify the sender immediately. Unless you are the intended 
> > recipient or his/her representative you are not authorized to, and 
> > must not, read, copy, distribute, use or retain this message or any 
> > part of it. E-mail transmission cannot be guaranteed to be 
> secure or 
> > error-free as information could be intercepted, corrupted, lost, 
> > destroyed, arrive late or incomplete, or contain viruses.
> >
> > 
> ----------------------------------------------------------------------
> > --
> >
> > _______________________________________________
> > Users mailing list
> > Users@openser.org
> > http://openser.org/cgi-bin/mailman/listinfo/users
> >   
> 
> 

_______________________________________________
Users mailing list
Users@openser.org
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to