Monday, November 24, 2008

One year @ JBoss : Mobicents Sip Servlets 0.7 released !!!

It's been now one year since I joined JBoss, a division of Red Hat and about a month and a half since our last release that made Mobicents Sip Servlets the first Open Source container to become Sip Servlets 1.1 (JSR 289) certified.

So it was due time for another release and we wanted it to be feature packed so here goes the review of the latest and greatest of Mobicents Sip Servlets that you can download here

First, Concurrency Control. It defines here how a sip servlets application can be accessed concurrently and what would its expected behavior in this case. Although the JSR 289 Expert Group couldn't agree on a concurrency control mechanism for JSR 289 and that feature has been postponed to the next version of the spec, we believe this feature can greatly simplify the life of the Sip Servlets developers. Also in getting more experience on that front and feedback from the community we would like to start to draft a proposal for inclusion in the next revision of the specification.
So Mobicents Sip Servlets supports not one but three concurrency control modes :

  • None - is the one defined (or not defined...) by the specification and the developer is reponsible for synchronizing access to shared resources such as SipSession or SipApplicationSession attributes or objects held by those sessions.
  • SipSession : This mode guarantees that two or more messages from the same SipSession will never be processed simultaneously. They will be serialized on the SipSession meaning that they will be processed sequentially by the sip servlet in the order of their arrival so you can access SipSession attributes in a safe way.
  • SipApplicationSession : This mode guarantees that two or more messages from the same SipApplicationSession will never be processed simultaneously so you can access SipApplicationSession attributes and the SipSession attributes in a safe way.
Those different concurrency modes for now only take into account SIP messages for serializing access to either the SipSession or SipApplicationSession which means that you have to be careful if you are accessing shared resources in an unmanaged way, for example if you access a SipSession attribute from an unmanaged thread or from EJB this access will not be synchronized. But we are working on it :-)

Congestion Control : All the messages that arrives in the Mobicents Sip Servlets container will go, after some initial processing, in a queue to wait for, depending on the chosen concurrency control mode, a free thread or the lock on the session to be released. If this queue gets full the container will start rejecting any new SIP requests (except ACK) with SIP error code 503 until the server catches up. Note that only SIP requests will be rejected, the SIP responses that arrive at a full queue will be stored and processed sooner or later. In the future we will be adding more congestion control mechanisms like memory threshold, CPU threshold, choose between sending 503 or just dropping any new message coming in depending on the load threshold... so stay tuned !

Enterprise Monitoring and Management Console through Seamless integration into JOPR and Embedded JOPR (JBoss Administration console), the JBoss Enterprise management solution : I just blogged about it 3 days ago so for more details see my blog post.

Mid Call Failover Support : We completed our HA capabilities for pure SIP applications so you can now failover to any node in the cluster in the middle of a call for all kind of pure SIP Applications (Proxy, B2BUA, UAC, UAS) ! We will now be working on failover for converged applications and add performance and stability automated test based on smartfrog so that it becomes final.

We also have been working on two great new features and wish some community feedback on them so we first introduce them as Technlogy Preview into this 0.7 release :
JBoss Seam framework is now able to enhance your sip servlets application : As Vladimir is currently working on a cool PBX application, he was feeling that this was not enough :-) so he started to dig and hack on how the JBoss Seam framework could be utilized to simplify the Sip Servlets application development and has been very successful, See his blog post about it and the public discussion. As we were discussing together the implications of this, we decided to start a subproject dedicated to it to rock the sip servlets world and continue our unification task (between Sip Servlets and Http or Sip Servlets and JSLEE) the same way Seam has been rocking the http servlets world. So check it out and see how it can improve your Time to Market and development experience all together and don't forget to give us your feedback and what you would like to see improved or implemented.

Diameter support
: For users of Mobicents Sip Servlets, we wanted them to be able to charge calls that are going through their applications so Alexandre Mendonça who is leading the Diameter project for the Mobicents platform, has tremendously helped us in getting us Diameter support and hacked a Sip Servlets Diameter Event Charging application based on the Location Service example that performs call charging at a fixed-rate (event charging), so check it out and give us your feedback. Alex is now planning on getting more of the Diameter protocol implemented and as he go, he will hack Sip Servlets applications that showcase the different possible call flows to help you do Authentication, Authorization and Accounting on top of Mobicents Sip Servlets.

