[OpenSIPS-Users] RR, alias and concurrent SIP entities

Gremaud Odin odin.gremaud at nexcom.fr
Thu Aug 11 15:54:41 CEST 2011

Hello everyone,

I'm quite new at using OpenSIPS, and I'm facing an issue that was 
fortunately solved, but I do not fully understand why this solved the 
issue... Let me explain.

I'm running an OpenSIPS 1.6.4-2 on the port 5060 while a UA is also 
running on the same server, but on port 5062. I've RR configured with 
the enable_full_lr parameter set to 1 (I'm planning to remove it, as it 
becomes deprecated in 1.7), and multi-domain routing with the server IP 
address in the list (with some other aliases). OpenSIPS forwards the 
traffic from the local UA to other clients, either local too, or 
somewhere else (e.g. via an SBC). The configuration is standard, with 
almost no differences with the default script.

[UA] <----------> [OpenSIPS] <-------------> 
[Rest of the world]

The UA sends its requests to OpenSIPS, which processes the request 
according to the destination. It applies RR and create a Route: as the 
trace below suggests, which is the received response:

ACK sip: SIP/2.0\r\n
     From: <sip:xyz at abc>;tag=-----\r\n
     To: <sip:uvw at abc>;tag=-----\r\n
     Route: <sip:;lr=on>\r\n

 From what I understand, if OpenSIPS sees one of its own IP addresses as 
the RURI (aliases or domain), it will apply strict routing (instead of 
the usual loose routing), using the Route: header. In this case, this 
would be quite logical: is its IP address, so it uses the 
Route: header, and the UA will never receive any response.

I read some very interesting discussions occured during the month of 
April concerning this matter ("loose_route: loop on ACK requests" from 
Noel R. Morais and "dlg_validate_dialog errors in loose_route" from Jeff 
Pyle), and the solution was the same each time: remove the 
aliases/domain entries, so that the URI matching (at that time, string 
comparison) would not detect the RURI as "myself". A patch was applied 
by the end of April with an enhanced URI matching (SIP-wise URI matching).

However, I checked the source code (my C/C++ knowledge is quite rusted, 
but I can still understand most of the codes) for the latest 1.6 branch 
(1.6.4-2, if I'm not mistaken), and I noticed that this code portion is 
already added, but that it, from my succinct C interpretation, only 
apply to dialog module. Does RR without dialog handling still requires 
the modification mentioned above or am I missing something trivial here?

Odin Gremaud

More information about the Users mailing list