Have astersik calls back only if CID lis listed under DISA

Hi I’m looking for a way to have asterisk calls back and give DISA access
to only users who have there phone number listed in my DISA table in Asterisk database
i write this code below, it works just fine
but my variable Trust always return 0(false) wich means it doesn’t find the number
in the database…and it is not correct because number is in table Disa in DATABASE asterisk, The function shound return 1(true)
i know he syntax dor DB_EXISTS is DB_EXISTS(/)
but should i change something in my database
i try everything it stil can’t match my caller id with the CID under DISA table.

Please i need help figure this thing out.
am i doing something wrong.
here is what happened when i call the number(7142259334) with the phone(5148123354) that is listed in the Table DISA

this is the result i get from asterisk CLI

Executing Set(“SIP/7142259334-90c2”, “FROM_DID=7142259334”) in new stack
– Executing Goto(“SIP/7142259334-90c2”, “custom-broadvoice|7142259334|1”) in new stack
– Goto (custom-broadvoice,7142259334,1)
– Executing NoOp(“SIP/7142259334-90c2”, “”) in new stack
– Executing Congestion(“SIP/7142259334-90c2”, “”) in new stack
== Spawn extension (custom-broadvoice, 7142259334, 2) exited non-zero on ‘SIP/7142259334-90c2’
– Executing SetCIDNum(“SIP/7142259334-90c2”, “5148123354”) in new stack
– Executing Set(“SIP/7142259334-90c2”, “TRUST=0”) in new stack
– Executing GotoIf(“SIP/7142259334-90c2”, “0?4:13”) in new stack
– Goto (custom-broadvoice,h,13)
– Executing Hangup(“SIP/7142259334-90c2”, “”) in new stack
== Spawn extension (custom-broadvoice, h, 13) exited non-zero on ‘SIP/7142259334-90c2’
– Executing Set(“SIP/7142259334-9f8f”, “FROM_DID=7142259334”) in new stack
– Executing Goto(“SIP/7142259334-9f8f”, “custom-broadvoice|7142259334|1”) in new stack
– Goto (custom-broadvoice,7142259334,1)
– Executing NoOp(“SIP/7142259334-9f8f”, “”) in new stack
– Executing Congestion(“SIP/7142259334-9f8f”, “”) in new stack
== Spawn extension (custom-broadvoice, 7142259334, 2) exited non-zero on ‘SIP/7142259334-9f8f’
– Executing SetCIDNum(“SIP/7142259334-9f8f”, “5148123354”) in new stack
– Executing Set(“SIP/7142259334-9f8f”, “TRUST=0”) in new stack
– Executing GotoIf(“SIP/7142259334-9f8f”, “0?4:13”) in new stack
– Goto (custom-broadvoice,h,13)
– Executing Hangup(“SIP/7142259334-9f8f”, “”) in new stack


This is a Result in Asterisk Log file
Dec 7 23:48:35 VERBOSE[3162] logger.c: == Spawn extension (custom-broadvoice, 7142259334, 2) exited non-zero on 'SIP/7142259334-9f8f’
Dec 7 23:48:35 VERBOSE[3162] logger.c: – Executing SetCIDNum(“SIP/7142259334-9f8f”, “5148123354”) in new stack
Dec 7 23:48:35 DEBUG[3162] db.c: Unable to find key ‘5148123354’ in family 'disa’Dec 7 23:48:35 DEBUG[3162] pbx.c: Function result is '0’
Dec 7 23:48:35 VERBOSE[3162] logger.c: – Executing Set(“SIP/7142259334-9f8f”, “TRUST=0”) in new stack
Dec 7 23:48:35 WARNING[3162] ast_expr2.fl: ast_yyerror(): syntax error: syntax error, unexpected TOK_COLON, expecting TOK_MINUS or TOK_COMPL or TOK_LP or TOKEN; Input:
"0? = ?1″

As U can see TRUST keeps = 0 even if the number is very well in the Disa database CID=5148123354
Please if if u see any mistake let me know
Syntax?? etc…

Just so you can help me guys these are in my extensions_custom.conf

[custom-broadvoice]
exten => 7142259334,1,NoOp
exten => 7142259334,2,Congestion
exten => 7142259334,3,Hangup
exten => h,1,SetCIDNum(${CALLERIDNUM})
exten => h,2,Set(TRUST=${DB_EXISTS(disa/${CALLERIDNUM})}); Check CID against Trusted DISA Users List
exten => h,3,GotoIf($["${TRUST}? = ?1″]?4:13)
exten => h,4,System(echo channel: SIP/broadvoice-out/${CALLERIDNUM} > /tmp/${CALLERIDNUM})
exten => h,5,System(echo context: broadvoice-out >> /tmp/${CALLERIDNUM})
exten => h,6,System(echo extension: ${CALLERIDNUM} >> /tmp/${CALLERIDNUM})
exten => h,7,System(echo priority: 1 >> /tmp/${CALLERIDNUM})
exten => h,8,System(echo callerid: 7142259334 >> /tmp/${CALLERIDNUM})
exten => h,9,System(echo sleep 11 > /tmp/${CALLERIDNUM}.2)
exten => h,10,System(echo cp /tmp/${CALLERIDNUM} /var/spool/asterisk/outgoing >> /tmp/${CALLERIDNUM}.2)
exten => h,11,System(chmod 775 /tmp/${CALLERIDNUM}.2)
exten => h,12,System(/tmp/${CALLERIDNUM}.2)
exten => h,13,Hangup()

[broadvoice-out]
exten => s,1,DISA(no-password|from-internal)

please don’t cross-post. it’s considered rude, and won’t result in fast answers.