Ozeki VoIP SDK - Product Guide
Developers Guide
How to make a client mixed conference call
Explanation
Prerequisities
![]() |
Download: | AudioConferenceExample.zip |
This article is a detailed guide about making client mixed conference calls in relation with Ozeki VoIP SIP SDK. After reading through this page you will be fully familiar with all the essential terms concerning client mixed conference calls and what you will need for creating your own solution using Ozeki VoIP SIP SDK.
Introduction
Conference calling is a basic requirement for VoIP systems. This is because the spread of voice over IP technology increased the wish for digitizing more advanced communication forms like lectures or conferences.
Conference calls are basically made by using client mixing meaning that all the clients can hear anything any of the other clients tells (Figure 1).
Figure 1 - Client mixed conference calls
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 audio conferencing is supported by a special tool in the Ozeki VoIP SIP SDK called ConferenceRoom. It is a MediaHandler that makes all the background work and you only need to add the calls to it.
Code 1 shows all the tools that are needed for a client mixed conference call. The ConferenceRoom is a special tool that does not need media senders and receivers for performing its purpose.
private ISoftPhone softPhone; private IPhoneLine phoneLine; private IPhoneCall currentCall; bool inComingCall; private Microphone microphone; private Speaker speaker; private ConferenceRoom conferenceRoom;
Code 1 - The basic tools for a conference room
In this example all the incoming calls are accepted automatically (Code 2). When there is an incoming call, it simply joins the conversation.
private void softPhone_IncomingCall(object sender, VoIPEventArgs<IPhoneCall> e)
{
InvokeGUIThread(() =>
{
labelCallStateInfo.Text = "Incoming call";
IPhoneCall call = e.Item;
inComingCall = true;
listBoxActiveCalls.Items.Add(call);
WireUpCallEvents(call);
call.Accept();
});
}
Code 2 - The phone calls are automatically accepted
The call states need to be handled in this example program too (Code 3). The accepted calls are simply added to the ConferenceRoom object and when a call is selected and ended, it is removed from the conference. The GUI is also modified according to the calls. All the peers are shown in the GUI and when a new peer comes in or ends the call the GUI is refreshed.
private void call_CallStateChanged(object sender, VoIPEventArgs<CallState> e)
{
InvokeGUIThread(() => { labelCallStateInfo.Text = e.Item.ToString(); });
IPhoneCall call = sender as IPhoneCall;
switch (e.Item)
{
case CallState.InCall:
conferenceRoom.AddToConference(call);
break;
case CallState.Completed:
conferenceRoom.RemoveFromConference(call);
call = null;
InvokeGUIThread(() =>
{
if (listBoxActiveCalls.Items.Contains(sender))
{
listBoxActiveCalls.Items.Remove(sender);
}
});
break;
case CallState.Cancelled:
call = null;
break;
}
}
Code 3 - Call state handling
Code 4 shows the initialization instructions for the conference room object. This object handles audio sending and receiving in a special way and needs to set the sender and receiver object different from a simple softphone. When all the handlers are set, the conferencing can be started.
conferenceRoom = new ConferenceRoom(); conferenceRoom.ConnectSender(microphone); conferenceRoom.ConnectReceiver(speaker); conferenceRoom.StartConferencing();
Code 4 - Conference room initialization
The GUI shows the list of the active calls and you can select the calls from that list (Code 5). This is important as the program can end the selected call.
private void listBoxActiveCalls_SelectedValueChanged(object sender, EventArgs e)
{
IPhoneCall t = listBoxActiveCalls.SelectedItem as IPhoneCall;
if (t != null)
currentCall = t;
}
Code 5 - Call selection
When you want to end a call with one of the peers, you select them on the GUI list and press the End Call button (Code 6). This will remove the peers from the conference without effect to the other peers.
private void EndCall_Click(object sender, EventArgs e)
{
if (currentCall != null)
currentCall.HangUp();
}
Code 6 - Ending the selected call
Making a client mixed conference call is an easy task with the ConferenceCall class in Ozeki VoIP SIP SDK. If you want to create a professional conferencing solution, this example program gives you a good base for it, you only need to make some changes and use the program as you wish.
This article introduced you the basic knowledge about making client mixed conference calls 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.
If you have any questions or need assistance, please contact us at info@voip-sip-sdk.com
You can select a suitable Ozeki VoIP SIP SDK license for your project on Pricing and licensing information page
Related Pages
- Setup Ozeki VoIP SIP SDK efficiently: Quick start guide
- Download Ozeki VoIP SIP SDK form the Ozeki VoIP SIP SDK download page
- You can find licensing information of Ozeki VoIP SIP SDK on Pricing and licensing information page
| Operating system: | Windows 8, Windows 7, Vista, 200x, XP |
| Development environment: | Visual Studio 2010 (Recommended), Visual Studio 2008, Visual Studio 2005 |
| Programming language: | C#.NET |
| Supported .NET framework: | .NET Framework 4.5, .NET Framework 4.0, .NET Framework 3.5 SP1 |
| Software development kit: | OZEKI VoIP SIP SDK (Download) |
| VoIP connection: | 1 SIP account |
| System memory: | 512 MB+ |
| Free disk space: | 100 MB+ |
INTERMEDIATE
VoIP technology walkthrough
Softphone development
Webphone development
Mobile development
Voice recording
GETTING AROUND
Sitemap
Search the manual
API documentation
FAQ
Appendix


