Hello

 

I have a one question about nat processing of Opensips.

 

There is such scheme

 

UAC1 (softphone behind nat) à Opensips -> UAC2 (another softswitch), i.e.
UAC1 initiates a call to Opensips and a signaling port = 5068.

 

So UAC2 becomes “ringing” by sending 183 message.

 

In attachment 183 message from UAC2 and some parts of opensips.cfg

 

After 183 processing by Opensips port in Contact header of 183 (and later
200 OK) messages become 5060, i.e. Opensips detects NAT and changes Contact
header.

 

So my question is, Why does Opensips changes Contact header?

Once Opensips detects nat transaction (setting setflag(21)) is it check all
reply messages (and doesn`t matter from which UAC they have been received)
or Opensips can detect direction and makes decision about nat process?

 

Thank you  for any help.

 

 

 

 

 

<<image001.gif>>

U 2013/11/22 08:56:58.606648 2.2.2.2:5060 -> 1.1.1.1:5068
SIP/2.0 183 Progress.
Via: SIP/2.0/UDP 1.1.1.1:5068;branch=z9hG4bK8b6b.d794d636.0.
Via: SIP/2.0/UDP 
192.168.18.150:41314;rport=43238;received=3.3.3.3;branch=z9hG4bK-d8754z-37977264babb1a1c-1---d8754z-.
Record-Route: <sip:AQEAEBU0TSMfDQMFY3/lbBsPg80DAAQUm+/[email protected];lr>.
Record-Route: <sip:[email protected];lr>.
Record-Route: <sip:1.1.1.1:5068;lr;ftag=9b44a312;did=486.b9e72ff6>.
From: <sip:[email protected]:5068;transport=UDP>;tag=9b44a312.
To: 
<sip:[email protected]:5068;transport=UDP>;tag=8maN3eG8u*ECE8XhvLvxAhPEyZHydAAq.
Call-ID: YWZlNGYwMTcwNmMxZjE3MGYwNGUxNGQ3NzY4MTEwZTU..
CSeq: 2 INVITE.
Contact: <sip:[email protected]:5061;transport=UDP>.
Server: TS-v4.6.0-09d.
Content-Length: 0.

2.2.2.2 - UAC2
1.1.1.1 - Opensips
3.3.3.3 - NAT

******** Opensips.cfg ***************

modparam("usrloc", "nat_bflag", 10)

Route [2] {
…
  if ($Rp=="5068") {
     if (nat_uac_test("55")) {
     fix_nated_contact();
     setflag(21);
     }
  }
…
}

onreply_route[1] {
….
if (isbflagset(10) || (isflagset(21) && nat_uac_test("55"))) 
fix_nated_contact();
….
}
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to