Quantcast

DRouting in v2.2.3 is not overwriting the R-URI

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

DRouting in v2.2.3 is not overwriting the R-URI

John Quick
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DRouting in v2.2.3 is not overwriting the R-URI

Razvan Crainea-3
Hi, John!

The do_routing() function is not adding a branch so it must be added by
someone/something else.
What branch is first sent? The one to the gateway, or the one? Can you
provide a trace for such a call? If privacy is a concern, send it privately.

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 04/13/2017 04:48 PM, John Quick wrote:

> 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
> [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
|  
Report Content as Inappropriate

Re: DRouting in v2.2.3 is not overwriting the R-URI

John Quick
In reply to this post by John Quick
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


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