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

See also


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


Created by: JustRumours, Last modification: Mon 30 of Jul, 2007 (00:28 UTC)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+