Brian,<br><br>DND is not real hard. You basicly want to to note the extension is set to DND and then when someone calls that extension you check for DND status and if it is yes then you go on to voicemail instead of dial. It sounds like you are miss understanding the dialplan and how to use it. In your sample, do the macros user-callerid and hangupcall exist? Do the sound files you specified exist in var/lib/asterisk/sounds? A simple DND would look like so:
<br><br>exten => *73,1,Answer()<br>exten => *73,n,Wait(0.5)<br>exten => *73,n,Set(DB(${CALLERID(number)}/DND)=1)<br>exten => *73,n,Playback(do-not-disturb)<br>exten => *73,n,Playback(enabled)<br>exten => *73,n,Hangup()
<br><br>and then<br><br>When someone calls say extension 1000 I would have a macro check for :<br><br>exten => s,n,Set(DNDStatus=$["${DB(1000/DND)}" = "1"]) <= returns a 1 if enabled or a 0<br>exten => s,n,GoToIf($[${DNDStatus} = 1]?DND)
<br>exten => s,n(DND),Voicemail(1000@default,u)<br><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;">Hello -<br>I've read Asterisk should be able to activate a do not disturb feature
<br>to turn off the ringers on extensions. I checked the wiki and can't<br>find documentation for how to do it.<br><br>Here's my attempt, added to extensions.conf:<br><br>[dnd-on]<br>exten => _#78,1,Answer<br>exten => _#78,n,Wait(1)
<br>exten => _#78,n,Macro(user-callerid,)<br>exten => _#78,n,Set(DB(DND/${CALLERID(number)})=YES)<br>exten => _#78,n,Playback(do-not-disturb&activated)<br>exten => _#78,n,Macro(hangupcall,)<br><br>[dnd-off]
<br>exten => _#79,1,Answer<br>exten => _#79,n,Wait(1)<br>exten => _#79,n,Macro(user-callerid,)<br>exten => _#79,n,dbDel(DND/${CALLERID(number)})<br>exten => _#79,n,Playback(do-not-disturb&de-activated)<br>
exten => _#79,n,Macro(hangupcall,)<br><br>;further down<br>include => dnd-on<br>include => dnd-off<br><br>- - -<br><br>Monitoring asterisk from the CLI, when I dial #78 on an extension, I<br>just get a fast busy signal and this information is reported on the
<br>CLI:<br><br>Apr 3 10:41:33 WARNING[30702]: app_macro.c:144 macro_exec: No such<br>context 'macro-user-callerid' for macro 'user-callerid'<br>Apr 3 10:41:33 WARNING[30702]: func_db.c:97 function_db_write: DB
<br>requires an argument, DB(<family>/<key>)=value<br>Apr 3 10:41:33 WARNING[30702]: file.c:504 ast_openstream_full: File<br>do-not-disturb does not exist in any format<br>Apr 3 10:41:33 WARNING[30702]: file.c
:816 ast_streamfile: Unable to<br>open do-not-disturb (format unknown): No such file or directory<br>Apr 3 10:41:33 WARNING[30702]: app_playback.c:106 playback_exec:<br>ast_streamfile failed on Zap/2-1 for do-not-disturb&activated
<br>Apr 3 10:41:33 WARNING[30702]: file.c:504 ast_openstream_full: File<br>activated does not exist in any format<br>Apr 3 10:41:33 WARNING[30702]: file.c:816 ast_streamfile: Unable to<br>open activated (format unknown): No such file or directory
<br>Apr 3 10:41:33 WARNING[30702]: app_playback.c:106 playback_exec:<br>ast_streamfile failed on Zap/2-1 for do-not-disturb&activated<br>Apr 3 10:41:33 WARNING[30702]: app_macro.c:144 macro_exec: No such<br>context 'macro-hangupcall' for macro 'hangupcall'
<br><br>- - -<br><br>Any tips?<br><br>All I really want to do is turn off the ringers / do not ring<br>extenstions when I've activated DND. Right now I'm just using a hack<br>which is to shutdown asterisk altogether when I don't want the phones
<br>to ring, which of course also prevents dialing out, it's a<br>sledgehammer approach and I'm looking for something more typical.<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