[SR-Users] Single-quoted vs double-quoted params in Path/Route

Andreas Granig agranig at sipwise.com
Mon Jun 4 18:37:20 CEST 2012


Hi guys,

When I implemented the Path module 6 years ago, I chose to enclose the
received-URI in double-quotes, like this:

Path: <sip:1.2.3.4:5060;received="sip:1.2.3.5:1234;transport=tcp">

This Path value is stored in usrloc by registrar module, and is
converted to a Route in a subsequent request. This worked fine so far,
because there's the logic in parser/parse_param.c to handle
double-quoted parameters.

Now while doing some interop tests with another platform, it turned out
that double-quotes are not allowed in URI params (see
https://lists.cs.columbia.edu/pipermail/sip-implementors/2008-May/019335.html,
and in the grammar the allowed chars in the "unreserved" definition are
"alphanum" and "mark", where "mark" is only "-" / "_" / "." / "!" / "~"
/ "*" / "'" / "(" / ")" ).

Anyways, to fully comply with RFC3261, I'd like to push a bugfix to path
module to use single-quotes instead, however it also needs a change in
the parser to use parse_quoted_param() also in case of single-quoted
params (which hasn't been handled at all until now).

My question now is if there are any concerns on your side with handling
single-quoted URI params the way we handle double-quoted ones? If we
were strict, we'd actually need to remove the handling for double-quoted
ones, but for backwards-compatibility I'd rather keep it there.

Comments?

Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120604/d68d7519/attachment.pgp>


More information about the sr-users mailing list