DB_DELETE
function DB_DELETE
Synopsis Return a value from the Asterisk database and delete it
Syntax
DB_DELETE(<family>/<key>)
Description This function will retrieve a value from the Asterisk database and then remove that key from the database. DB_RESULT will be set to the key's value if it exists.
Examples Example 1
exten => 1234,1,NoOp(${DB_DELETE(obst/apfel)})
Example 2 So here's what you do to delete a database entry in 1.4.0:
exten => s,n,Set(oldval=${DB_DELETE(AGENT/${MACRO_EXTEN:1})}) ; saves the old value of that key (in your case the callerid) ; into ${oldval} and deletes it from the DB. You can look at ; the value for the key you just deleted. exten => s,n,NoOp(oldval : ${oldval})