Welcome, Guest. Please login or register.
Did you miss your activation email?
September 08, 2010, 03:51:20 PM
Home Help Search Login Register
News: Noojee Receptionist 3.5 Beta 2 released with Asterisk 1.6 support.
See the full details here.

+  Noojee Telephony Solutions Forums
|-+  Noojee Receptionist
| |-+  Installation Support
| | |-+  Tracking Do Not Disturb (DND)
« previous next »
Pages: [1] Print
Author Topic: Tracking Do Not Disturb (DND)  (Read 196 times)
Brett Sutton
Asterisk IT Staff
Sr. Member
*****
Offline Offline

Posts: 412



« on: March 16, 2010, 08:09:30 PM »

As of Noojee Receptionist 3.0.4 we have introduced a somewhat experimental method for tracking the DND status of a phone.

For this to work the phone needs to set the DND status on the Asterisk server rather than just using the phones own DND status.

Asterisk doesn't have direct support for DND so we need to do the work ourselves.

To make this work you need to dial a specialised DND extension on the Asterisk server to record the DND status of each phone. The easiest way to do this is to store the state in the asterisk DB as this is persistent across restarts of asterisk. You also need to modify your dial plan to recognise the DND state of the extension.

Noojee Receptionist expects you to store the DND state in a asterisk db key of the form 'SIP/DND/XXX'
Where XXX is the extension of the phone.

e.g. if your extension is 115 then the db entry should be:
SIP/DND/115

The value of the key should be '1' to indicate that DND is enabled and '0' to indicate that DND is not on. If the key is missing NJ Receptionist will assume that DND isn't on.

Whenever you change the DND state you need to send a user event from the dialplan to notify NJ Receptionist that the DND state has changed so that it can update the consoles UI to reflect the state change.

Code:
exten =>*78,1,Verbose(5, 'Enabling DND on ${CALLERID(num)}')
exten =>*78,n,Answer
exten =>*78,n,Set(DB(SIP/DND/${CALLERID(num)})=1)
exten =>*78,n,UserEvent(NJRDND,State: on,Extension: ${CALLERID(num)})
exten =>*78,n,Playback(beep)
exten =>*78,n,Wait(2)
exten =>*78,n,Hangup

exten =>*79,1,Verbose(5, 'Disable DND on ${CALLERID(num)}')
exten =>*79,n,Answer
exten =>*79,n,Set(DB(SIP/DND/${CALLERID(num)})=0)
exten =>*79,n,UserEvent(NJRDND,State: off,Extension: ${CALLERID(num)})
exten =>*79,n,Playback(beep)
exten =>*79,n,Wait(2)
exten =>*79,n,Hangup

Finally you need to modify the dialplan where you dial internal extensions to check the state of the DB key.
« Last Edit: March 16, 2010, 09:35:01 PM by Brett Sutton » Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!