[asterisk-dev] 1.6 - beta9: channelvariables.txt missing
sean darcy
seandarcy2 at gmail.com
Fri Jun 20 10:55:47 CDT 2008
I'm trying to set CALLERID(num) if the calling number is less than 140.
Thiat is, for all the internal extensions less than 140, I want to set
the main number as the callerid, but use DID for 140 and up.
So I tried:
exten =>_1NXXNXXXXXX,n,Set(CALLERID(num)=${IF( $[${CALLERID(num)} > 140]
? ${MAINSTUB}${CALLERID(num)} : ${MAINNUMBER} )})
But I get this error:
[Jun 20 11:40:24] WARNING[7821]: ast_expr2.fl:398 ast_yyerror:
ast_yyerror(): syntax error: syntax error, unexpected '>', expecting
$end; Input:
> 140
^
[Jun 20 11:40:24] WARNING[7821]: ast_expr2.fl:402 ast_yyerror: If you
have questions, please refer to doc/channelvariables.txt in the asterisk
source.
Now I think the problem is that CALLERID(num) is a character value that
can't be compared to another value. But there's got to be some way to do
this, so I looked for channelvariables.txt. It's not there.
So any help on my specific problem would be appreciated. Or if I should
RTFM, please point me to the FM.
Thanks.
sean
More information about the asterisk-dev
mailing list