Hi Vasilev,
You have a good point here - the quoting should not be done and hexa
escaping should be done for what's not allowed (including the = sign).
Could you please open a bug report on the OpenSIP tracker
(https://github.com/OpenSIPS/opensips/issues) ?
Moving the value as hdr param (from URI param) is not an option, as the
we need the value to be return in RURI (in sequential requests) - and
only the Contact URI is returned, not the hdr params.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
http://opensips.org/training/OpenSIPS_Bootcamp_2018/
On 08/21/2018 10:16 AM, vasilevalex wrote:
Hello.
OpenSIPS 2.4.2
I use topology hiding module without dialog module. So it changes Contact
URI, adding thinfo param (default).
But it is added like this:
Contact:
<sip:[0:0:0:0:0:0:0:1]:8061;transport=wss;thinfo="U2h5YhUORg5uUBNZW1dIUAQadlZjRlFWUV0DBHJXRGgWBhZdBwxxSWRaTVBWXxgGcF9pXVNUVg==">
I checked it with RFC3261
https://tools.ietf.org/html/rfc3261#section-25.1
Contact = ("Contact" / "m" ) HCOLON
( STAR / (contact-param *(COMMA contact-param)))
contact-param = (name-addr / addr-spec) *(SEMI contact-params)
name-addr = [ display-name ] LAQUOT addr-spec RAQUOT
addr-spec = SIP-URI / SIPS-URI / absoluteURI
display-name = *(token LWS)/ quoted-string
SIP-URI = "sip:" [ userinfo ] hostport
uri-parameters [ headers ]
SIPS-URI = "sips:" [ userinfo ] hostport
uri-parameters [ headers ]
uri-parameters = *( ";" uri-parameter)
uri-parameter = transport-param / user-param / method-param
/ ttl-param / maddr-param / lr-param / other-param
other-param = pname [ "=" pvalue ]
pname = 1*paramchar
pvalue = 1*paramchar
paramchar = param-unreserved / unreserved / escaped
param-unreserved = "[" / "]" / "/" / ":" / "&" / "+" / "$"
unreserved = alphanum / mark
mark = "-" / "_" / "." / "!" / "~" / "*" / "'"
/ "(" / ")"
escaped = "%" HEXDIG HEXDIG
contact-params = c-p-q / c-p-expires
/ contact-extension
c-p-q = "q" EQUAL qvalue
c-p-expires = "expires" EQUAL delta-seconds
contact-extension = generic-param
generic-param = token [ EQUAL gen-value ]
gen-value = token / host / quoted-string
quoted-string = SWS DQUOTE *(qdtext / quoted-pair ) DQUOTE
qdtext = LWS / %x21 / %x23-5B / %x5D-7E
/ UTF8-NONASCII
So between LAQUOT and RAQUOT there is addr-spec. And according
to RFC it can't contain quoted-string, or even DQUOTE symbol.
And can't contain EQUAL sign. Or they must be escaped.
But if it is possible to move "thinfo" from Contact URI to Contact params,
it can be quoted string, like it is now.
--
Sent from:
http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users