Also we got 2 new shiny examples, the Diameter Event Charging one that we just discussed and the Conference Media Server application built on GWT with server-push updates to provide desktop-like experience for the user interface. This application is in response to the high demand of the community for Media Conferencing on top Mobicents Sip Servlets and this example will be later integrated into the PBX application that Vlad is builing.

Also with all those new features, we moved to the latest version of JBoss AS 4.2.3.GA and also comes the usual round of bug fixes and enhancements comprised of an updated Management Console, more SIP Extensions (PRACK, OPTIONS, INFO), and more.

Check out our roadmap to see what's coming next !

Feel free to give us your feedback on the Mobicents Google Group
Thanks for using Mobicents Sip Servlets !

Friday, November 21, 2008

Mobicents Sip Servlets gets a shiny new Administration console !

As some of you might be aware, earlier this year JBoss released Jopr, an enterprise management solution for JBoss middleware projects and other application technologies based on RHQ, and Embedded Jopr, which will become the new JBoss Administration console and is based on Jopr.

Since the project does provide great extensibility and thanks to the good documentation of the project and its plugin architecture (see and we decided that it was time for Mobicents Sip Servlets to be seamlessly integrated into those great projects and finally have a way to being administrable into large scale enterprise deployments.

So we hacked our own plugin. We decided to start simple with and provide accessibility to the SipApplicationDispatcher, which is a central piece in the Mobicents Sip Servlets Architecture since it has the responsibility of dispatching the SIP requests and responses (that is gets from the underlying jain-sip stack) to the deployed Sip Servlets applications.
So you can control the concurrency and congestion control of the server through it. This was really a piece of cake and was done and working in an afternoon.

Excited by the easiness to integrate into jopr, we decided to provide metrics for Sip Sessions and Sip Applications Session available into standard pure SIP Servlets applications or converged Java EE/SIP applications about the same way it is currently done in Jopr for HTTP Sessions. Same thing, it was done real quick and with a result showing seamless integration into jopr. See our Mobicents Sip Servlets jopr plugin that works for both Jopr and Embedded Jopr.

It took us about 2 days to complete the task 1 day of coding and discovering and one day of polishing and documenting... To try it out just download the latest release of Mobicents Sip Servlets and drop the embedded jopr war that contains our plugin in the server/default/deploy directory and hit http://localhost:8080/embedded-jopr

I have only one thing to say, thanks to the JBoss Operations Team for providing such a good project that saved us quite a bit of time to have a full blown enterprise management solution for our project. Keep up the good work, guys !

Wednesday, October 22, 2008

Jain Sip is working on top of android

I had a bit of free time yesterday night and I noticed the first google android powered phone hit the market in USA so I said to myself, what if I tried to port jain sip stack to android...
Not so much work should be needed since android supports a lot of the JDK 1.5 packages natively. So I tried and believe it or not, no work was actually required to make the jain sip stack work on android, it just runs :-)
Again kudos to Ranga for such a great stack :-) and to Google for having a nice OS where you can really reuse most of your Java applications (pending a rewrite of the UI)

So here is my proof of concept :
I ported the well known Shootist and Shootme examples from the sip stack to android and uploaded a zip here that you can play with.

The zip contains shootist and shootme standard examples and shootist and shootme android examples. Unzip in a location that we will call

So first you need to have the android SDK installed and have the android tools on your path (see the Android installation instructions for that)

Then you can start the android emulator with the following command:
$ emulator

from , do the following :
$ cd shootme-android/bin/

and then
$ adb install shootme-android.apk 

this install the shootme android example application into the emulator
go back to and do the following :
$ cd shootist-android/bin/

and then
$ adb install shootist-android.apk 

this install the shootist android example application into the emulator

You can see the applications installed in the emulator by clicking on the gray arrow at the bottom of the android phone screen :

Ok so much for the installation of the applications into android. Now let's get real and have some fun. Let's try the shootme android application first.

