<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hello<DIV><BR class="khtml-block-placeholder"></DIV><DIV>I upgraded to CVS head yesterday (due to the lack of zaptel drivers working with 2.6.10)</DIV><DIV>And noticed that now DBGet and DBPut have been deprecated in favour of the new Set/DB one.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>In the UPGRADING.txt in Asterisk it says:</DIV><DIV>* The applications DBGet and DBPut have been deprecated in favor of</DIV><DIV> functions. Here is a table of their replacements:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV> DBGet(foo=family/key) Set(foo=${DB(family/key)})</DIV><DIV> DBPut(family/key=${foo}) Set(${DB(family/key)}=${foo})</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I fail to see how DBGet and DBPut can be replaced by those two commands</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>If I want to create a new database entry:</DIV><DIV>DBPut(CFIM/200=300)</DIV><DIV>I will create the entry if it doesn't exist</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>With the new Set(${DB(CFIM/200)}=300) I get:</DIV><DIV>May 16 12:39:39 WARNING[11111]: func_db.c:54 function_db_read: DB: CFIM/200 not found in database.</DIV><DIV> -- Executing Set("SIP/ipp100-1d45", "=300") in new stack</DIV><DIV> -- Executing Playback("SIP/ipp100-1d45", "auth-thankyou") in new stack</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>as abviously DB(CFIM/200) always get replaced by its value which in this instance doesn't exist yet</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>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:</DIV><DIV>Set(temp=${DB(CFIM/200)})</DIV><DIV>which will set temp to "" instead of jumping to an error.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I wish DBGet and DBPut weren't removed their replacements are no good and can't be made to behave the same without serious re-work (like testing the returned entry is not null etc...)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Any ideas on work-around or did I miss anything?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Jean-Yves</DIV><DIV><BR><DIV> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">---</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Jean-Yves Avenard</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Hydrix Pty Ltd - Embedding the net</FONT></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">www.hydrix.com | fax +61 3 95722686 | office +61 3 8573 5299 | direct +61 3 8573 5200</FONT></P> </DIV><BR></DIV></BODY></HTML>