• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 290
  • Last Modified:

Asterisk@Home Warning Very Frequent in Logs

Apr 30 13:08:18 WARNING[21622] ast_expr2.fl: ast_yyerror(): syntax error: syntax error, unexpected $end, expecting TOK_MINUS or TOK_COMPL or TOK_LP or TOKEN; Input:
1 >

This doesn't seem to affect the stability of the system, but the logs have an abundance of them. Any clue when this would occur?
I see it on both A@H v2.5 and the latest v2.8.
v2.5 is in a production env, v2.8 is at my house. I am of course more concerned with v2.5.

Any clue?

  • 2
2 Solutions
There can be various causes of this error. You really need to be logged into the console (asterisk -r -vvv) and look at the entries just before the error is reported.

The cause is normally in a GotoIf command where the condition is not understood. Possible causes can be failure to quote the variable correctly so if it contains a special character sich as '/' it breaks or a database read which does not find the variable so one side of the condition is empty.

For example have a look at :-
I have seen an error like that when using a GotoIf to test the value of a channel variable and the channel variable was uninitialised (i.e. empty). Asterisk is not very good at handling blank or null values and you have to take extra care how you construct the code in places where blank/null values might occur.

Hope this helps you identify your problem, but it is really only reiterating what grblades said in his comment so I'm not trying to poach his points - just thought it might help you close this question.
When asterisk changed from version 1.0 to version 1.2 the way you perform database lookups changed. The result of this is that where as before if a database lookup failed it generated an error now you just tend to get a null value returned. The authors of AMP or the @home developers haven't rewritten all of their code to work properly with asterisk 1.2 and hence you are seeing these errors. As you say it does not affect anything working which is probably why they have not got around to fix it yet.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now