on the emulator, go to the menu and select the application called shootme.
It says that the jain sip stack has started on (localhost's emulator ip address of android)

Since the emulator has its own ip address system we need to setup a UDP redirection from our host's localhost:5070 to the emulated system's localhost:5070 so that teh shootme android application can be pinged from our shootist standard application with the following command

$ adb emu redir add udp:5070:5070

let's start the standard shootist example so that it calls shootme and that a SIP call flow (INVITE-OK-ACK and then BYE-OK) is done between them.
go back to and do the following :
$ cd shootist/dist

and then
$ java -jar shootist.jar

you should now see the messages being exchanged between the shootme android application and the shootist standard application.

if the emulator sip messages are not enough, more log is available through the command
$ adb logcat

now kill the shootist app with Ctrl+C and close the emulator

You can also do the reversed example and start first the shootme:

Since the emulator has its own ip address system we need to setup a UDP redirection from our host's localhost:5060 to the emulated system's localhost:5060 so that the shootist example application can be pinged back from our shootme standard application with the following command

$ adb emu redir add udp:5060:5060

let's start the standard shootme example so that it waits to be called by the shootist android applicationand that a SIP call flow (INVITE-OK-ACK and then BYE-OK) is done between them.
go back to and do the following :
$ cd shootme/dist

and then
$ java -jar shootme.jar

on the emulator, go to the menu and select the application called shootist.

You should now see the messages being exchanged between the shootme android application and the shootist standard application.

if the emulator sip messages are not enough, more log is available through the command
$ adb logcat

Please post comments if you have problems running the examples or if you want to give me some feedback...

Tuesday, September 30, 2008

Mobicents Sip Servlets is Sip Servlets 1.1 ( JSR 289) certified !!!!

Mobicents is the First Open Source Certified Server - Again.
After being the first JSLEE 1.0 certified open source server (To my great delight, I hacked on that part too about 5 years ago and had the pleasure to pass this TCK too), now Mobicents is the first Open Source SIP Servlets 1.1 server as well....
which makes JBoss the first vendor to certify even among commercial vendors, not counting the company who wrote the TCK....
In other words, we were the latest to enter the game of the SIP Servlets vendors, we built our server from scratch in about a year and now are the first to be certified, isn't that great :-) ?
Not only that but we also features capabilities that are outside the scope of the specification such as :
We are also driving towards a converged model between SIP Servlets and JSLEE and the first logical step : interoperability has been made possible on the Mobicents Platform since JBoss is the only vendor to implement both specifications so that you can benefit from the best of both worlds.
The IEEE paper that has been published related to this work will be made available soon.

I would like to personally thank all the people that worked with me in making this dream (actually it was a hell of a work :-)) come true :

* M. Ranganathan that mentored me in the open source world from my early days of work (I always remember my first assignment hacking with you on the jain sip applet phone hearing our voices fast forwarding in the NIST premises :-) ) that started this project and put all of us in it :-), for your help working with us to design and hack together during the first versions of the project and later on in giving your gold advices to keep us on track, for your work on jain sip and the nist sip stack (jsip rocks and rolls !!!) that we use as the underlying sip connector and for having the passion of the true digital monkey hacker. My inner bonobo is jumping around :-)

* Valdimir Ralev for working like hell on the project during the beginning until the fun of the last month while passing the TCK and the joy of today :-) and for the fun we had in our virtual garage :-). Thanks so much for the great work.

* Bartosz Baranowski for your help working with us to design and hack together during the first versions of the project.

* Ivelin Ivanov for making me part of the JBoss dream, that made the Mobicents Open Source Platform possible and what it is now and mentoring me along the way and for all the fun during the wild trips abroad... You're a hell of a guy, wild at heart :-)

* Our fellows at Tomcat and JBoss that build the containers on which this work has been made possible.

* Mihir Kulkarni from Oracle for its timely replies about the TCK tests.

* The JSR 289 expert group members for their commitment and hard work
on the specification. (it was good to see you guys in LA)

It feels so good... I love this job !

Note : See Ivelin's post and Vlad's post about it also.

Wednesday, September 10, 2008

Mobicents Webinar recording now available !

There is an online recording available of the Mobicents Webinar recently hosted by me where you can see most of the products that are composing the Mobicents Communications Platform as well as a demo showcasing a converged application built on top of Seam, Mobicents SIP Servlets and Mobicents Media Server deployed on Jboss AS.
If you missed the live session, make sure to take the time to watch this update on the latest and greatest from Mobicents. You will also learn where we are headed in the future.

Please post feedback about the webinar to this thread.

Have fun !

Thursday, August 21, 2008

Mobicents Sip Servlets is now HA grade !

As you may have noticed, we released our 0.5 version of Mobicents Sip Servlets about a week ago now following our release early, release often moto and fresh back from my vacations, I wanted to go into more details with you on the great new feature of this version : You can now start to cluster your UAS type of SIP servlets applications and you'll have built-in mid-call failover support for it !

What do this mean to me you may say ? Read on...

