[asterisk-users] function_db_read: DB requires an argument,
DB(<family>/<key>)
Lee Jenkins
lee at datatrakpos.com
Tue May 15 16:11:44 MST 2007
Per Jessen wrote:
> 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.
>
Try an Answer() first?
--
Warm Regards,
Lee
More information about the asterisk-users
mailing list