The rants and raves of a technogeek
Asterisk
Cloud Computing negates IP Centrex Services
Mar 4th
Today I sat down with a friend, a telecom consultant like myself. The main difference between the two of us is that, while I’m purely focused on Open Source technologies, he’s focused on proprietary technologies. Well, I can’t really blame him, after all, he used to be the CTO of a Tier-1 long-distance carrier in Israel and his track record of building large scale systems can’t be negated or dispersed at ease.
In any case, we were discussing the financial validity of obtaining an IP centrex platform vs. building one of your own based on Asterisk. On one hand of the scale, we had companies such as Broadsoft and the like, proprietary technologies for building IP centrex environments. In addition, we’ve discussed the various FlatPlanetPhone type companies, rendering IP centrex type services via Asterisk, in a hosted model solution. It is obvious that if you are going into the “retail” business, then you simply sign up as a reseller of anyone that hosts their own platform and go on from there – however, this was not the case.
Our discussion was based on the following assumption: a projected customer wants to host IP centrex like services to a total of 15,000 business subscribers, each one consisting of anything from 5 users at the low end to 60 users at the high end. The average calculation was 33 users and multiplied that by 7500 (half of the project users case) – giving us a total 247,500 connected phones. Ok, a Broadsoft of that size is WAY WAY WAY more expensive than our projected budget, and building our own IP centrex platform based on Asterisk would take too much time.
Recently, advances on the implementation of Asterisk utilizing Amazon EC2 had resulted with the implementation of a full office PBX system can be implemented within an EC2 instance. While the PBX is based on Asterisk + FreePBX, it surely can provide any of the required IP Centrex type of services a normal PBX platform will provide – in addition to the hosting environment which is highly reliable.
Now, a normal office works anything between 9 to 11 hours per day. Doing some Amazon math shows that running a PBX system, 11 hours per day, 22 days a week, yields a total of 242 hours per month. Thus, based upon a medium C1 instance, we’re talking about 49$ per month for running your PBX. Bandwidth for a PBX that size would cost around the 5$ per month, and the elastic IP is another 3$, thus, a total of 57$ per month, cost to the operator. The IP centrex model dictates a price per phone, thus, an office of 5 people, with a minimum charge of 39$ per phone per month, leaves us 137$ of profit per month. Let’s imagine that you’re using phones like SNOM 300 as your base phone, these are 80$ value at large quantities. Thus, the customer ROI is around the 4-5 months, which is normal in the services world.
Now, the PBX system can go online and offline on a daily basis, while being offline having its inbound calls directed to a company voicemail. This will save all the off-hours messages people may leave on the system and will also lower operational costs on a per day basis. If a company requires to have it’s PBX system up and running at all times, simply charge a bit more, no big deal.
In other words, the utilization of Amazon EC2 instances with proper AWS management and control can introduce a new business model – the Clouded PBX service. No more need to own large portions of data center realestate, no need to maintain large teams of IT and network personnel – just setup you AWS account, build your management system – and start earning cash. Look out Broadsoft, Asterisk and Amazon are coming – and a hail storm follows them.
Battling the GlobalCrossing CallerID blues
Feb 26th
As a part of my job, I manage and maintain customer platform – usually operating in the Calling Cards and VoIP services market. Over the course of time, I’ve learned to rely on some providers in this world, knowing that they work 99.999% of the time.
For example, i like working with DID numbers provided by Level3, GlobalCrossing and Voxbone. I have a fair dislike for DIDX and the like, simply due to the fact that their reliability, not the DIDX platform, but the providers themselves is questionable – at best.
So, why is this post called: “Battliing the GlobalCrossing CallerID blues”? simple, because the list that appeared before is now missing GlobalCrossing. Over the course of time, I’ve learned to live with the various quirks of GlobalCrossing, mainly, their inability to provide a proper e164 number as a part of the SIP headers. Usually, I would receive headers from global crossing that look like this:
FROM HEADER: <sip:3054230103@xxx.xxx.xxx.xxx>;tag=as54cf6928
Now, I new that in general, that didn’t post much of a problem, as long as it was consistent. However, starting today, some of the requests started looking like this:
FROM HEADER: <sip:13054230103@xxx.xxx.xxx.xxx>;tag=as1213141
However, to make things weird, one INVITE request would carry the non-valid e164 numbering, while the second INVITE may carry the correct format. In other words, there is no way to know exactly if the number is provided in full e164 or not. So, I tried doing some header mangling using Asterisk and other tools, however, nothing helped. Surely the format changed along the way, however, when I changed one side of the system, another side of the system broke – simply because it relied on something else – in other words, a fuck’n mess.
At this point, the problem is not yet resolved and i’m working with my DID provider to remedy the situation – after investigating it, the DID provider is currently bashing the heads at GlobalCrossing to fix the issue on their side. I will report back once I have more information.
If you suffered similar problems with other DID providers, I’d love to hear about it.
Copyright Enforcement in Israel – you gott’a be kidding me…
Feb 19th
A few weeks ago I had posted one of my usuall “Open Source License” rants, where I explained and ranted about the state of Open Source license enforcement in Israel. A recent study by the IIPA (International Intelectual Property Alliance) had positioned Israel as the number 1 copyright piracy country in the world!
When you think abuot it, it’s a little strange, as Israel is fairly small. However, in relation to the number of Internet connected users in Israel, the number of downloads of pirated software or other copyrighted material in Israel is of the highest percentage in the world. Sure, we all download a movie or episode here and there, but, some people in Israel go about and completely utilize pirated material only. Sure, I like watching my weekly episode of Fringe, but what can I do that no network in Israel is broadcasting it. So, I download the episodes via Bittorrent and watch them as they are published. However, on the other hand, I do purchase Microsoft licenses for my PC’s (yes, I have a Windows XP and a Windows Vista box - running Windows and Office), I did purchase a Mandriva PowerPack package for my Linux destktop and notebook and yes, I did purchase my books about DOJO, PHP and AJAX – so, I can honestly say that my utilization of pirated material is that for things I can’t obtain in Israel at all.
One would argue that it is still piracy, well, there is a certain point in that – however, if there is no one to pirate from where you are located, how can you pirate something? according to the dictionary, the noun priate means:
- One who robs at sea or plunders the land from the sea without commission from a sovereign nation.
- A ship used for this purpose.
- One who preys on others; a plunderer.
- One who makes use of or reproduces the work of another without authorization.
- One that operates an unlicensed, illegal television or radio station.
- Considering the fact that I’m not at sea nor am I attacking from the sea, I don’t qualify for item 1.
- I won’t even consider number 2.
- I don’t prey on others to take something, the airing of a TV show in the US is well published. Hell, the TV stations even publish their content online – only available in the US however – according to item 3.
- Ok, I do make use personal use of another persons work without authorization, however, as there is no local representation for the show that I’m watching – that point is somewhat muted in my view – according to item 4.
- I don’t operate an illegal or other wise unlicensed TV or Radio station – according to item 5.
Asterisk AGI Programming – New Book
Feb 18th
Well, it’s finally out – my new book that is
Some of you already know, but over the past year I’ve been busy writing a new book. This time it’s a book for Asterisk developers, especially tailored to PHP developers wishing to utilizing the PHPAGI framework. The book is out from Packt Publishing (Like my old AsteriskNOW book) and is updated with all the recent changes in Asterisk – including version 1.6.X and DAHDI.
If you like my work with Asterisk and would like to read more of my work, go ahead and get an electronic version of this book. I know it’s a little self promoting, by hey, it never hurts does it?
I’ve included a chapter on how to build a complete project from scratch, detailing the various analysis steps and various paradigms required to develop a fully functional Asterisk based application. I believe that even experienced Asterisk developers will benefit from this book.
Read my words – 3500 concurrent channels with Asterisk!
Feb 13th
One of the biggest questions in the world of Asterisk is: “How many concurrent channels can be sustained with an Asterisk server?” – while many had tried answering the question, the definitive answer still alludes us. Even the title of this post says “3500 concurrent channels with Asterisk” doesn’t really say much about what really happend. In order to be able to understand what “concurrent channels” really means in the Asterisk world, let us take a look at some tests that were done in the past.
Asterisk as a Signalling Only Switch
This scenario is one of the most common scenarios in the testing world, and relies upon the basic principle of allowing media (RTP) to traverse from one end-point to the other, while Asterisk is out of the loop regarding anything relating to media processing (RTP). Examine the following diagram from one of the publicly available OpenSER manuals:

