[Asterisk-Dev] Loss of functionality with depreciation of DBGet/Put?

Kevin P. Fleming kpfleming at digium.com
Mon May 16 11:19:05 MST 2005


Chris A. Icide wrote:

>  >With the new Set(${DB(CFIM/200)}=300) I get:
>  >May 16 12:39:39 WARNING[11111]: func_db.c:54 function_db_read: DB:
>  >CFIM/200 not found in database.
>  >     -- Executing Set("SIP/ipp100-1d45", "=300") in new stack
>  >     -- Executing Playback("SIP/ipp100-1d45", "auth-thankyou") in new 
> stack

That's clearly a bug.

>  >the other serious problem is that DBGet used to automatically jump to
>  >prioriy n+101 if the entry didn't exist. Now I will do things like:
>  >Set(temp=${DB(CFIM/200)})
>  >which will set temp to "" instead of jumping to an error.

exten => 100,1,Set(temp=${DB(CFIM/200)})
exten => 100,n,GotoIF(${temp} = "" ? novalue)
exten => 100,n,...
exten => 100,n(novalue),...

This is much better, in that you can clearly control exactly what 
happens, especially when you _don't_ want it to jump around because of a 
lack of a value in the DB.



More information about the asterisk-dev mailing list