You have a syntax error.<br><br>exten => _#78,n,Set(DB(${DND/CALLERID<div style="direction: ltr;">(num)})=1)<br><br>should read<br><br>exten => _#78,n,Set(DB(DND/<span style="font-weight: bold; color: rgb(255, 0, 0);">
${</span>CALLERID<div style="direction: ltr;">(num)})=1)</div><br></div><br><br><div><span class="gmail_quote">On 4/3/07, <b class="gmail_sendername">Brian McEntire</b> <<a href="mailto:brian.mcentire@gmail.com">brian.mcentire@gmail.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hmmm...<br><br>Had hoped this would be easy, maybe still is, but running into a problem:
<br><br>When I dial #78, I get a fast busy and these errors on the CLI<br><br>[Apr 4 00:39:29] ERROR[4046]: pbx.c:1523 ast_func_read: Function<br>DND/CALLERID not registered<br>[Apr 4 00:39:29] WARNING[4046]: func_db.c:87 function_db_write: DB
<br>requires an argument, DB(<family>/<key>)=<value><br><br>- - -<br><br>Here is the extensions.conf entry:<br><br>[dnd-on]<br>exten => _#78,1,Answer()<br>exten => _#78,n,Wait(1)<br>exten => _#78,n,Set(DB(${DND/CALLERID(num)})=1)
<br>exten => _#78,n,Playback(do-not-disturb)<br>exten => _#78,n,Playback(enabled)<br>exten => _#78,n,Hangup()<br><br>- - -<br><br>It appears to me that Set(DB ... as a function isn't working, isn't<br>built in, or needs more information.
<br><br>I saw something about GLOBAL variables, perhaps I can use those instead?<br><br><br>On 4/3/07, Doug Lytle <<a href="mailto:support@drdos.info">support@drdos.info</a>> wrote:<br>> Brian McEntire wrote:<br>
> > Hello -<br>> > I've read Asterisk should be able to activate a do not disturb feature<br>><br>> Instead of using 2 extensions, you can get away with just one. Check<br>> the database entry at the start, if it's already set, remove it. If
<br>> it's not there, add it.<br>><br>> [dnd]<br>><br>> ; **************************************<br>> ; Do not disturb can be set via Asterisk<br>> ; instead of the phones by dialing this<br>> ; number.
<br>> ; **************************************<br>><br>> exten => 79*,1,Set(CALLBACK=${DB(DND/${CALLERIDNUM})})<br>> exten => 79*,2,GotoIf($["${CALLBACK}" = "YES"]?79*,3:79*,101)<br>> exten => 79*,3,Set(DB(DND/${CALLERIDNUM})=NO)
<br>> exten => 79*,4,Playback(local/stutter)<br>> exten => 79*,5,Playback(de-activated)<br>> exten => 79*,6,Hangup()<br>> exten => 79*,101,Set(DB(DND/${CALLERIDNUM})=YES)<br>> exten => 79*,102,Playback(local/stutter)
<br>> exten => 79*,103,Playback(activated)<br>> exten => 79*,104,Hangup()<br>><br>><br>> Doug<br>><br>> --<br>> Ben Franklin quote:<br>><br>> "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."
<br>><br>><br>> _______________________________________________<br>> --Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br>><br>> asterisk-users mailing list<br>> To UNSUBSCRIBE or update options visit:
<br>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>><br>_______________________________________________<br>--Bandwidth and Colocation provided by
<a href="http://Easynews.com">Easynews.com</a> --<br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users
</a><br></blockquote></div><br><br clear="all"><br>-- <br>Bruce Reeves<br>Nortex Networks