This article is a detailed guide about implementing the Do not Disturb functionality
in relation with Ozeki VoIP SIP SDK. After reading through this page you will be fully familiar
with all the essential terms concerning DND functionality and what you will need for creating your own solution using Ozeki VoIP SIP SDK.
There are cases when you do not want or do not have time for receiving phone calls.
In VoIP communication there is a possibility to indicate this by using the Do not Disturb (DND)
functionality (Figure 1).
DND indication can be implemented in more ways. The caller's client can show the presence
information of the contacts or the DND can be only showed by sending an auto answer message
about the fact that the callee does not want an incoming call.
Figure 1 - Implementing Do not Disturb functionality
The following program code uses the background support of Ozeki VoIP SIP SDK,
therefore you will need to download and install the SDK on your computer before
starting to use the program code. You will also need to have Visual Studio 2010
or compatible IDE and .NET Framework installed on your system, as the program
code below is written in C# language.
The Do Not Disturb functionality is really simple to handle when you use
Ozeki VoIP SIP SDK. The DoNotDisturb is a simple flag related to the phone line.
The SDK provides all the background for the DND function. If you set the DoNotDisturb
flag to true, the incoming calls will be rejected by a busy signal.
The easiest way for extending your softphone with DND functionality is to use a simple
checkbox, that indicates if you want to get incoming calls or not. Figure 1 shows a possible
layout for this purpose.
Figure 2 - A simple softphone GUI with DND functionality
As the Do Not Disturb function is indicated by the checked state of the
new checkbox on the GUI, you need to write a new event handler method that
notifies about the check changes. This method is shown in Code 1.
As it can be seen, the method sets the DoNotDisturb property of the phone line
according to the check state of the checkbox, if there is a valid phone line.
In the case if there are no phone lines, the method does nothing.
As the SDK does all the background work, implementing the Do Not Disturb functionality
is done by writing this simple event handler method.
You are now surely familiar with this simple function of DND and ready to find more
extraordinary support for your softphone. You will find that using Ozeki VoIP SIP SDK
most of the work is done before you even start to implement it.
This article introduced you the basic knowledge about DND functionality and
showed how Ozeki VoIP SIP SDK can help you to fulfill your wishes about this
topic. If you have read through this page carefully, you already have all the
knowledge you need to start on your own solution.
As you are now familiar with all the terms concerning this topic, now it is
time to take a step further and explore what other extraordinary solution Ozeki VoIP SIP SDK can provide to you.