[asterisk-users] DB_DELETE Function in 1.4

Jeremiah Millay jeremiah at rockriver.net
Tue Jan 23 15:56:18 MST 2007


Does anyone know what application I should place this function in? For 
example with the DB function I currently do something like this to add 
an entry to the asterisk database:

exten => s,n,Set(DB(AGENT/${MACRO_EXTEN:1})=${CALLERID(num)})

To delete the entries I do something like this:

exten => s,n,DBDel(AGENT/${MACRO_EXTEN:1})

DBDel is marked as deprecated in favor of the DB_DELETE function but it 
returns a warning when using it with a dialplan application like Set:

exten => s,n,Set(DB_DELETE(AGENT/${MACRO_EXTEN:1}))

Will return:
    -- Executing [s at macro-queue-addremove:202] Set("SIP/2146-b6f09f30", 
"DB_DELETE(AGENT/2109)") in new stack
[Jan 23 16:51:24] WARNING[4010]: pbx.c:5827 pbx_builtin_setvar: Ignoring 
entry 'DB_DELETE(AGENT/2109)' with no = (and not last 'options' entry)

and it doesn't delete the database entry.

Would DB_DELETE work in an application like NoOp? Just wondering if 
anyone has any experience using this new function in 1.4.0.
Thanks,
Jeremiah


More information about the asterisk-users mailing list