Sunday, April 26, 2009

Asterisk + SS7

From last few days I am trying to set up Asterisk + SS7 with Sangoma A102 card on my Ubuntu 8.04 machine. This being my first time with Asterisk I was bit skeptical of things and was wondering if it will be smooth? Well, it wasn't really out-of-box, but it wasn't tough either. Here I will try to explain step-by-step of what I did, challenges I faced and solution for same.

First of all keep in mind that Zaptel module is now renamed to Dahdi. It really took some time for me to understand this and I was wondering if I need Zaptel or Dahdi. This might be very trivial for people who are into Asterisk, but for some one like me who has just started, especially after reading 'Asterisk - The future of Telephony' book where they always talk about Zaptel, it wasn't easy to make out that Dahdi is latest version of Zaptel. Follow the announcement here http://blogs.digium.com/2008/05/19/zaptel-project-being-renamed-to-dahdi/

To have Asterisk + SS7 you need following modules

  1. LibSS7
  2. Dahdi
  3. Asterisk

Even before you start on installation of these modules, there are few linux specific modules that needs to be installed in your machine.

#sudo apt-get install build-essential
#sudo apt-get install linux-headers-`uname -r`
#sudo apt-get install libssl-dev
#sudo apt-get install ncurses-dev
#sudo apt-get install libnewt-dev
#sudo apt-get install zlib1g-dev
#sudo apt-get install bison

In addition I also followed the packages explained in book 'Asterisk - The future of Telephony'. look at Table 3.1


LibSS7
Next download the source code for libss7 (this is still not available as binary). Remember you need to download the Branch 1.0 and *not* Trunk. Follow the forum entry http://archives.free.net.ph/message/20090331.150153.564445b6.en.html

Check out src code to your /usr/src svn co http://svn.digium.com/svn/libss7/branches/1.0/

Next call 'make' and then 'sudo make install'. Thats it! libss7 is installed.

Dahdi
Check out dahdi linux trunk src (there is also dahdi-tools) to /usr/src

svn co http://svn.digium.com/svn/dahdi/linux/trunk/

I renamed /usr/src/trunk to /usr/src/dahdi-trunk. But really it doesn't matter. Go to this dir and call 'make' and 'sudo make install' and your dahdi is installed

Dahdi Tools
Check out dahdi-tools trunk src to /usr/src

svn co http://svn.digium.com/svn/dahdi/tools/trunk/

Go to this dir call './configure' and 'make menuselect'. This will open up UI where you can select modules that you want. I just called 'Save & Exit'. Next call 'make' and 'sudo make install' This will install the dahdi tools for you.


Asterisk
Download the Asterisk 1.6.0.9 from http://downloads.digium.com/pub/asterisk/asterisk-1.6.0.9.tar.gz to /usr/src. Un-tar it and go to parent dir. Call './configure' You should see in console output that libss7 is selected. Call 'make menuselect'. In this under 'Channel Drivers' header you should see 'chan_dahdi' selected (* against it) This means libss7 is good! Just call 'Save & Exit'. Next execute 'make' command and then 'sudo make install'. If everything is good, Asterisk is installed for you!

So far we just talked about Asterisk side of the world. But for Asterisk to talk to your Sangoma Hardware you need to install the wanpipe drivers. I downloaded the beta version from Sangoma site and trying it out now. Will blog about Sangoma experience in next blog!


I also tried chan_ss7 instead of Asterisk libSS7 for Asterisk support of SS7, but realized chan_ss7 is not compatible with Asterisk 1.6.x.

Found a very good article on this and worth reading http://www.cesnet.cz/doc/techzpravy/2006/asterisk-ss7/asterisk-ss7.pdf


Stay Tunned!

Saturday, March 21, 2009

Project ideas for Google Summer of Code 2009

Its that time of the year when students across the globe gets an opportunity to participate in Google Summer of Code and get paid for executing the project that they always wanted to. This year too RedHat/JBoss has participated and has been accepted as Mentoring Organization.

Follow the RedHat page for GSoC 2009 here

There are many ideas that have been listed by JBoss here

The Mobicents Media Server team too has identified following Project Ideas where we are ready to mentor the students

Project Ideas
  • Add Support for RTCP protocols to Mobicents Media Server
  • Support for SRTP protocol to Mobicents Media Server
  • The Automatic Speech Recognition engine to Mobicents Media Server. You can look at Sphinx-4 project which is open source
In addition the VoIP PBX project from Mobicents Sip Servlets listed on same page too is of interest to us. It uses Media Server for all of its media processing.

However these are not the only topics, if you have something in your mind and would like to execute as project on Mobicents Media Server, please feel free to drop us a line at amit dot bhayani at gmail dot com or oleg dot kulikoff at gmail dot com



All the best!

Friday, February 6, 2009

Mobicents Media Server has new home

Mobicents Media Server now has its very own personal blog ;0) http://mobicents-media-server.blogspot.com/. All the discussions about MMS roadmap, architecture discussion, design, release notes etc will go to this blog.

Many more news to follow on MMS front, stay tuned!

Thursday, January 29, 2009

Mobicents Media Server 1.0.0.CR5 a step closer to GA (Stable) release

