info@voip-sip-sdk.com Tel: +36 1 371 0150

Introduction to Flash Webphone technology based on RTMP

This article introduces you the basic concepts of the Flash webphone technology using the Real Time Messaging Protocol. After reading through this material, you will be completely familiar with all the necessary terms concerning webphone technology in relation with Flash and RTMP solutions.

Introduction

The term customer-focused company has gone through a great change during the latest decades. With the penetration of the Internet most companies realized that they need to provide online solutions and more extensive customer support.

While most of the companies provide customer service hotlines, the most innovative and successful companies are even using the Internet for this purpose. Voice over IP technologies provide lots of advantages for the customer services and can also guarantee the lowering cost of the calls.

The first step towards the VoIP customer service can be a softphone solution that is a program with the functionality of a telephone and even more. But the latest innovation is the webphone that is a web site embedded solution that has all the advantages of the softphone with the comfortability of a web application (Figure 1).


Figure 1 - Ozeki VoIP SIP SDK supports Flash client webphone programming

If you put a webphone into your web site, your customers can call you directly from their web browser. This can decrease the cost of the calls in some cases it can make even free calls between two webphones. Your customers will mostly appreciate the fact that you help them directly and they do not have to pay a fortune for the call.

The next sections will show you how a webphone is built up and what you need to do to have a webphone solution right today as you will surely want one after reading this article.

What is the basic structure of a webphone?

Before you decide on a technology you want to use, you will need to understand the basics about webphones. The webphone is a web site embedded solution that gives you the possibility of calling a remote client. This remote client can be another webphone, a SIP phone or with the use of the PSTN it can be even an ordinary telephone.

As the available solutions for embedding multimedia applications in a web site are limited in some functions, the webphone solution will need to be a client-server application.

The webphone server holds the functionality of receiving messages from the clients and it connects the clients to each other and transfers the media data between the clients. The clients cannot send media data directly to each other that's why you need a server between them.

The clients can connect to the server using some standard protocols, like NET.TCP in case of a Silverlight client or RTMP (Real Time Messaging Protocol) in case of a Flash client.

The client-side applications can use Silverlight, Flash or even ActiveX technologies. All have their advantages and disadvantages. This article is about Flash technology. If you want to get information about Silverlight webphone solutions, please check the following sites:

The Flash solution has some advantages over the Silverlight as for example it can bypass some of the Silverlight security policies. This means that in case of a Flash client, you will not need to get a user interaction to turn on the microphone.

The Flash webphone client can connect to a webphone server by using RTMP. The server itself can transfer the voice information from the client to another connected webphone or it can be connected to a SIP solution and send the call to a VoIP SIP phone network.

Real Time Messaging Protocol

Real Time Messaging Protocol (RTMP) is a transfer protocol that was developed for streaming audio, video and other date over the Internet between a Flash player and a server application. The specification of the protocol has made public by Adobe when it bought Macromedia that was the original owner of the specification.

The protocol itself works on the top of the TCP and usually uses port number 1935. o deliver streams smoothly and transmit as much information as possible, it splits streams into fragments and their size is negotiated dynamically between the client and server while sometimes it is kept unchanged: the default fragment sizes are 64-bytes for audio data, and 128 bytes for video data and most other data types.

Fragments from different streams may then be interleaved, and multiplexed over a single connection. With longer data chunks the protocol thus carries only a one-byte header per fragment, so incurring very little overhead.

However, in practice individual fragments are not typically interleaved. Instead, the interleaving and multiplexing is done at the packet level, with RTMP packets across several different active channels being interleaved in such a way as to ensure that each channel meets its bandwidth, latency, and other quality-of-service requirements. Packets interleaved in this fashion are treated as indivisible, and are not interleaved on the fragment level.

The RTMP defines several channels on which packets may be sent/received, and which operate independently of each other. During a typical RTMP session, several channels may be active simultaneously at any given time.

When RTMP data is encoded, a packet header is generated. The packet header specifies, amongst other matters, the id of the channel on which it is to be sent, a timestamp of when it was generated (if necessary), and the size of the packet's payload.

