Alternative for dbget and dbput

Hi everyone,

I’ve seen this script from one of the posts in wiki but the problem is i’m now using 1.4.x. Is there anyway i can make this work.

Script:

exten => s,1,DBget(status=cfstatus/${ARG1})
exten => s,2,Playback(es-cfstatus) ; Your call forwarding status is currently…

exten => s,3,NoOp($[${status} != 0]);

exten => s,4,GotoIf($[${status} != 0]?s,7)
exten => s,5,Playback(es-inactive) ; inactive
exten => s,6,Goto(s,10)
exten => s,7,Playback(es-active) ; active
exten => s,8,Playback(es-forwarded) ; All calls are forwarded to…
exten => s,9,SayDigits(${status})
exten => s,10,Wait,1 ;

exten => s,102,DBPut(cfstatus/${ARG1}=${DEFAULTCFSTATUS})
exten => s,103,Goto(s,1)

Thanks!

Hi
Im sorry but this is a RTFM .

cypbxCLI> show application dbget
cypbx
CLI>
-= Info about application ‘DBget’ =-

[Synopsis]
Retrieve a value from the database

[Description]
DBget(varname=family/key[|options]): This application will retrieve a value
from the Asterisk database and store it in the given variable.
Options:
j - Jump to priority n+101 if the requested family/key isn’t found.
This application sets the following channel variable upon completion:
DBGETSTATUS - This variable will contain the status of the attempt
FOUND | NOTFOUND
This application has been deprecated in favor of the DB function.

cypbxCLI> show application DB
Your application(s) is (are) not registered
cypbx
CLI> show function DB
cypbx*CLI>
-= Info about function ‘DB’ =-

[Syntax]
DB(/)

[Synopsis]
Read from or write to the Asterisk database

[Description]
This function will read from or write a value to the Asterisk database. On a
read, this function returns the corresponding value from the database, or blank
if it does not exist. Reading a database value will also set the variable
DB_RESULT. If you wish to find out if an entry exists, use the DB_EXISTS
function.

cypbx*CLI>

All you need to know is there or on voip-info.org or they book

Ian

I believe they removed dbget and dbput on asterisk 1.4.X that’s why i asked for any alternative way. I havent used macro before.

Sorry I dont get you,

I have posted the details of the way that was introduced in 1.2 ie DB it is well documented in the upgrade notes of 1.0 to 1.2 and to 1.4, What I have posted has nothing to do with macros. This is the help pages from asterisk its self. I assume you do use them ?

Ian