Re: [SR-Users] Error parsing parameter value

2019-10-08 Thread Duarte Rocha
Yes, i think both ways are correct

The only problem is that i want to have the real value using {uri.param}
which would be "".
However it only returns , without the quotes.

A terça, 8/10/2019, 15:54, Daniel-Constantin Mierla 
escreveu:

> 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=1
>
> 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.
>
> Example : Contact:
> ;+sip.instance=""
>
> It seems to me be a valid sip parameter, but if it's not i'll warn the
> client
>
> A terça, 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 = "twelve".
>> In the green example the "" are printed, but on the yellow example it is
>> not.
>>
>> Cheers
>>
>> A terça, 8/10/2019, 12:36, Duarte Rocha 
>> escreveu:
>>
>>> Greetings,
>>>
>>>
>>>
>>> I'm testing some parameters actions and i found a weird behaviour
>>>
>>>
>>>
>>> This is my code for the test :
>>>
>>>
>>>
>>> $var(Parameter_List) = "blue=twelve;green=twe\"lve\";yellow=\"twelve\"";
>>>
>>> xerr("Parameter List = $var(Parameter_List)");
>>>
>>> xerr("Value of Parameter blue =
>>> $(var(Parameter_List){param.value,blue})");
>>>
>>> xerr("Value of Parameter green =
>>> $(var(Parameter_List){param.value,green})");
>>>
>>> xerr("Value of Parameter yellow =
>>> $(var(Parameter_List){param.value,yellow})");
>>>
>>>
>>>
>>>
>>>
>>> The printed logs are the following :
>>>
>>> ERROR: 

Re: [SR-Users] Error parsing parameter value

2019-10-08 Thread Daniel-Constantin Mierla
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=1

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. 
>
> Example :
> Contact:;+sip.instance=""
>
> It seems to me be a valid sip parameter, but if it's not i'll warn the
> client
>
> A terça, 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 = "twelve".
>> In the green example the "" are printed, but on the yellow
>> example it is not.
>>
>> Cheers
>>
>> A terça, 8/10/2019, 12:36, Duarte Rocha > > escreveu:
>>
>> Greetings,
>>
>>  
>>
>> I'm testing some parameters actions and i found a weird behaviour
>>
>>  
>>
>> This is my code for the test :
>>
>>  
>>
>> $var(Parameter_List) =
>> "blue=twelve;green=twe\"lve\";yellow=\"twelve\"";
>>
>> xerr("Parameter List = $var(Parameter_List)");
>>
>> xerr("Value of Parameter blue =
>> $(var(Parameter_List){param.value,blue})");
>>
>> xerr("Value of Parameter green =
>> $(var(Parameter_List){param.value,green})");
>>
>> xerr("Value of Parameter yellow =
>> $(var(Parameter_List){param.value,yellow})");
>>
>>  
>>
>>  
>>
>> The printed logs are the following :
>>
>> ERROR: 

Re: [SR-Users] Error parsing parameter value

2019-10-08 Thread Duarte Rocha
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.

Example : Contact:;+sip.instance=""

It seems to me be a valid sip parameter, but if it's not i'll warn the
client

A terça, 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 = "twelve".
> In the green example the "" are printed, but on the yellow example it is
> not.
>
> Cheers
>
> A terça, 8/10/2019, 12:36, Duarte Rocha 
> escreveu:
>
>> Greetings,
>>
>>
>>
>> I'm testing some parameters actions and i found a weird behaviour
>>
>>
>>
>> This is my code for the test :
>>
>>
>>
>> $var(Parameter_List) = "blue=twelve;green=twe\"lve\";yellow=\"twelve\"";
>>
>> xerr("Parameter List = $var(Parameter_List)");
>>
>> xerr("Value of Parameter blue =
>> $(var(Parameter_List){param.value,blue})");
>>
>> xerr("Value of Parameter green =
>> $(var(Parameter_List){param.value,green})");
>>
>> xerr("Value of Parameter yellow =
>> $(var(Parameter_List){param.value,yellow})");
>>
>>
>>
>>
>>
>> The printed logs are the following :
>>
>> ERROR: 

Re: [SR-Users] Error parsing parameter value

2019-10-08 Thread David Villasmil
Indeed, it looks like the parser takes 'yellow="twelve"' as a quoted
string, since, if you do yellow="twel ve" it would then output `twel ve`
properly.
Which kind of makes sense, since quotes should be used if one wants a long
string like "hello my name is david".
I'll defer to Daniel here.

Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337


On Tue, Oct 8, 2019 at 3:31 PM Daniel-Constantin Mierla 
wrote:

> 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 = "twelve".
> In the green example the "" are printed, but on the yellow example it is
> not.
>
> Cheers
>
> A terça, 8/10/2019, 12:36, Duarte Rocha 
> escreveu:
>
>> Greetings,
>>
>>
>>
>> I'm testing some parameters actions and i found a weird behaviour
>>
>>
>>
>> This is my code for the test :
>>
>>
>>
>> $var(Parameter_List) = "blue=twelve;green=twe\"lve\";yellow=\"twelve\"";
>>
>> xerr("Parameter List = $var(Parameter_List)");
>>
>> xerr("Value of Parameter blue =
>> $(var(Parameter_List){param.value,blue})");
>>
>> xerr("Value of Parameter green =
>> $(var(Parameter_List){param.value,green})");
>>
>> xerr("Value of Parameter yellow =
>> $(var(Parameter_List){param.value,yellow})");
>>
>>
>>
>>
>>
>> The printed logs are the following :
>>
>> ERROR: 

Re: [SR-Users] Error parsing parameter value

2019-10-08 Thread Daniel-Constantin Mierla
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 = "twelve".
> In the green example the "" are printed, but on the yellow example it
> is not.
>
> Cheers
>
> A terça, 8/10/2019, 12:36, Duarte Rocha  > escreveu:
>
> Greetings,
>
>  
>
> I'm testing some parameters actions and i found a weird behaviour
>
>  
>
> This is my code for the test :
>
>  
>
> $var(Parameter_List) =
> "blue=twelve;green=twe\"lve\";yellow=\"twelve\"";
>
> xerr("Parameter List = $var(Parameter_List)");
>
> xerr("Value of Parameter blue =
> $(var(Parameter_List){param.value,blue})");
>
> xerr("Value of Parameter green =
> $(var(Parameter_List){param.value,green})");
>
> xerr("Value of Parameter yellow =
> $(var(Parameter_List){param.value,yellow})");
>
>  
>
>  
>
> The printed logs are the following :
>
> ERROR: 

Re: [SR-Users] Error parsing parameter value

2019-10-08 Thread Duarte Rocha
Hi David.

I want to ble able to print : yellow = "twelve".
In the green example the "" are printed, but on the yellow example it is
not.

Cheers

A terça, 8/10/2019, 12:36, Duarte Rocha  escreveu:

> Greetings,
>
>
>
> I'm testing some parameters actions and i found a weird behaviour
>
>
>
> This is my code for the test :
>
>
>
> $var(Parameter_List) = "blue=twelve;green=twe\"lve\";yellow=\"twelve\"";
>
> xerr("Parameter List = $var(Parameter_List)");
>
> xerr("Value of Parameter blue = $(var(Parameter_List){param.value,blue})");
>
> xerr("Value of Parameter green =
> $(var(Parameter_List){param.value,green})");
>
> xerr("Value of Parameter yellow =
> $(var(Parameter_List){param.value,yellow})");
>
>
>
>
>
> The printed logs are the following :
>
> ERROR: 

Re: [SR-Users] Error parsing parameter value

2019-10-08 Thread David Villasmil
I ask because the output looks good, you’re escaping the double quotes with
\ and on the other, no escaping is needed because you’re using single
quotes.

On Tue, 8 Oct 2019 at 13:55, David Villasmil 
wrote:

> What’s the expected outcome?
>
> On Tue, 8 Oct 2019 at 12:39, Duarte Rocha  wrote:
>
>> Greetings,
>>
>>
>>
>> I'm testing some parameters actions and i found a weird behaviour
>>
>>
>>
>> This is my code for the test :
>>
>>
>>
>> $var(Parameter_List) = "blue=twelve;green=twe\"lve\";yellow=\"twelve\"";
>>
>> xerr("Parameter List = $var(Parameter_List)");
>>
>> xerr("Value of Parameter blue =
>> $(var(Parameter_List){param.value,blue})");
>>
>> xerr("Value of Parameter green =
>> $(var(Parameter_List){param.value,green})");
>>
>> xerr("Value of Parameter yellow =
>> $(var(Parameter_List){param.value,yellow})");
>>
>>
>>
>>
>>
>> The printed logs are the following :
>>
>> ERROR: 

Re: [SR-Users] Error parsing parameter value

2019-10-08 Thread David Villasmil
What’s the expected outcome?

On Tue, 8 Oct 2019 at 12:39, Duarte Rocha  wrote:

> Greetings,
>
>
>
> I'm testing some parameters actions and i found a weird behaviour
>
>
>
> This is my code for the test :
>
>
>
> $var(Parameter_List) = "blue=twelve;green=twe\"lve\";yellow=\"twelve\"";
>
> xerr("Parameter List = $var(Parameter_List)");
>
> xerr("Value of Parameter blue = $(var(Parameter_List){param.value,blue})");
>
> xerr("Value of Parameter green =
> $(var(Parameter_List){param.value,green})");
>
> xerr("Value of Parameter yellow =
> $(var(Parameter_List){param.value,yellow})");
>
>
>
>
>
> The printed logs are the following :
>
> ERROR: 

[SR-Users] Error parsing parameter value

2019-10-08 Thread Duarte Rocha
Greetings,



I'm testing some parameters actions and i found a weird behaviour



This is my code for the test :



$var(Parameter_List) = "blue=twelve;green=twe\"lve\";yellow=\"twelve\"";

xerr("Parameter List = $var(Parameter_List)");

xerr("Value of Parameter blue = $(var(Parameter_List){param.value,blue})");

xerr("Value of Parameter green =
$(var(Parameter_List){param.value,green})");

xerr("Value of Parameter yellow =
$(var(Parameter_List){param.value,yellow})");





The printed logs are the following :

ERROR: