Battling the GlobalCrossing CallerID blues

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…

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:

  1. One who robs at sea or plunders the land from the sea without commission from a sovereign nation.
  2. A ship used for this purpose.
  3. One who preys on others; a plunderer.
  4. One who makes use of or reproduces the work of another without authorization.
  5. One that operates an unlicensed, illegal television or radio station.
Ok, let’s take a look at the above and examine:
  1. Considering the fact that I’m not at sea nor am I attacking from the sea, I don’t qualify for item 1.
  2. I won’t even consider number 2.
  3. 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.
  4. 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.
  5. I don’t operate an illegal or other wise unlicensed TV or Radio station – according to item 5.
So, taking all of the above, I can be considering a small time pirate – I only pirate the shows that I like watching. What’s available here I watch on TV.
Nonetheless, I’m not arguing that copyrighted material piracy is OK – the simple reason is that people in Israel even pirate the things that don’t need to be pirated. For example, Open Source software is being exploited and resold in Israel as proprietary software. Actually, people in Israel have no idea what Open Source really means, thus, people can push whatever lame story to people.
For example, this week I went to a meeting at a small Contact Center. I went there to discuss the installation of a Recording System for the installed PBX system (I have developed one of the most robust CRM/ERP aware recording systems for Asterisk). In any case, I go to the meeting and sit down with the CEO and owner of the Contact Center. I start explaining that I’m using Asterisk, he suddenly stops me and says that he met with the CEO of a certain company, who claims that they developed Asterisk. Actually, he said that the CEO claimed that the initial idea for Asterisk was his. I was pissed off! I started explaining to the man that Asterisk is developed by Digium and it’s an Open Source product and basically, apart from Asterisk Business Edition, no-one, not even I, can sell Asterisk as is. We can create a product based on Asterisk, but we can’t sell Asterisk, nor claim it is ours. After showing the man some websites and various videos of Mark Spencer discussing Asterisk he asked me: “How can that man claim that he developed Asterisk, when it is clear that he didn’t?” – and I responded: “Because people in Israel don’t give a damn and remain ambivalent to the truth”.
I guess that is the same reason why Internet Piracy is so big in Israel. Much of the stuff we want isn’t available here in shops, so go ahead and pirate it. Once you’re used to pirating something, pirating anything simply becomes a second nature to you. I suggest that the IIPA do a better statistic and check the actual pirated content being downloaded, out of which, check how much content isn’t available in Israel in normal distribution channels – and then remove that information from the statistics. I’m confident that while the number will still be high, Israel will no longer be number 1 in the list.

Asterisk AGI Programming – New Book

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.

Asterisk Developers Book

Asterisk Developers Book

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!

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

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.

Sangoma USBfxo: too little, too late…

Sangoma recently introduced a new FXO product, the USBfxo. The USBfxo is a dual FXO port device, connected to your Asterisk server via a USB connection. Now, while I do admire the way Sangoma keeps trying to kick it up a notch with new products, but isn’t Sangoma a little late to jump on the USB train?

Sangoma USBfxo Device

Sangoma USBfxo Device

Xorcom had been in this business for 4 years now and I see no reason why would the Sangoma product be any better than the Xorcom product. In addition, if Sangoma is targeting their product at the very low-end PBX systems, in my book, they actually missed the product line. In my view, if Sangoma wants to put a proper USB device on the market, it should have a minimum of 4 ports on it, 3 FXO and 1 FXS. You are probably wondering why I’m propsing such a weird combo, well, the reason is simple – Fax machines and they yet to be improved Asterisk FAX capabilities, and the fact that people still use FXS port of physical fax machines. I’m one of the biggest Asterisk and VoIP promoters I know, and even I use a physical fax machine at some points in time. True I used Hylafax and IAXmodem to receive most of my fax transmissions, but when it comes to sending faxes, nothing beats a physical machine.

So, as I started saying, Sorry Sangoma, too little, too late … better luck next time!