[OpenSIPS-Devel] [ opensips-Patches-3510049 ] Allow $ru and $du to be changed in local_route

SourceForge.net noreply at sourceforge.net
Thu Mar 22 17:01:40 CET 2012


Patches item #3510049, was opened at 2012-03-22 04:46
Message generated for change (Comment added) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3510049&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: modules
Group: trunk
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: saghul (saghul)
>Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: Allow $ru and $du to be changed in local_route

Initial Comment:
Hi,

Currently local_route doesn't allow the Request-URI not the destination URI to be changed, which is probably OK for many cases but I came across a case in which I can't solve a routing problem without setting the $du in the local_route.

Scenario is as follows:

Alice <--> P1 <--> P2 <--> Bob

Alice and Bob belong to the same domain and are both registered on P2. P2 alo has dialog ping feature enabled.

Alice happens to use GRUU, so her Contact header's URI looks like this: sip:alice at atlanta.com;gr=1234567890

When P2 generates the in-dialog OPTIONS request for Alice, it will contain Alice's GRUU as the RURI and P1 in a Route header. Because P2 is Alice's registrar, P1 will not know how to route that request.

A workaround for this situation which doesn't require (presumably) complex changes is to self-forward the OPTIONS request in P2, then in the main routing block to a lookup() to get the real location of Alice, and loose_route(). This way, P1 will get the packet with Alice's received contact in the RURI and will know how to route it.

Self forwarding could be avoided if lookup() was allowed in the local_route, but I didn't want to go that far.

The attached patch allows $ru and $du to be changed in the local_route to be able to deal with the scenario described above.


Regards,

--
Saúl Ibarra Corretgé
AG Projects


----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-03-22 09:01

Message:
uploaded on trunk with some changes.

Thanks and regards,
Bogdan

----------------------------------------------------------------------

Comment By: saghul (saghul)
Date: 2012-03-22 05:13

Message:
Sourceforge is giving me an error when uploading the file :-S Here it goes:
http://dl.dropbox.com/u/2243619/local_route_uris.diff

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2012-03-22 05:10

Message:
Saul, you forgot to attach the patch :D.

Regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3510049&group_id=232389



More information about the Devel mailing list