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@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@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@mydomain;tag=9y5zyjjrqb'
From: sip:jmillan@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@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@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@mydomain;tag=9y5zyjjrqb'
From: sip:jmillan@mydomain;tag=243wxuykw0'
Call-ID: b9q6ixruxbbt2ej5opqf'
CSeq: 3570 MESSAGE'
Content-Type: text/plain'
User-Agent: JsSIP 0.1.0'
Content-Length: 7'
'
lalaiii
++++
Regards.