[SR-Users] Using reserved keywords in cfg variables

Daniel-Constantin Mierla miconda at gmail.com
Wed Jun 7 12:01:42 CEST 2017


Hello,

ok, thanks! Contributions to docs are always appreciated!

Cheers,
Daniel


On 06.06.17 12:46, Paul Claudiu Boriga wrote:
> Hello,
>
> I have added a note to the wiki, in the custom_global_parameters section:
>
> Note: Some words cannot be used as names for custom variables or
> groups, and if they are used a syntax error is logged by kamailio.
> These keywords are: “yes”, “true”, “on”, “enable”, “no”, “false”,
> “off”, “disable”, “udp”, “UDP”, “tcp”, “TCP”, “tls”, “TLS”, “sctp”,
> “SCTP”, “ws”, “WS”, “wss”, “WSS”, “inet”, “INET”, “inet6”, “INET6”,
> “sslv23”, “SSLv23”, “SSLV23”, “sslv2”, “SSLv2”, “SSLV2”, “sslv3”,
> “SSLv3”, “SSLV3”, “tlsv1”, “TLSv1”, “TLSV1”
>
> Regards,
>
> Claudiu.
>
>
> On 06.06.2017 10:34, Daniel-Constantin Mierla wrote:
>> Hello,
>>
>> ok, I will reproduce myself and see what can be improved there.
>>
>> Meanwhile, you can update the wiki and add a note about this case so
>> others will be aware of the conflict.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 06.06.17 08:44, Paul Claudiu Boriga wrote:
>>> Hello Daniel,
>>>
>>> Kamailio logs 2 error messages in the logfile:
>>>
>>> Jun  2 15:03:51 test-proxy1-bs kamailio: : <core> [cfg.y:3368]:
>>> yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg,
>>> line 254, column 9-14: syntax error
>>> Jun  2 15:03:51 test-proxy1-bs kamailio: : <core> [cfg.y:3368]:
>>> yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg,
>>> line 254, column 9-14:
>>>
>>> This is the line 254 from the config:
>>>
>>> my_name.enable = 1 descr "test variable"
>>>
>>> Regards,
>>> Claudiu.
>>>
>>>
>>> On 02.06.2017 15:58, Daniel-Constantin Mierla wrote:
>>>> Hello,
>>>>
>>>>
>>>> On 02.06.17 13:16, Paul Claudiu Boriga wrote:
>>>>> Hello all,
>>>>>
>>>>> We found out that when using cfg variables certain keywords are not
>>>>> allowed, and Kamailio logs a generic error:
>>>>> <core> [cfg.y:3368]: yyerror_at(): parse error in config file
>>>>> /etc/kamailio/kamailio.cfg, line 256, column 9-14: syntax error
>>>>>
>>>>> For example we cannot use words like enable/disable for var name or
>>>>> group name but we can use disabled or enabled:
>>>>>
>>>>> group_name.enable = 1 descr "test variable"
>>>>>
>>>>> Looking into the cfg.lex file, I noticed that these are keywords
>>>>> which
>>>>> will be interpreted as values (I don't have too much experience with
>>>>> flex/bison so I am not sure I got this right).
>>>>>
>>>>> We have been using Kamailio 4.4 to test this, but I think it is not
>>>>> specific to a version.
>>>>>
>>>>> Is this behavior documented somewhere? If not, where should it be
>>>>> documented? Also can we have a more specific log message in this
>>>>> case?
>>>>>
>>>> this should be documented in the core cookbook:
>>>>
>>>>     -
>>>> https://www.kamailio.org/wiki/cookbooks/devel/core#custom_global_parameters
>>>>
>>>>
>>>>
>>>> Was it the only error message printed in this case?
>>>>
>>>> Cheers,
>>>> Daniel
>>>>
>>>
>>> _______________________________________________
>>> Kamailio (SER) - Users Mailing List
>>> sr-users at lists.kamailio.org
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com




More information about the sr-users mailing list