[asterisk-users] Adding DND to dialplan

Brian McEntire brian.mcentire at gmail.com
Wed Apr 4 06:00:40 MST 2007


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?

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

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.


On 4/4/07, Bruce Reeves <breeves at nortex-networks.com> wrote:
> You have a syntax error.
>
> exten => _#78,n,Set(DB(${DND/CALLERID
> (num)})=1)
>
> should read
>
> exten => _#78,n,Set(DB(DND/ ${CALLERID
> (num)})=1)
>
>
> On 4/3/07, Brian McEntire <brian.mcentire at gmail.com > wrote:
> > Hmmm...
> >
> > Had hoped this would be easy, maybe still is, but running into a problem:
> >
> > When I dial #78, I get a fast busy and these errors on the CLI
> >
> > [Apr  4 00:39:29] ERROR[4046]: pbx.c:1523 ast_func_read: Function
> > DND/CALLERID not registered
> > [Apr  4 00:39:29] WARNING[4046]: func_db.c:87 function_db_write: DB
> > requires an argument, DB(<family>/<key>)=<value>
> >
> > - - -
> >
> > Here is the extensions.conf entry:
> >
> > [dnd-on]
> > exten => _#78,1,Answer()
> > exten => _#78,n,Wait(1)
> > exten => _#78,n,Set(DB(${DND/CALLERID(num)})=1)
> > exten => _#78,n,Playback(do-not-disturb)
> > exten => _#78,n,Playback(enabled)
> > exten => _#78,n,Hangup()
> >
> > - - -
> >
> > It appears to me that Set(DB ... as a function isn't working, isn't
> > built in, or needs more information.
> >
> > I saw something about GLOBAL variables, perhaps I can use those instead?
> >
> >
> > On 4/3/07, Doug Lytle <support at drdos.info> wrote:
> > > Brian McEntire wrote:
> > > > Hello -
> > > > I've read Asterisk should be able to activate a do not disturb feature
> > >
> > > Instead of using 2 extensions, you can get away with just one.  Check
> > > the database entry at the start, if it's already set, remove it.  If
> > > it's not there, add it.
> > >
> > > [dnd]
> > >
> > > ; **************************************
> > > ; Do not disturb can be set via Asterisk
> > > ; instead of the phones by dialing this
> > > ; number.
> > > ; **************************************
> > >
> > > exten => 79*,1,Set(CALLBACK=${DB(DND/${CALLERIDNUM})})
> > > exten => 79*,2,GotoIf($["${CALLBACK}" = "YES"]?79*,3:79*,101)
> > > exten => 79*,3,Set(DB(DND/${CALLERIDNUM})=NO)
> > > exten => 79*,4,Playback(local/stutter)
> > > exten => 79*,5,Playback(de-activated)
> > > exten => 79*,6,Hangup()
> > > exten => 79*,101,Set(DB(DND/${CALLERIDNUM})=YES)
> > > exten => 79*,102,Playback(local/stutter)
> > > exten => 79*,103,Playback(activated)
> > > exten => 79*,104,Hangup()
> > >
> > >
> > > Doug
> > >
> > > --
> > > Ben Franklin quote:
> > >
> > > "Those who would give up Essential Liberty to purchase a little
> Temporary Safety, deserve neither Liberty nor Safety."
> > >
> > >
> > > _______________________________________________
> > > --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
> > >
> > _______________________________________________
> > --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
> >
>
>
>
> --
> Bruce Reeves
> Nortex Networks
> _______________________________________________
> --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