[SR-Users] Using reserved keywords in cfg variables

Paul Claudiu Boriga paul.boriga at 1and1.ro
Tue Jun 6 08:44:01 CEST 2017


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
>




More information about the sr-users mailing list