[asterisk-users] Adding DND to dialplan

Gordon Henderson gordon+asterisk at drogon.net
Wed Apr 4 06:52:07 MST 2007

On Wed, 4 Apr 2007, Brian McEntire wrote:

> Don't think that was it unless I still have a typo. Here's my line
> from extensions.conf:
> exten => _#78,n,Set(DB(DND/${CALLERID(num)})=1)
> in the CLI issued 'reload' after saving the updated extensions.conf
> and then picked up the phone and dialed #78. Still getting this error:
> [Apr  4 08:56:20] WARNING[6866]: func_db.c:94 function_db_write: DB
> requires an argument, DB(<family>/<key>)=value
> Should DB support be built in by default?

It seems that it's already there (else you'd not get an error from 

> Is there a DB schema I need to consult to make sure I have the right
> family key pair?

I do the same with:

exten => *49,n,Set(DB(${CALLERID(num)}/doNotDisturb)=1)

So I keep them the other way round.

Why not put in something like:

  exten => _#78,n,Noop(DB(DND/${CALLERID(num)})=1)

and just see what it says? Maybe your callerId is somehow not being set 

> I'm using a Zaptel driver so maybe the CALLERID(num) var is not set or
> is confusing the Set line. I think the zap comes up Zap/2.

I'd definately check the caller-id - if it's a local phone on an FXS port, 
then you might even want to hard-wire the caller-id in the 
/etc/asterisk/zapata.conf file. eg.

; Channel 1: Local analogue line
callerid=Shared DECT <100>
channel => 1


More information about the asterisk-users mailing list