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

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue May 17 10:32:59 MST 2005


On Tuesday 17 May 2005 09:22, Russell Bryant wrote:
> Chris A. Icide wrote:
> > Hey folks, just re-routing a post I caught on users.  Seems some
> > functionality may have been lost in the internal database function.
> >
> > >  >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
> >
> >  >as abviously DB(CFIM/200) always get replaced by its value which
> >  > in this instance doesn't exist yet
>
> This is incorrect syntax. It should be Set(${DB(CFIM/200)=300}). 
> I'll fix it in UPGRADE.txt.

That's also incorrect.  The correct syntax, as noted elsewhere in this
thread is:

Set(DB(CFIM/200)-300)

Note the lack of curly braces and dollars signs.

> >  >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.
>
> We are deprecating all of the n+101 stuff.  You will need to use some
> other logic to jump on an error if that is what you want.

It might be good to have a working alternative that has as much
functionality before we deprecate existing and well-functioning code.

-- 
Tilghman



More information about the asterisk-dev mailing list