C.11. DB()

Reads/sets a value in the Asterisk DB (AstDB). When reading, either a value is returned, or an empty string if the key does not exist. The output can be found in the variable DB_RESULT.
; Set open/source in the AstDB and then query it:
exten => 123,1,Set(DB(open/source)=${yes})
exten => 123,n,Set(var=${DB(open/source)})
exten => 123,n,GotoIf($[[${DB(open/source)} = 1]?opensource:closedsource)


Internal help for this application in Asterisk 1.4:
  -= Info about function 'DB' =- 


Read from or write to the Asterisk database

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
diff output to internal help in Asterisk 1.2:
- none -