By using our Mobicents SIP Load Balancer and the new shiny Mobicents SIP Servlets Clustering with let's say 2 nodes A and B, you'll be able to execute the following call flow :
  1. Start a call that goes through the Load Balancer and is handled by node A (the sip session and sip application session as well as their Serializable attributes are going to be replicated on node B)
  2. kill node B and wait that it is completely stopped
  3. Hangup the call, the tear down of the call will be handled correctly by node B with all the session attributes that were present on node A available on node B.
If you want to try it out, you'll need to use our Mobicents Sip Servlets JBoss release and use the pre-configured cluster-enabled server (the all profile configuration) that comes bundled with it.

You can follow the step by step examples described in the Mobicents Sip Servlets Failover Documentation

Please note that this feature is still limited to UAS type of applications and that support is coming for Proxy, B2BUA and Converged type of applications in the following releases.

Feel free to post you feedback and to contact us if you'd like to contribute.
We like to hear from you.

Wednesday, June 25, 2008

Mobicents Sip Servlets 0.4 Released !

Yesterday we just released the 0.4 version of Mobicents Sip Servlets with some interesting hot new features.
It is shipped with :

To download this release and try it out, follow the following link :

Mobicents Sip Servlet 0.4 downloads

This is our latest release working on top of both containers Tomcat 6.0.14 or JBoss AS 4.2.2.GA providing some new features, bug fixes, enhancements and so on. Let's review what's new.

Load Balancing & Failover support : Load Balancing and Failover is a hot new feature that has just been added. The feature is still in its basic stage meaning that you can load balance on any number of nodes that are registered with the sip load balancer. The Sip load balancer uses a round-robin algorithm to cycle through a list of Mobicents sip Servlets nodes in order. Some other load balancing algorithms will be added such as algorithms where the health status of the servers are taken in account to avoid overloading a server already full by example.
Currently any Mobicents Sip Servlets node can act as a backup node. So if one node fails, all new calls will be redirected only on the still alive remaining nodes.
Mid-call failover where another node of the cluster could recover a dialog from a failed node is not supported yet but should be added pretty soon.

Performance improvement/Performance apps : We worked on providing some automated SIPp tests and scripts to measure, and improve over time, the performance of Mobicents Sip Servlets on Tomcat and JBoss. Here is what we achieved Tomcat 6.0.14, JDK 1.5 : Call rate was 100 calls/sec for 24h, for a total of 8.640.000 calls on a standard server with 2x AMD 2220 SE processors and 8GB of RAM. Performance on JBoss is being measured but since the core logic (just the wiring is different) is the same we should have the same kind of results on both containers.

JSLEE/SIPS interop application : As JBoss is the only vendor to implement both
specifications, JSLEE and Sip Servlets, through its Mobicents Communication Platform, this makes it a natural fit to build converged and interoperable JSLEE/SIP Servlets applications that are able to comply with standards in a portable manner. This application is a proof of concept of integration and interoperability between JSLEE and Sip servlets and has been shown at JavaOne 2008 in San Francisco (see my previous post and posts from other Mobicents team members Vladimir Ralev and Ivelin Ivanov). As we're acquiring experience with Java EE, JSLEE and SIP Servlets, this is a first step towards the process of driving a unified programming model, so stay tuned !

Facebook click to call application : This example shows how SIP Servlets can be used along with HTTP servlets to create a Facebook plugin that allows users to call real phones through a SIP-PSTN gateway provider. See Vladimir Ralev's post for more information on this killer app !

More Extensions : SUBSCRIBE/NOTIFY is now supported

We aligned on the JSR 289 Proposed Final Draft API

We merged SIP Session Management with HTTP Session Management : Our Sip Session Manager was previously completely separated from the http session management mechanism, we just moved the Sip Session Management where it should be, with the http session management. This would help us to provide more integrated Session Management and reuse some of the work done on http session clustering in JBoss for Sip session clustering.

and the usual round of various enhancements and bug fixes :
Derived Sip Sessions
Servlet-mapping still supported in 1.1
New Cancel methods on Proxy feature
Move adding of Via header to send() instead of B2buaHelper.createRequest
Routing to external application server
Application Redeployment Bug Fixed
Escaped characters not supported in SIP URI
Fix for the creation of subsequent requests for a given sip session.

See Mobicents Sip Servlets for more information.

You can also check our Mobicents Sip Servlets Roadmap to see what's coming next.

Monday, April 28, 2008

Mobicents Platform showcased @ JavaOne 2008 in San Francisco

On my last post, I presented a nice application demonstrating interoperability betwen Sip Servlets and JAIN SLEE, and this would be the demo of my talk at JavaOne 2008.

