Ozeki VoIP SDK - Product Guide
Developers Guide
Add new functionality to a Silverlight webphone on the client side
Explanation
Prerequisities
![]() |
Download: | 01_Web2Web_Voice.zip |
This article is a detailed guide about how you can add a new functionality to your Silverlight webphone application in relation with Ozeki VoIP SIP SDK. After reading through this page you will be fully familiar with all the essential terms concerning Silverlight webphone technology and functions and what you will need for creating your own solution using Ozeki VoIP SIP SDK.
Introduction
Silverlight is a multimedia display technology that can be used for creating webphone clients. Basically a webphone client can be a click to call solution or a fully featured softphone that is capable for dialing different numbers.
Figure 1 - Extend silverlight webphone
This article shows how you can improve your already written Silverlight webphone solution with a new 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.
Extending a Silverlight webphone with new functionality can cover the modification of both the client and the server-side solution. When you decide to extend your code, for example the one you can download from this page with a new feature, you need to write the server-side support, if needed, as well as the client-side code.
If you want to extend the code with a text message sending feature, you will not need to extend the server-side solution as the text message sending can be done peer to peer in the webphone solutions. In this case you need to define the method and use the following method call shown in Code 1 to invoke that method.
streamSender.InvokeOnStream("Client-side method name", parameters[]);
Code 1 - Invoking a client-side method from client-side
In Code 2 you can see an example how you can implement text message sending. In that case you need to have two text areas and a Send button on the GUI. The following code is the event handler for the button.
private void btnSend_Click(object sender, RoutedEventArgs e)
{
if (string.IsNullOrEmpty(txtMsgInput.Text))
return;
txtChatLog.Text += String.Format("{0}:\n{1}\n", txtBClientID.Text, txtMsgInput.Text);
if (streamSender != null && streamSender.StreamState == StreamState.PublishingSuccess)
{
streamSender.InvokeOnStream("OnStreamSendText", txtBClientID.Text, txtMsgInput.Text);
}
txtMsgInput.Text = "";
btnSend.IsEnabled = false;
}
Code 2 - Text message sending method
If you want to extend your code with a feature that needs server-side support too, like video communication, you need to use the following instruction seen in Code 3.
connection.InvokeOnConnection("Server-side method name", parameters[]);
Code 3 - Invoking a server-side method from the client-side application
You can develop any kind of communication with this structure. You, of course, need to write the server-side method too. In the server code, you need to use the instruction seen in Code 4 for invoking the proper client-side method.
connection.InvokeOnConnection("Client-side method name", parameters[]);
Code 4 - Invoking a client-side method from the server solution
With this concept you can extend your Silverlight solution with any feature you want, you only need to make sure that the client and server-side methods are synchronized properly.
This article introduced you the basic knowledge about adding new functionality to a Silverlight webphone 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 licensing page
Related Pages
- Setup Ozeki VoIP SIP SDK effectively: 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


