[asterisk-users] asterisk 1.6 call forwarding

pepesz76 pepesz76 at o2.pl
Fri Jul 31 07:21:10 CDT 2009


Dear All,

I'n trying to make a simple call forwarding, however I have small
problem when evaluating an expresion.

Here is my extensions.conf
...


; Unconditional Call Forward
exten => _#21*X.,1,Set(DB(CFIM/${CALLERID(num)})=${EXTEN:4})
exten => _#21*X.,2,Hangup()
exten => #21#,1,Set(ignored=${DB_DELETE(CFIM/${CALLERID(num)})})
exten => #21#,2,Hangup()
...
exten => 50,1,Set(CFIM=${DB(CFIM/${EXTEN})})
exten => 50,n,GotoIf($[${CFIM}=""]?start)  ;<- THIS IS WRONG, but not
sure what should it look like?
exten => 50,n,Dial(SIP/${CFIM},30)
exten => 50,n,Dial(SIP/${EXTEN},30
...

First part properly sets and deletes string in database
Second part works as the forwarding is set, however if it is not set
then CFIM is empty and I got:
WARNING[9752]: ast_expr2.fl:434 ast_yyerror: ast_yyerror():  syntax error: syntax error, unexpected '=', expecting $end; Input:
=''

Can someone suggest the solution?

Many thanks
-- 
pepesz





More information about the asterisk-users mailing list