extensions_custom fall through (variables lost) issue


I am trying to check an asterisk DB value and if a specific value, perform an action, else continue.

I have the action being performed correctly, when the action is triggered true…
But when the IF is not matched the process continues (as it should), however all values of the caller seem to vanish and the call is then unkown (callerid is not set, etc…). All that seems to be known is the number dialed:

When ${DB(ACCOUNT/${CALLERID(num)})} value = 2, the process runs as expected.
When ${DB(ACCOUNT/${CALLERID(num)})} <> 2, then the caller details get lost.

Now the calls does auto fall through… but losses everything about the originating caller (shows as unknown) and the number out is the trunk id. The accountcode is still there, and the entry appears in in CDR with correct accountcode, just the CNUM/CNAM appear lost… not sure what else may be lost though too.

Any assistance is appreciated.

Below is what I have in extensions_custom.conf

exten => _X.,1,GotoIf($["${DB(ACCOUNT/${CALLERID(num)})}"=“2”]?accountbill-status-suspend,s,1)

exten => s,1,Noop(“ACCOUNT CHECK ${CALLERID(num)} - Billing Status: ${DB(ACCOUNT/${CALLERID(num)})}”)
exten => s,n,Answer
exten => s,n,Wait(1)
exten => s,n,Playback(custom/suspended-wav&goodbye)
exten => s,n,Hangup
;end [accountbill-status-suspend]