The header is followed by the actual payload content of the packet, which is fragmented according to the currently agreed-upon fragment size before it is sent over the connection. The packet header itself is never fragmented, and its size does not count towards the data in the packet's first fragment.

The most widely adopted RTMP client is Adobe Flash Player, which supports playback of audio and video streamed from RTMP servers (when installed as a web browser plug-in).

How does a webphone server work?

The webphone server is usually a console application that is capable of registering clients and transferring streams from a client to a remote party be it another webphone or a VoIP SIP solution.

The server should implement the establishment of the connection between two remote clients and forward the messages from one to another. This message forwarding is usually made by invoking client-side methods from the server.

When a client connects to the server it can start and receive calls from another client if there is at least one available clients on the other side. In case of a SIP solution the server gives a SIP account to the client and gets it back when the client is disconnected.

It is also a server functionality to notify the clients about any kind of events that occurred. These events can be related to the connection state, the call or other environmental events like exceptions or errors.

It also can be a server-side functionality to record the media streams that are sent between the two clients. In this case the server saves the audio stream in a .wav file that can be reached from the clients if needed.

Why is Flash a good choice for the client-side?

The client-side solution of the webphone can use different technologies like Silverlight or Flash. In case of a Silverlight client the implementation needs the support of the Silverlight solution that is provided by the Ozeki VoIP SIP SDK.

In case of a Flash client you will need an .swc file that provides the background support so you will not need to write all code from the start. The Flash environment provides greater support itself for the media streams than Silverlight. You will not have to use player object when using a Flash client as it is fully written in the Flash. You will only need a media display to be able to play the media data.

SWF is an Adobe Flash file format used for multimedia, vector graphics and ActionScript. Currently, SWF is the dominant format for displaying "animated" vector graphics on the Web. It may also be used for programs, commonly browser games, using ActionScript.

ActionScript is an object-oriented language originally developed by Macromedia Inc. (now owned by Adobe Systems). The language itself is open-source in that its specification is offered free of charge and both an open source compiler (as part of Adobe Flex) and open source virtual machine (Mozilla Tamarin) are available.

Flash can also be a good choice as most of the users have the Flash Player plugin installed in their web browsers, however, some of them disable it.

As from the user side, Flash is a comfortable choice as most of the users know and use it while not so many use Silverlight.

As from the developer side, Flash is easier to implement as it provides some built-in features that must be implemented when you want to use Silverlight.

What support does Ozeki VoIP SIP SDK provide?

Ozeki VoIP SIP SDK as part of the Ozeki VoIP SIP SDK provides all the support you will need for implementing a webphone application. It contains the .dll for server-side solutions and it comes with a .dll for Silverlight clients and an .swc for Flash client applications.

If you want to implement your webphone application, you will need to download the Ozeki VoIP SIP SDK and install it on your computer.

After you have Ozeki VoIP SIP SDK, you can register it to your webphone server or client projects and use the extraordinary functions it provides.

Using Ozeki VoIP SIP SDK means that you only need to call some provided functions, set some parameters and in case of a client application build an impressive GUI and you can use your webphone right away.

When you use Ozeki VoIP SIP SDK having your webphone solution is only some clicks away as you get all the background methods you need implemented in the SDK. This means that you won't need to worry about data transmission, protocols or any other background stuff, you call the methods you need and the SDK will do the rest.

This article has shown the basic concepts concerning webphone solutions in connection with Flash technology and RTMP protocol. If you read through this site carefully, you are now familiar with the essential terms that are necessary to know if you want to build a Flash softphone solution.

Now, as you know the basics, it is time to take a step further and start to build your own webphone application that fulfills all your needs.

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

Ozeki Cookie Policy
Ozeki Informatics Ltd uses cookies to provide you the best experience on this website. The further use of the website will be considered as an agreement to the use of cookies. For more information read this website.

Cookies are enabled You are browsing the optimized version of this website. For more information read this website.