Friday, January 2, 2009

SIP Flash Phone with Openfire XMPP server.

For my humble opinion the following open source project is one of the interesting SIP innovations.
For long time voip service providers looked for a client (application) that will be working from ANY browser, with no need of installation and configuration. The main problem is to find a common component that can run from any browser running on any operating system. Each browser on the market support its own add-ons plug-ins and technology, for example you can run ActiveX component on Internet Explorer, but it will not work on Netscape or Firefox.... you can try Java applets, but than you are limited about voice and media that will require JMF(java media frameworks) .....
The ultimate solution found using Adobe Flash technology with RED5 open source flash server.
Flash players are working almost with any browser and can have a good integration with Java code.
Thanks to Dele Olajide (http://www.igniterealtime.org/community/blogs/ignite/2008/05/05/flashbased-audio-in-openfire-part-ii)
We have today a very good and solid development starting point for converting Flash into SIP voip calls. The big challenge was to transcode in real time Flash media stream (FLA) to a known voip codec such as G711.
The first version of this project used like many others sip bridging application (like sip to skype solutions) VAC technology (virtual audio cable).
The limitation using VAC was the number of calls you can run on a particular server as in one PC you can have MAX of 32 virtual audio ports = 16 calls (need 2 audio ports for each call).
To make long story short Dele developed the idea of using Flash phone without the need of VAC.
Instead he created the asao component that transcode Flash media stream into G711 codec.
You can read details explanation on the Ignite Real-time blog.
My small contribution to Dele's work was in improving the compatibility of the Mjsip stack used by Dele and make it compatible with other system that are not Asterisk ip Pbx (Dele made all his test only with Asterisk). If you follow my blog you see my privies post on SiptheeSkype which also using Mjsip stack and Java code, so what I did was copy some fixed code from SiptheeSkype into RED5 plug in for Openfire server.
You can run the Flash Phone on a Windows or Linux PC by installing RED5 (http://osflash.org/red5) flash server on it or using Openfire (http://www.igniterealtime.org/downloads/index.jsp) with latest RED5 plug-in.
For installation and support the best place would be RED5 plug-in community forum on http://www.igniterealtime.org/community/community/plugins/red5

The solution is working, but is not yet perfect, need to improve voice quality and optimize the handle of the conversion from FLA to G711. We are all waiting for Flash player 10 that will support Speex codec and will be welcomes improve to this project as Speex is open source codec what mean more possibilities of converting it to other codecs stream (transcode).

I was testing the latest RED5 plug-in from Dele a while ago against our operator grade Voip system with and without SBC's (session boarder controllers)... compare to the starting point of the first version I tested with VAC technology a year ago the future of this project look promising.

I have not put this solution in production yet (instead of the ActiveX we use in IE which I wrote my self in VB) because of small problem related to voice activation detection (VAD) - for some reason on random time I can not get transition of the voice from the Flash player unless I open settings of the voice in the Flash component. I tried canceling VAD in the Flash Player properties page in Dele source code, but it is not completely solve the problem.

Until than we will continue to use ActiveX component from IE browser.

I would like thanks Dele and others that help and contribute to the RED5 Flash phone project.

1 comment:

measaura said...

Hi,

I have been using Red5 in our test environment and so far it's running fine (and sometimes better than our softphone client). We use Asterisk for the SIP client and Red5 in another server. So far, ocassionally, the Red5 will cease to run properly mainly due to the file limitation error. I'm trying to solve this issue but I'm not able to solve this yet as we're planning to go on very big scale using this solution.