This article is a detailed guide about Silverlight webphone client-side technology
provided by Ozeki VoIP SIP SDK. After reading through this page you will be
fully familiar with all the essential terms concerning Silverlight technology in webphone solutions
and what you will need for creating your own solution using Ozeki VoIP SIP SDK.
Microsoft Silverlight is a multimedia tool for displaying media streams
mainly embedded in web pages. It has its own method set and can be programmed
from Visual Studio. Silverlight is defined for multimedia display, therefore
it has its own camera and microphone handler methods (Figure 1).
Figure 1 - Silverlight microphone and camera access
The basic problem with Silverlight peripheral handling is that it needs a direct user interaction
to allow the reach of the microphone or the web cam.
The program code, you can download from this page 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.
Placing a Silverlight webphone on a web page
Placing a Silverlight display on a website needs some basic settings and script writing.
information for the web page, then you can easily place your SL webphone on your site.
Figure 2 shows a basic .html site with a company logo and a Silverlight webphone
placed on it.
Figure 2 - A simple example web page with a silverlight click to call webphone
For the example .html page, the style definitions are made inline, but you can also use them in a .css file.
The Silverlight display style is defined using the following settings seen in Code 1.
be seen in Code 2. The first script definition refers to a separate .js file
that is defined by the Visual Studio for the webphone client. The second script is written inline
and is used for Silverlight error handling. These scripts can be used without modification
while building your own website, but make sure that you set the Silverlight.js file location properly.
You also need to place your Silverlight object on the site. Code 3 shows the
.html code for this purpose. You can place it anywhere on your page and the
webphone will be instantly usable when two clients are connected to the server.
In the object definition you need to set the Silverlight application type, the
location of the .xap file to run and the event handler for the errors. This last one is
other settings, like changing the background color, setting the runtime environment