[asterisk-users] Adding DND to dialplan

Brian McEntire brian.mcentire at gmail.com
Tue Apr 3 21:45:01 MST 2007


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
>


More information about the asterisk-users mailing list