From miconda@gmail.com Tue Oct 8 16:54:33 2019 From: Daniel-Constantin Mierla To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Error parsing parameter value Date: Tue, 08 Oct 2019 16:54:28 +0200 Message-ID: <6dd384cd-4f84-5be7-d824-2358b7c5caa5@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0306418267==" --===============0306418267== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The example you gave with the value of +sip.instance between double quotes is valid, I have seen it many times like this. On the other hand, other parameters of Contact header can usually be without quoted value, like: Contact:;reg-id=3D1 Both types can be in the header at the same time. Is the value with double quotes making troubles somewhere? Cheers, Daniel On 08.10.19 16:38, Duarte Rocha wrote: > Thank you for your answer. > The green example was just for testing. My real example is similar to > yellow on a header parameter since i have a client sending me the > value of sip.instance between quotes and i can't identify the value > when it is quoted.=C2=A0 > > Example : > Contact:;+sip.instance=3D"" > > It seems to me be a valid sip parameter, but if it's not i'll warn the > client > > A ter=C3=A7a, 8/10/2019, 15:29, Daniel-Constantin Mierla > escreveu: > > Hello, > > the values of parameters can be quoted or unquoted, depending on > the format (e.g., URI parameters have to be unquoted). If they > start with a quote, then it has to be terminated with the same > quote and then the value is in between the quotes. The {param} > transformation is using the same parser as for parameters in SIP > message. > > Now, I am not sure if quote is allowed in an unquoted parameters > like green, the grammar in SIP specs has to be checked... > > Cheers, > Daniel > > On 08.10.19 16:09, Duarte Rocha wrote: >> Hi David. >> >> I want to ble able to print : yellow =3D "twelve". >> In the green example the "" are printed, but on the yellow >> example it is not. >> >> Cheers >> >> A ter=C3=A7a, 8/10/2019, 12:36, Duarte Rocha > > escreveu: >> >> Greetings, >> >> =C2=A0 >> >> I'm testing some parameters actions and i found a weird behaviour >> >> =C2=A0 >> >> This is my code for the test : >> >> =C2=A0 >> >> $var(Parameter_List) =3D >> "blue=3Dtwelve;green=3Dtwe\"lve\";yellow=3D\"twelve\""; >> >> xerr("Parameter List =3D $var(Parameter_List)"); >> >> xerr("Value of Parameter blue =3D >> $(var(Parameter_List){param.value,blue})"); >> >> xerr("Value of Parameter green =3D >> $(var(Parameter_List){param.value,green})"); >> >> xerr("Value of Parameter yellow =3D >> $(var(Parameter_List){param.value,yellow})"); >> >> =C2=A0 >> >> =C2=A0 >> >> The printed logs are the following : >> >> ERROR: