How to add functionality to a Flash webphone on the client side


This article is a brief introduction about adding new functionality to a Flash 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 Flash webphone functionalities and what you will need for creating your own solution using Ozeki VoIP SIP SDK.

Operating system: Windows 10 Windows 8, Windows 7, Vista, 200x, XP
System memory: 512 MB+
Free disk space: 100 MB+
Development environment: Visual Studio 2012, Visual Studio 2010, Visual Studio 2008, Visual Studio 2005, Adobe Flash Builder 4.5
Programming language: C#.NET, Adobe Flash
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


Flash is a multimedia displaying technology that can be used for creating webphone clients using the background support of Ozeki VoIP SIP SDK. A Flash webphone can be a click to call solution or a fully featured web page embedded softphone.

Figure 1 - Extend flash webphone

This article shows you how you can extend your Flash webphone with a new functionality by using Ozeki VoIP SIP SDK. You will find it easy and understandable. Follow the guide below and you will be able to add any new functionalities to your webphone if you want.

The client-side of a Flash solution can be extended with a new function very easily. You only need to define a new function in the Flash code and connect the code together with the server. In the example program you can download from this page, you can see the functions for audio communication between two webphone clients.

When you want to extend this program with a text messaging function, you need to add some GUI elements to the program. There will be two textboxes and a send button on the GUI (Figure 2).

Figure 2 - The Flash webphone extended with text messaging support

Put two textboxes on the GUI and name them txtChatLog and txtMsgInput. The txtMsgInput textbox will be used for typing in the text messages and the other one will show the message logs.

The text message sending is a relatively special one as text messaging can be done without the server. In this case you need to place a Send button on the GUI and the event handler for that button needs to be similar to the one in Code 1.

protected function btnSend_clickHandler(event:MouseEvent):void
        if (txtMsgInput.text=="")

        txtChatLog.text += StringUtil.substitute("{0}:\n{1}\n",  lblClientId.text, txtMsgInput.text);

        if (streamSender!=null  && streamSender.streamState==StreamState.PUBLISHING_SUCCES)
                streamSender.invokeOnMediaStream("OnStreamSendText", lblClientId.text, txtMsgInput.text);

        txtMsgInput.text = "";
        btnSend.enabled = false;

Code 1 - This method handles the onclick event of the Send button

Extending the Flash webphone with text messaging is a simple task. If you want to extend the webphone with a functionality that needs server interaction, you need to use the instruction in Code 2.

connection.invokeOnConnection("ServerSideMethodName", parameter(s));

Code 2 - The instruction used for a server supported function

Please note that in the case of extending with a server supported function, the server-side method also need to be implemented.

This article introduced you the basic knowledge about adding a new functionality to a Flash webphone solution 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

You can select a suitable Ozeki VoIP SIP SDK license for your project on licensing page

Related Pages