| Hello I upgraded to CVS head yesterday (due to the lack of zaptel drivers working with 2.6.10) And noticed that now DBGet and DBPut have been deprecated in favour of the new Set/DB one. In the UPGRADING.txt in Asterisk it says: * The applications DBGet and DBPut have been deprecated in favor of � functions.� Here is a table of their replacements: � DBGet(foo=family/key)� � � � Set(foo=${DB(family/key)}) � DBPut(family/key=${foo})� �� Set(${DB(family/key)}=${foo}) I fail to see how DBGet and DBPut can be replaced by those two commands If I want to create a new database entry: DBPut(CFIM/200=300) I will create the entry if it doesn't exist 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 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. 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...) Any ideas on work-around or did I miss anything? Jean-Yves --- Jean-Yves Avenard Hydrix Pty Ltd - Embedding the net www.hydrix.com | fax +61 3 95722686 | office +61 3 8573 5299 | direct +61 3 8573 5200 |
_______________________________________________ Asterisk-Users mailing list [email protected] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
