Whats wrong with my expression?

I’m using asterisk (1.2.13) as a voicemail server for a cisco callmanager 5.0.

Everything almost works great, occasionally asterisk locks up (process is still running but it stops responding at the cli, sip channels basically everywhere). In an effort to track down what is causing the lockups I’ve been following my logs and trying to trace down what I’ve done wrong. I can only assume its something I’m doing wrong in the configuration since I hear success stories of people running asterisk for extremely long times with no problems.

So I’ve been watching my logs and I notice the following message everytime a call hits a particular extension.

From /var/log/asterisk/full

Mar 16 15:33:29 WARNING[6558] ast_expr2.fl: ast_yyerror(): syntax error: syntax error, unexpected $end, expecting TOK_MINUS or TOK_COMPL or TOK_LP or TOKEN; Input:
Mar 16 15:33:29 WARNING[6558] ast_expr2.fl: If you have questions, please refer to doc/README.variables in the asterisk source.

Below is the context/extension from extensions.conf that is being hit when this message occurs.


I don’t see any problem with my expressions here, but then again I’ve been looking at it a long time today. I figure some more eyes on the problem might help.

As far as functionality goes the above bit of extensions.conf seems to work flawlessly except for the warning I get in my logs.

My questions are:

  1. Do you see whats wrong with any of the expressions here?
  2. Could the warning messages I’m seeing lead to a lockup of asterisk?


The logs say it is expecting an evaluation which there is nothing be evaluated here. I assume you want to check if RDNIS is equal to a number.

So you should have something like:
GotoIf($[${RDNIS} = 555]?2:400)


I thought the evaluation was simply checking that $RDNIS was either a non-zero number or a non-empty string and acting upon that.

Thanks for the input, back to reading the documentation for me :smile:

Actually, GotoIf(${RDNIS}?2:400) will do.

Thanks for the help.

That has cleared up my warnings.

Got to Love it Valley, you always come up with solutions, what are you a GURU of some sort :wink:



Flattered :smile: But strike the first U, and replace the second with EEN is more like it. Actually I just have similar weird requirements and have to work them out without going to source.