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

Kingsley Tart kingsley at dns99.co.uk
Tue Apr 27 13:36:04 EST 2021


Thanks. I actually wondered about that behaviour after I sent my
initial email, tested it and found that it did that, but it's good to
know that it's deliberate behaviour.

Sorry to spam the list, I'm getting quite embarrassed about all of my
emails :(

Cheers,
Kingsley.

On Tue, 2021-04-27 at 16:15 +0300, Liviu Chircu wrote:
> 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,
> 




More information about the Users mailing list