Could be i'm tired, could be i'm still learning (though i have used
the conditional operator in C since the late 70's) but this line in
my extensions.conf file:
exten => ${EXT_AMY_VM},1,VoiceMail($[ "${ALERT_INFO}" = "$
{RING_1}" ? "${VM_1}" : "${VM_2}" ],${UORB})
is giving me these errors when it gets there and executes:
2008-01-05 19:40:12 WARNING[381]: callweaver_expr2.l:394
opbx_yyerror: opbx_yyerror(): syntax error: syntax error, unexpected
$end; Input:
"Bellcore-r3" = "Bellcore-r4" ? "[EMAIL PROTECTED]" : "[EMAIL PROTECTED]"
^
2008-01-05 19:40:12 WARNING[381]: callweaver_expr2.l:398
opbx_yyerror: If you have questions, please refer to doc/
channelvariables.txt in the callweaver source.
2008-01-05 19:40:12 WARNING[381]: app_voicemail.c:2334
leave_voicemail: No entry in voicemail config file for '0'
When i look for doc/channelvariables.txt it is not there yet in doc/
README.variables i find:
expr1 ? expr2 :: expr3
Traditional Conditional operator. If expr1 is a number
that evaluates to 0 (false), expr3 is result of the this
expression evaluation. Otherwise, expr2 is the result.
If expr1 is a string, and evaluates to an empty string,
or the two characters (""), then expr3 is the
result. Otherwise, expr2 is the result. In CallWeaver,
all
3 exprs will be "evaluated"; if expr1 is "true", expr2
will be the result of the "evaluation" of this
expression. expr3 will be the result otherwise. This
operator has the lowest precedence.
but i think the "::" above is a typo (should be ":") as "::" is not
the C syntax nor can i find "::" used in any examples.
Any thoughts as to why my exten line does not return a string for app
VoiceMail to use and instead gives me an error? I am using
RC-1.1.99.20071031. Of course i could move to RC5 but i think this is
a more basic problem where i am just not getting something.
Also, in the README.variables doc, it makes reference to building
check_expr in the utils directory. I went there and when i type "make
check_expr" i get this:
gcc -I/usr/local/callweaver/include -L/usr/local/callweaver/lib
check_expr.c -o check_expr
check_expr.c: In function 'parse_file':
check_expr.c:400: error: nested functions are disabled, use -fnested-
functions to re-enable
check_expr.c:424: error: parse error at end of input
make: *** [check_expr] Error 1
Peace,
Dan
_______________________________________________
Callweaver-users mailing list
[email protected]
http://lists.callweaver.org/mailman/listinfo/callweaver-users