Direct Media Path between phones via a SIP Proxy
As you can see from the above, the media path is established between our 2 SIP endpoints.
This classic scenario had been tested in multiple cases, with varying codec negotiations, varying server hardware, varying endpoints, varying versions of Asterisk – no matter what the case was, the results were more or less the same. Transnexus had reported being able to sustain over 1,200 concurrent channels in this scenario, which makes perfect sense.
Why does it make sense? very simple, as Asterisk doesn’t manage or mangle RTP packets, Asterisk performs less work and the server also consumes less resources.
Asterisk as a Media Gateway
Another test that people had done numerous times is to utilize Asterisk a Media Gateway. People used it as a SIP to PSTN gateway, SIP to IAX2 gateway, even as a SIP to SIP transcoder gateway. In any case, the performance here varied immensly from one configuration to another, however, they all relied on a simple call routing mechanism of routing calls between endpoints and allowing Asterisk to handle media proxy tasks and/or handle codec translation tasks.
Depending on the tested codec, I’ve seen reports of sustain over 300 concurrent channels of media on a single server, while other claim for around the 140 concurrent channels mark – this again mostly relied on various hardware/software/network configurations – so there is nothing new in there.
These tests tell us nothing
While these tests are really nice in the theoretical plane of thinking, it doesn’t really help us in the design and implementation of an Asterisk system – no matter if it is an IVR system, a PBX system or a time entry phone system for that matter – it simply doesn’t provide that kind of information.
The Amazon EC2 performance test
In my previous post, Rock Solid Clouded Asterisk, I’ve discussed the various mathmatics involved in calculating the RoI factors of utilizing Cloud computing. One thing the article didn’t really tell us, did it really work?
Well, here are some of the test results that we managed to validate:
- Total number of Asterisk based Amazon EC2 instances used: 24
- Total number of concurrent channels sustained per instances (including media and logic): 80
- Average length of call: 45 seconds
- Total number of calls served: 2.84 Million dials
- Test length: approximately 36 hours
According to the above data, each server was required to dial an approximate 3300 dials every hour. So, let’s run the math again:
- 3300 Diales per hour
- 55 Dials per minute
- As each call is an average of 45 seconds, this means that each gateway generates 20 calls
per second, and within 4 seconds fills the 80 channels limit per server.
According to the above numbers that we’ve measured, each of the Amazon EC2 instances used was utilized to about 50% of its CPU power, while consuming a load average of 2.4, which was mostly caused by I/O utilization for SIP and RTP handling.
Conclusion
When asking for the maximum performance of Asterisk, the question is incorrect. The correct question should be: “What is the maximum perfromance of Asterisk, utilizing X as the application layout?” – where X is the key factor for the performance. Asterisk application performance can vary immensly from one application to another, while both appear to be doing the exact same thing.
When asking your consultant or integrator for the top performance, be sure to include your business logic and application logic in the Asterisk server, so that they may be able to better answer your question. Asterisk as Asterisk is just a tools, asking for its performance is like asking how many stakes a butcher’s knife can cut – it’s a question of what kind’a steaks you intend on cutting.





Picasa
Twitter
Facebook
LinkedIn
Youtube
RSS