[asterisk-users] function_db_read: DB requires an argument, DB(<family>/<key>)

Per Jessen per at computer.org
Tue May 15 12:39:56 MST 2007


Gordon Henderson wrote:

> You're getting the error message because ${CALLERID(num)} is empty.
> ie. there is no caller-Id set, so I'd work on working out why there's
> no callerId set for the very first call...
> Eg. start with:
> 
>    exten => _X.,1,Noop(CallerId is ${CallerId(all)})
>    exten => _X.,n,Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})})
> 
> I do omething similar, but I test for no callerId before trying to do
> a database lookup.

Later on I have no problems with e.g. a suppressed callerid - but I'll
try what you suggest.  Thanks Gordon.

OK, tried it - 

with your Noop(), I don't get a warning when there is no CLIP:

-- Executing [4439000 at Business:1] NoOp("mISDN/3-u0", "CallerId is ""
<>") in new stack
-- Executing [4439000 at Business:2] Ringing("mISDN/3-u0", "") in new stack

What surprises is that my Set() call isn't listed in the console log?

OK, so I tried this:

exten = _X.,1,Noop(CallerId is ${CALLERID(all)})
exten = _X.,n,Noop(blurp)
exten = _X.,n,Set(CALLERID(name)=${DB(cidname/${CALLERID(num)})})

This now appears to execute the first Noop(), skip the second, and then
issue the no argument warning on the Set() call.

And miraculously, I can make the whole thing work by issuing a 
"module reload app_queue".  After that, the DB() function no longer
complains, with or without CLIP.

Sounds like a bug to me. 



/Per Jessen, Zürich

-- 
ENIDAN Technologies GmbH - managed email security. 
Starting at SFr1/month/user - http://www.spamchek.ch/



More information about the asterisk-users mailing list