[asterisk-users] Adding DND to dialplan

Brian McEntire brian.mcentire at gmail.com
Wed Apr 4 11:52:45 MST 2007


Ah!

Got it. Hard coding CallerID is a good idea and thank you for the example.

I decided to try the Noop(DB(...)) to see what was getting passed and
the empty CALLERID was the issue.

I decided to skip that and implement a global DND since that's what I
wanted anyway so I just set DND/ALL=1 in the DB line.

I'll post a full example here when I put on the finishing touches but
it is working now. Thanks all for the help.

One question... are there any places to get extra sound files like
"activated" or "deactivated" or "do not disturb is..."  ?? I didn't
find them in the sounds directory after a vanilla install of the
latest stable asterisk 1.4.

On 4/4/07, Gordon Henderson <gordon+asterisk at drogon.net> wrote:
> 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
> func_db)
>
> > 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
> correctly?
>
> > 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
> context=internal
> group=0
> signalling=fxo_ks
> sendcalleridafter=2
> rxgain=3
> txgain=3
> mailbox=100
> callerid=Shared DECT <100>
> channel => 1
>
>
>
> Gordon
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>


More information about the asterisk-users mailing list