[SR-Users] Error parsing parameter value

David Villasmil david.villasmil.work at gmail.com
Tue Oct 8 15:00:23 CEST 2019


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 <david.villasmil.work at gmail.com>
wrote:

> What’s the expected outcome?
>
> On Tue, 8 Oct 2019 at 12:39, Duarte Rocha <duarterocha91 at gmail.com> 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: <script>: Parameter List =
>> blue=twelve;green=twe"lve";yellow="twelve"
>>
>> ERROR: <script>: Value of Parameter blue = twelve
>>
>> ERROR: <script>: Value of Parameter green = twe"lve"
>>
>> ERROR: <script>: Value of Parameter yellow = twelve
>>
>>
>>
>> I have also tried setting the string as :
>>
>> $var(Parameter_List) = 'blue=twelve;green=twe"lve";yellow="twelve"';
>>
>> But the results were similar
>>
>> The "" are not recognized in some scenarios. Is this intended behaviour
>> or should i submit it as a bug?
>>
>>
>>
>>
>>
>> Best Regards,
>>
>>
>>
>> Duarte Rocha
>>
>>
>>
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> --
> Regards,
>
> David Villasmil
> email: david.villasmil.work at gmail.com
> phone: +34669448337
>
-- 
Regards,

David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20191008/a0b703d5/attachment.html>


More information about the sr-users mailing list