[sr-dev] Testing GRUU in Kamailio 3.3.

Daniel-Constantin Mierla miconda at gmail.com
Thu Jun 14 19:27:41 CEST 2012


Hello,

if the request is within dialog and r-uri is a gruu, you have to use 
lookup(...) function.

There is a function is_gruu() in siputils that will detect if r-uri is 
gruu and can be used in config file to build the right logic.

Cheers,
Daniel

On 6/14/12 7:23 PM, José Luis Millán wrote:
> Hi,
>
> Trying the GRUU implementation on Registrar module (Kamailio Version
> 3.3), I found that the proxy does not rewrite the Request URI for
> in-dialog requests as stated in RFC 5627 6.2.
>
> ++++
>     If the Request-URI contains the "gr" URI parameter and is equivalent,
>     based on URI comparison, to a GRUU which is currently valid within
>     the domain, processing proceeds as it would for any other URI present
>     in the location service, as defined in Section 16.5 of RFC 3261 [1],
>     except that the "gr" URI parameter is not removed as part of the
>     canonicalization process.  This is the case for both out-of-dialog
>     requests targeted to the GRUU, and mid-dialog requests targeted to
>     the GRUU (in which case the incoming request would have a Route
>     header field value containing the URI that the proxy used for record-
>     routing.).
>
>     Note that the "gr" URI parameter is retained just for the purposes of
>     finding the GRUU in the location service; if a match is found, the
>     Request-URI will be rewritten with the registered contacts, replacing
>     the GRUU and its "gr" URI parameter.  The "gr" URI parameter is not
>     carried forward into the rewritten Request-URI.
> ++++
>
>
> Here an in-dialog MESSAGE coming to Kamailio and routed-out. The
> incoming request URI has the 'gr' parameter and also has the outgoing
> request, which should be rewritten with the registered contact (which
> hasn't got the 'gr' parameter) .
>
> ++++
> MESSAGE sip:one at mydomain;gr=urn:uuid:820e1a10-ffc9-44fd-ae36-2009d835deaf
> SIP/2.0'
> Route: <sip:KAMAILIO;transport=tcp;lr=on>'
> Route: <sip:OUTBOUND_PROXY:9090;transport=tcp;lr;ovid=fef2d723>'
> Route: <sip:f2abb14cb6 at OUTBOUND_PROXY:10080;transport=ws;lr;ovid=fef2d723>'
> Via: SIP/2.0/TCP
> OUTBOUND_PROXY:9090;branch=z9hG4bK1b8e92e2b075b4fcb9f177ab9ea732ca88ac6221;rport'
> Via: SIP/2.0/TCP
> 192.32.232.12;branch=z9hG4bK3609852;received=PUBLIC_IP'
> Max-Forwards: 8'
> To: sip:one at mydomain;tag=9y5zyjjrqb'
> From: sip:jmillan at mydomain;tag=243wxuykw0'
> Call-ID: b9q6ixruxbbt2ej5opqf'
> CSeq: 3570 MESSAGE'
> Content-Type: text/plain'
> User-Agent: JsSIP 0.1.0'
> Content-Length: 7'
> '
> lalaiii
>
> MESSAGE sip:one at mydomain;gr=urn:uuid:820e1a10-ffc9-44fd-ae36-2009d835deaf
> SIP/2.0'
> Route: <sip:OUTBOUND_PROXY:9090;transport=tcp;lr;ovid=fef2d723>'
> Route: <sip:f2abb14cb6 at OUTBOUND_PROXY:10080;transport=ws;lr;ovid=fef2d723>'
> Via: SIP/2.0/TCP KAMAILIO;branch=z9hG4bKf316.d94709f5.0;i=2'
> Via: SIP/2.0/TCP
> OUTBOUND_PROXY:9090;branch=z9hG4bK1b8e92e2b075b4fcb9f177ab9ea732ca88ac6221;rport=39080'
> Via: SIP/2.0/TCP 192.32.232.12;branch=z9hG4bK3609852;received=PUBLIC_IP'
> Max-Forwards: 7'
> To: sip:one at mydomain;tag=9y5zyjjrqb'
> From: sip:jmillan at mydomain;tag=243wxuykw0'
> Call-ID: b9q6ixruxbbt2ej5opqf'
> CSeq: 3570 MESSAGE'
> Content-Type: text/plain'
> User-Agent: JsSIP 0.1.0'
> Content-Length: 7'
> '
> lalaiii
> ++++
>
> Regards.
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw




More information about the sr-dev mailing list