Here is the abstract of the talk I'll give :

"Mobicents Converged Application Server: JSLEE, SIP Servlets, Java EE"

"The Mobicents Communication Platform is the best architecture to create, deploy and manage services and applications integrating voice, video and data across a range of IP and communications networks. It drives convergence in leveraging the three following core capabilities :
  • Mobicents JAIN-SLEE which provides a highly scalable event-driven application server capable of bridging multiple IP and legacy protocols.
  • Mobicents Sip Servlets which delivers a consistent, open platform on which to develop and deploy portable and distributable SIP and Converged JEE services.
  • Mobicents Media Server which delivers competitive, complete, best-of-breed media gateway functionality featuring highest quality."

So if you're somewhat interested in telecommunications, next generation applications, SIP or simply in the power of the Mobicents Platform :-) as a whole or in jboss products, please come and see us in action at Booth #734 or Join us for the JBoss Speakeasy Party next door to the Moscone Center at Jillian's inside the Metreon from 5:30-8:30 p.m. Thursday, May 8.

Don't forget to register and I may be able to bring you some of the beers you ordered through the JAIN SLEE/Sip Servlets Interop application we will demo :-)

For more information on what Jboss will present or for more insight on the other talks please click on the following link

I hope to see and chat with with you there !

Update : You can find my presentation here :

Sip-Servlets and JAIN-SLEE : working hand in hand, is the war over ?

As you might know, there is a constant war raging between Sip Servlets and JAIN-SLEE and most see them as competing specifications/products and try to choose between one or the other.

My take is that they don't need to compete since they complete each other very well and it has been one of the leitmotiv behind building Mobicents Sip Servlets.

JAIN SLEE is a more complex specification than SIP Servlets, and it has been know as heavyweight and with a steep learning curve. However JAIN SLEE has standardized a high performing event driven application server, an execution environment with a a good concurrency model and powerful protocol agnostic capabilities thus covering a variety of telco protocols.
SIP Servlets on the other is way much simple and easier to get started with. Its focus is currently on SIP + HTTP/JEE only and is more of a programming model while JAIN SLEE is more of an application environment, a platform.
The fact that Sip Servlets is focused on SIP+JEE makes it a natural fit to build JEE converged applications and way much simpler than JAIN SLEE. To me it feels like JAIN SLEE and Sip Servlets target different audiences, different needs.

It's been a long time since I wanted to leverage the power of both and make them work hand in hand to leverage standards all the way for an application. It is now possible since the Mobicents Platform provides both JAIN SLEE and Sip Servlets implementation within the same VM.

So I hacked away, helped by my Mobicents fellows and here it is the JAIN-SLEE/Sip Servlets Interoperability Demo.

This converged application leverages the power of the Mobicents Platform and shows how JAIN-SLEE and Sip Servlets can be used together to leverage standards for protocols outside of the scope of JSR 289 specification in using JAIN-SLEE.

In this example, Mobicents Sip Servlets is used to handle the SIP protocol for which it is a natural fit, JEE is used as a gateway to communicate between Sip Servlets and JAIN SLEE worlds, Mobicents JAIN-SLEE is used to control Media through Media and Text to Speech Resource Adaptors and Mobicents Media Server is used to handle Media and DTMF signals.

Media has been used here as a proof of concept of a typical need for sip servlets applications that is outside of the Sip servlets Spec and support for it is really up to vendors thus the application, if built using only Sip Servlets, would be non portable between vendors and application servers.
The same kind of application could be built for accessing other standards (such as Diameter offered by most vendors in the same proprietary way) or legacy protocols through JAIN-SLEE in a PORTABLE way without to resort to vendor proprietary extensions.

One of the logical next steps Mobicents is already taking is to drive and create a unified model that leverages the simplicity and tight JEE integration of Sip Servlets with the power of concurrency control and protocols abstraction of JAIN-SLEE. Feel free to join us if you're interested in it !

Mobicents Sip Servlets has a new home

The Mobicents Sip Servlets project that started off at to implement the SIP Servlet v1.1 (JSR 289) work in progress specification on top of Tomcat & Jboss and to develop interoperability standards between Sip Servlets and JAIN-SLEE has now moved away to join its family, the Mobicents Platform.

The project will leverage the same communications channel as the Mobicents platform :
User Forum
Contributor Forum
Mobicents google group

The source code is now accessible at for browsing or at for

Issues are available at will stay as it is for historical purposes but won't be updated anymore.

Stay tuned !