Event "errors" when using ASL3

We have an event file that was working prior to ASL3 with the following:

rmtactive = v|e|${RPT_ALINKS} =~ "\"[TRC]K\""
touch /temp/rmon.sig  = s|t|rmtactive

When a user keys up from a remote node, we get the following error:

[2024-07-12 15:16:51.590] WARNING[36169]: ast_expr2.fl:468 ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected ‘,’, expecting $end; Input:
1,572920TU =~ “[TRC]K”

I don’t see a way to address this in my configuration - Maybe this format changed and I’m missing the docs?
I think this is a bug in ASL3?

The asterisk expression evaluator has had alot of changes. This is talks about some of the changes.

Expression Parser Incompatibilities - Asterisk Documentation

I think you need to add some quotes. I will ask the team.

Danny

I’m not sure I (as a user) can add quotes to the evaluated expression. The (old) examples do look like this:
https://wiki.allstarlink.org/wiki/Event_Management

rmtactive = v|e|${RPT_ALINKS} =~ "\"[TRC]K\""

It appears the code is not wrapping the value of ${RPT_ALINKS} in quotes when it’s sent to the asterisk evaluator (No quotes shown in the error) .

[2024-07-13 08:13:06.795] WARNING[185890]: ast_expr2.fl:468 ast_yyerror: ast_yyerror(): syntax error: syntax error, unexpected ‘,’, expecting $end; Input:
1,572920TU =~ “[TRC]K”

I don’t see a way to add them without modifying the code base (is there a way?).

OK - answering my own question - hope it helps the next guy :slight_smile:
Appears to properly escape and all is good.

rmtactive = v|e|"\"${RPT_ALINKS}\"" =~ "\"[TRC]K\""

Probably best to always add the " to variables.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.