With the latest release of Mobicents Media Server 1.0.0.CR5 its just an inch away from finish line - GA (Stable) release. The CR4 was completely overhauled to achieve greater performance and CR5 is bug fix reported from CR4. In doing so there were number of modifications made such that the MSC API from Application Developers perspective doesn't change. The Announcement and IVR endpoint's in new MMS doesn't have transcoding capacity now. This was required to boost the performance. Also most of the time in Telco world the application developer knows precisely which codec will be used by end User Agent (UA) and hence use the pre-encoded audio file such that Audio Player reads this file, creates RTP packets and sends across to UA. If this is not the case than the application just has to front-end the Ann/IVR Endpoint with Packet Relay endpoint which still has transcoding capacity. The Announcement endpoint is capable of generating DTMF Tones. The Conference Endpoint is not modified and it too has transcoding capacity just like pre CR4. The Conference Endpoint has the DTMF detection and Audio Player such that Application can directly detect DTMF on Conf Endpoint or play the announcement.

We are very happy to announce that MMS can now easily achieve 100 concurrent announcements with transcoding. This test was done on my laptop which is 2GB Dell D620 mahine. We still have to do a test without transcoding and on real servers. If you want to test the performance of MMS in your environment please feel free to drop a line at amit dot bhayani at gmail dot com

For further details please look at http://groups.google.com/group/mobicents-public/browse_thread/thread/e6dd1ee52a357f53

Monday, December 22, 2008

Media Gateway Control Protocol Stack Performance improved


Media Gateway Control Protocol (MGCP, RFC 3435 and JSR 23: JAINTM MGCP API Specification) is the only piece as of now that connects the Mobicents Media Server (MMS) and remote application and hence the performance of MGCP stack is crucial for MMS to be called as GA (Stable). Before MMS CR4 is released, the team is doing everything possible to make MMS performance reach the magical figure. In attempt MGCP stack was also scrutinized for every little details, tweaked and modified to bring it upto the mark. And voila! MGCP stack performance test showed 175 CPS on my Dell D630 Laptop which has 4GB RAM and Linux OS.

Above shown is the images of test scenario that shows through put in number of calls completed per second.

The flow of message (equivalent to one call) in test is

Call Agent (CA) <------------> Media Gate Way (MGW)

CRCX ------------>
<----------- CRCX Response RQNT ------------>
<----------- RQNT Response DLCX ------------>
<----------- DLCX Response While this may not be the flow of every MGCP cycle in real world, but covers the most generic scenario. The test is available at http://code.google.com/p/mobicents/source/browse/#svn/trunk/servers/media/controllers/mgcp/mgcp-stack/src/test/java/org/mobicents/mgcp/stack/test/concurrency

Steps to execute test
  1. checkout the code from http://code.google.com/p/mobicents/source/browse/trunk/servers/media/controllers/mgcp/mgcp-stack/ and execute 'mvn install' from mgcp-stack directory
  2. Modify the /mgcp-stack/ant-build-config.properties to point to correct jar file's
  3. Start the MGW by executing command 'ant mgw' from /concurrency folder
  4. Start the CA by executing command 'ant ca' form /concurrency folder
By default the number of MGCP calls(cycles) the test will execute is 10000 (look at NDIALOGS parameter of CA.java) and the concurrent cycles is capped at 100, look at MAXCONCURRENTCRCX parameter of CA.java

Next in-line is measuring and improving performance of MGCP Resource Adaptor.

Friday, November 21, 2008

Performance of Mobicents Media Server 1.0.0.CR3


Yesterday I did a performance test of Mobicent Media Server 1.0.0.CR3 on my laptop (Dell D620, Dual Core, 2GB RAM) with server and mms load test client running on same machine. The test was made for 50 concurrent announcements of an average length of announcement 3.74 Seconds. The codec used by UA test client was G711 A-law. The test lasted for 34487595 seconds or 9.58 hours (I stopped test and machine after this as I wanted to move to office ;) ). Number of announcements completed were 231202 out of which only 292 failed which means failure rate of 0.1262 %. The number of successful announcement were 231198. The load on CPU was on an average 60%. This indicates that max load on MMS can be further increased and hence more concurrent announcement

If we calculate the Erlang Number based on this statistics 3.74 (avg announcement in sec) * 231202 (completed announcement ) * 1000 (convert to milli sec ) / 34487595 = 25E. The call set-up and tear down takes time. The signaling used was MGCP stack on client/test tool side and MGCP RA + mgcp-controller-sbb on MMS server side.

These are definitely much better numbers compared to what MMS was capable of before CR3 release.

Performance is always relative to what you are trying to achieve. Its directly proportional to environment, application and fine tunning in addition to what one is trying to measure. Try the MMS performance in your environment, the load test tool is available at http://code.google.com/p/mobicents/source/browse/#svn/trunk/servers/media/test-suite

Soon we will execute load test on actual server and expecting the numbers to be much greater than reported here ... stay tunned!

Saturday, November 15, 2008

A week at MTN, Nigeria


Just finished a four day JBCP training at MTN, Nigeria. This was getting delayed for quite sometime and finally I had an opportunity to meet the brightest of guys. It was really fun spending four days with this team and class was very interactive with lot of questions & answers and brainstorming. The best part is this training made everyone of us rethink the power of open source and how quickly one can implement the services and go to market in jiffy. I learned that Nigerian's love to talk and most of operators revenue still comes through voice calls, but with intense competition in the region VAS is what will separate a winner from rest. Learned that there are more than 8 operators in Nigeria .. wow that's a big number for a country of approximately 140 Million people! Convergence is the key! They have many interesting ideas in development and will go live soon.