I'm having an issue with topoh module in Kamailio 3.1.0. When Contact header is formed like this:
       Contact: 0991
<sip:192.168.0.107;line=sr-N6IAzBysz.tyz.D4M.VLOBMfOBFuWxvfMxV4>
The other party responds properly. But when there is no angle brackets in Contact:
       Contact:
sip:192.168.0.107;line=sr-N6IAzB3AWxyfz.stM.quOBFZMJZfWxj7W.y-MljAWBy*

Really, many parsers implement "prefer shift to reduce" principle, which means if something can be interpreted in more enclosed expression, it will be interpreted this way and no as part of less enclosed expression so ;line is interpreted as header parameter but not URI parameter.

RFC 3261 section 20 suggests that any URI parameters be contained within angle brackets:
===
   The Contact, From, and To header fields contain a URI.  If the URI
   contains a comma, question mark or semicolon, the URI MUST be
   enclosed in angle brackets (< and >).  Any URI parameters are
   contained within these brackets.  If the URI is not enclosed in angle
   brackets, any semicolon-delimited parameters are header-parameters,
   not URI parameters.
===
I think the topoh module should force the angle brackets.
BTW it seems that parameter needs to be urlencoded, see rule 'other-param' in RFC 3261 section 25.1:

other-param       =  pname [ "=" pvalue ]
pname             =  1*paramchar
pvalue            =  1*paramchar
paramchar         =  param-unreserved / unreserved / escaped
param-unreserved  =  "[" / "]" / "/" / ":" / "&" / "+" / "$"

No .-* characters are allowed in the paramchar. But at least that's not causing me any problems.

--
Sincerely,
Andrew Pogrebennyk

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to