login | register
Tue 02 of Dec, 2008 [13:27 UTC]

voip-info.org

Discuss [1] History

Asterisk func DB_DELETE

Created by: JustRumours,Last modification on Mon 30 of Jul, 2007 [00:28 UTC]

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})

See also



Comments

Comments Filter
222

333Asterisk major release support

by dgorski, Saturday 01 of March, 2008 [19:57:57 UTC]
This function does not appear to be available in pre-1.4 releases. It does not show up in "show functions" under 1.2.26.1, for example.