<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi Sa&uacute;l,<br>
    <br>
    I do not think that this has any implications for strict routers, as
    if the previous hop was a strict router, the R-URI would not contain
    a ;gr parameter, as the current proxy would not have added the
    Record-Route header with a ;gr param, so I don't see any way that a
    prev. hop strict router can get treated as a loose router with the
    new patch.<br>
    <br>
    About the other idea, with the adding of a new parameter to the rr
    module to disable strict routing support, I don't really see it as
    more generic, and frankly I cannot even see how it would work.
    Because what you want to accomplish here is to properly route
    requests that have in the R-URI a GRUU within your domain. So what
    would you do, always set that RR parameter ? Because at startup you
    can't know if you will generate any GRUUs or not.<br>
    <br>
    Regards,<br>
    <pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a> </pre>
    <br>
    On 03/21/2012 10:43 AM, Sa&uacute;l Ibarra Corretg&eacute; wrote:
    <blockquote
      cite="mid:DDFF32A8-9DED-425F-AE76-2173915F7612@ag-projects.com"
      type="cite">
      <pre wrap="">Hi,

On Mar 20, 2012, at 1:20 PM, Sa&uacute;l Ibarra Corretg&eacute; wrote:

</pre>
      <blockquote type="cite">
        <pre wrap="">Hi,

I've been testing and analyzing the GRUU implementation and I think we need to fix the loose_route function to properly accommodate GRUU support. Lets take the following simple case (proxy does record routing):

- Alice calls Bob (both users of the same domain, same proxy)
- Bob replies with 200 OK and his public GRUU in the Contact header: <a class="moz-txt-link-rfc2396E" href="mailto:sip:bob@example.com;gr=foobar">"sip:bob@example.com;gr=foobar"</a>
- Alice send a re-INVITE to put the call on hold

At this point, Alice sent a SIP request with Bob's GRUU as the RURI and the Proxy IP in a Route header. Since it's a re-INVITE we'd call loose_route. However, loose_route will think that the previous hop was a strict router, because it will see it's own domain in the RURI and the route set is not preloaded because this is an in-dialog request.

This can be fixed with the following configuration trick:

   - Check if the RURI of an in-dialog request contains the ;gr parameter.
   - If it does, lookup the location
   - Do loose_route

Now lets take another case: Alice and Bob are still on the same domain different proxies (Alice is at P1 and Bob at P2), and both proxies do record routing.

- Alice calls Bob 
- Bob replies with 200 OK and his public GRUU in the Contact header: <a class="moz-txt-link-rfc2396E" href="mailto:sip:bob@example.com;gr=foobar">"sip:bob@example.com;gr=foobar"</a>
- Alice send a re-INVITE to put the call on hold

When alice sends the re-INVITE, it will contain Bob's GRUU as the RURI and 2 Route headers, one pointing to P1 and another one pointing to P2. If P1 calls loose_route it will act as the previous hop was a strict router, but it wasn't, what needs to happen is that the request arrives at P2 with the RURI untouched and then P2 can lookup the location and route the request to Bob.

The simple case can be solved with configuration, but the advanced one can't, so I propose that the loose_route function adds an extra check: if is_myself return true, check if the URI has the gr parameter. In such case, don't assume the previous hop was a strict router, but a loose router.


</pre>
      </blockquote>
      <pre wrap="">
After testing what I explained above the (minor) fix I propose seems to do the job, please find it attached. I _think_ it doesn't have any implications if strict routers are in the path, but I can't be 100% sure since I can't test that.

Please have a look at the GRUU issues I mailed recently when time allows :-)


Regards,</pre>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>


--
Sa&uacute;l Ibarra Corretg&eacute;
AG Projects



</pre>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
    </blockquote>
  </body>
</html>