[OpenSIPS-Users] DRouting in v2.2.3 is not overwriting the R-URI

John Quick john.quick at smartvox.co.uk
Tue Apr 18 11:51:45 EDT 2017

Update - problem solved.

It was bad data.  I had a value of 1 in the dr_rules.routeid field which caused do_routing to call route[1] which contained a t_relay statement.

This mistake was made after following the example for adding a new rule shown in opensipsctl help:
dr addrule '10,20' '+1' '20040101T083000' 0 0 '1,2' 'NA_RULE' 'NA routing'

...but this is a bad example because it will put a value of 0 in the routeid field.

I suggest the example be updated and shown like this:
dr addrule '10,20' '+1' '20040101T083000' 0 '' '1,2' 'NA_RULE' 'NA routing'

John Quick
Smartvox Limited

Thanks to Răzvan Crainea for trying to help.

>> Something quite strange is happening here. My initial assumption was 
>> wrong – this is not new behaviour in release v2.2.3.
>> I have two servers, both running v2.2.3 and both using DRouting. I 
>> only get this problem on one of them.
>> I added debug to show the number of branches just after calling 
>> do_routing(), like this:
>>          set_count("$branch(uri)", "$var(brcnt)");
>>          xlog("L_WARN", "    BRANCH-COUNT=> $var(brcnt)\n");
>> …Both servers report branch count = 0.
>> Also added the following xlog statement in a new branch route (and 
>> added a call to t_on_branch(2) to trigger the new branch route):
>>      xlog("L_WARN", "      Branch[2]: Branch ID $T_branch_idx  R-URI=$ru   Call-ID=$ci\n");
>> …On the server with the problem, it reports Branch ID 1, but on the 
>> server without the problem it reports Branch ID 0
>> On the server with the problem, the SIP packet capture shows the 
>> INVITE sent to itself first then the INVITE sent to the DR gateway second.
>> *John Quick
>> *Systems Consultant
>> SmartvoxLimited

>>> /Hello,/
>>> / /
>>> /While testing with v2.2.3 it looks like the behaviour of the 
>>> do_routing()/ /function in the DROUTING module has changed./ /  From 
>>> packet captures, I can see the call is parallel forking to the
>> original/
>>> /R-URI *and* to the first choice gateway destination from DRouting./ 
>>> /OpenSIPS sends two INVITE's - one to itself and the other to the DR
>> gateway./
>>> /The gateway seems to be added as a branch./ / / /I think this is a 
>>> bug. I don't believe this happened on earlier versions of/ 
>>> /OpenSIPS./ / / /John Quick/ /Smartvox Limited/
>>> /Web: www.smartvox.co.uk/
>>> / /
>>> /_______________________________________________/
>>> /Users mailing list/
>>> /Users at lists.opensips.org

More information about the Users mailing list