[Asterisk-Dev] Loss of functionality with depreciation of
DBGet/Put?
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Mon May 16 12:23:06 MST 2005
On Monday 16 May 2005 13:19, Kevin P. Fleming wrote:
> Chris A. Icide wrote:
> > >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.
There's a marked difference between a value not existing in the database
and the value being the empty string. Let's keep the application, as it
clearly provides functionality over and above what the function can
provide. I'm not suggesting that we remove the function now; I think it
should be clear that there are cases where we would benefit by having
both functions as well as applications which perform similar tasks.
Besides, part of the point in having functions is that we can make
dialplans have less steps and be more elegant. The workaround proposed
above gives us neither advantage.
--
Tilghman
More information about the asterisk-dev
mailing list