[OpenSIPS-Users] a comma ending a parameter list string?

Liviu Chircu liviu at opensips.org
Tue Apr 27 13:15:16 EST 2021


On 27.04.2021 15:42, Kingsley Tart wrote:
> 	$var(paramstr) = "h=BT1;dir=in;dprulesRX=1,2,3;dprulesTX=4,100";
> 	xlog("PARAMSTR='$var(paramstr)'\n");
> 	xlog("PARAMCOUNT='$(var(paramstr){param.count})'\n");
> ...
>
> Is this deliberate behaviour? OpenSIPS 3.1, FWIW.

Hi,

Yes, that is RFC 3261 behavior.  You are not allowed to put "," in 
either a SIP URI parameter name or its value.

However, since you have invoked this part of the RFC:

"A string of text is parsed as a single word if it is quoted using
    double-quote marks.  In quoted strings, quotation marks (") and
    backslashes (\) need to be escaped."

... OpenSIPS kindly obliges and parses the entire parameter value, with 
whatever content it may have.

Regards,

-- 
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com
OpenSIPS eBootcamp 2021 | www.opensips.org/training




More information about the Users mailing list