N8RAW
1
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?
kb4mdd
2
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
N8RAW
3
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?).
N8RAW
4
OK - answering my own question - hope it helps the next guy ![:slight_smile: :slight_smile:](https://community.allstarlink.org/images/emoji/apple/slight_smile.png?v=12)
Appears to properly escape and all is good.
rmtactive = v|e|"\"${RPT_ALINKS}\"" =~ "\"[TRC]K\""
Probably best to always add the " to variables.
system
Closed
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.