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

Jerris, Michael MI mjerris at ofllc.com
Tue May 17 21:13:26 MST 2005


 
> Tilghman Lesher
> 
> On Tuesday 17 May 2005 11:02, Brian West wrote:
> > > IMHO, as has been proposed before, we need to provide 
> some sort of 
> > > return code, similar to DIALSTATUS/etc... Then the dialplan can 
> > > determine the difference between NULL and "". So, until we can do 
> > > that, IMHO, the old functionality should (must) remain...
> >
> > ${ISNULL()}
> > ${EXISTS()}
> 
> function_db_read() will never return NULL.
> 
> > NEXT!!!  ;)
> 
> Back atcha.

Drumkilla is working on correcting this issue.  This conversation brings
up another part of functions which is less optimal than the application
way of doing things.  We now need to do the lookup twice, one time to
check if it is null (once that issue is fixed) and a second time to get
the acutal value.  Can anyone come up with a good syntax and
functionality within the fuctions structure that would allow for
performing the fuction only once, but allowing multiple branches of
action based upon the result of a function check.  Perhapse allowing a
set somehow within the function parsing.  Something roughly (although
obviously the syntax is totally pseudo here) like this:

Dial(If(Isnull(x=DB(Key\${Exten})?SIP\100:${x})|15|t)

Come to think of it, what would the hit be on parsing to use this format
for functions?

Mike



More information about the asterisk-dev mailing list