Saturday, April 3, 2010

Asterisk vs. FreeSWITCH - This Again? Really?

Sigh. Yet another blogger who thinks that there's some sort of knock-down, drag-out fight between Asterisk and FreeSWITCH. I'll get to that in a minute. First, though, let me give you the quick version of my background so that my biases are clearly enumerated before I give my opinion.

As some of you may know, I work with the FreeSWITCH team. I've been working officially with them for about 18 months. Prior to that I was a relatively active volunteer member of the community for at least another 18 months. Prior to that I had been watching both FreeSWITCH and Asterisk since 2006. That's roughly four years of watching both projects, with using Asterisk heavily at first and then a gradual shift over to FreeSWITCH. When I first heard of Asterisk, I thought, "Awesome! An open source PBX!" (I was an NEC PBX technician for five years in the 1990's and then went to work for a call center for nearly 10 years as the IT and "phone guy" and key/PBX systems are a passion of mine.) I didn't actually try it out until I happened to see the starfish book - TFOT as it's come to be known. I bought it immediately and jumped right in. I'm like many OSS supporters: when someone goes through the trouble of producing "dead tree" documentation for an OSS project then that project must be gaining traction. (Shameless plug: I am writing a FreeSWITCH book with Anthony Minessale and Darren Schreiber for Packt Publishing - watch for it later this year.)

I played a lot with it, joined the Asterisk mailing list and even convinced my then boss to let me buy a four-port T1 card so that I could experiment with PRI lines and connecting to our NEC 2400 PBX. It was a lot of fun, until... CDRs. At that time, Asterisk CDRs were the stuff of nightmares. (Are they still? I don't know - I'll leave that to those who use it in production.) It was about this time that someone - Douglas Garstang, IIRC - was ranting pretty heavily about his own woes with Asterisk. Of course, he was doing this on the Asterisk mailing list and more than a few feathers were ruffled. Trollish behavior aside, he mentioned two syllables that would eventually change my life: FreeSWITCH. I had never heard of it. Of course, this was right around the time with the drama of the OpenPBX/CallWeaver fork. I was new to Asterisk and VoIP and I found this all very confusing. Asterisk seemed so awesome! Why were there those who forked it and those who abandoned it? I didn't know, but I kept learning as much as I could. I checked out FreeSWITCH in the very early days, long before people were using it in production. My impression was simple: it's going to be an awesome project someday, but I can't use it right now. I couldn't use it for the projects I was working on because they all required TDM hardware support. Still, I couldn't help but think that the FreeSWITCH guys were on to something, so I signed up for the mailing list and decided to check in every now and then. In the meantime I kept on tinkering with Asterisk.

Fast-forward to May, 2007. The FreeSWITCH guys created OpenZAP - a TDM hardware abstraction layer. Excellent! Now I could try out FreeSWITCH with my projects. I jumped in with both feet and this is where I really began to learn about the differences between the two projects. I guess I was among the first persons to try using FreeSWITCH with a PRI carrier. I thought I was driving Anthony and Mike Jerris nuts with all of my questions but not only were they patient with me, they expressed appreciation for my efforts to get TDM working with FreeSWITCH and my efforts to document everything that I learned. And learn I did! It was crazy and fun learning all about FreeSWITCH and diving into Q.931 spec docs from AT&T and the ITU. The next year was very educational. The next thing I knew I was at ClueCon 2008 meeting all of these guys in person! I also met Allison Smith, "the voice" of Asterisk. I met Jim van Meggelen. It was a bit overwhelming at first, but everyone was down-to-earth and friendly. Brian K. West has especially helpful, taking me under his wing and showing me around. (He still does, and I love every minute of it! Thanks, Brian! You are an awesome guy who knows more about VoIP and networking than pretty much anyone I've ever met.) By the end of 2008 I was working with the very same guys whom I thought of as rock stars: Anthony, Brian, Mike. I am still working with those great guys today. Too cool.

Pardon the tangent, but that puts this post in perspective. I've spent a lot of time over the past few years with the core FreeSWITCH team. I think my viewpoint of their feelings on the matter of "Asterisk vs. FreeSWITCH" is pretty accurate. That's why I feel it is necessary to comment on the aforementioned blog post by "kallaje" over at I'll restrict my comments here to the information he presents as factual. I'll do my best to present "our" side's viewpoint. I can't be unbiased but I will do my best to be reasonable. Here goes.

This is the most sought after topic in the history of Telecom industry I suppose.

I have to assume this is hyperbole. If it isn't then the rest of his post really is just the rantings of an uninformed lunatic.

These 2 factions for some reason, I cant understand, are dividing the telecom world.

Wow. We're factions and we're "dividing the telecom world"? I didn't realize that our respective projects were so incredibly important! I'd like to find out what, exactly, precipitated this comment. (More hyperbole perhaps?)

One claiming superiority over the other.

I don't know that either side has ever "claimed superiority" over the other. I do know that many FreeSWITCH users are Asterisk "refugees" who simply wanted or needed a different solution to meet their VoIP needs. As you'll find out in the upcoming FreeSWITCH book, Anthony lobbied for the creation of "Asterisk 2.0" but was met with a range of reactions ranging from ambivalence to hostility. I suppose you could say Anthony Minessale is "Asterisk refugee zero." He started FreeSWITCH, not because he hated Asterisk, but because he wanted Asterisk to be able to do much more than what was available in 2005. We're now in 2010. FreeSWITCH 1.0.5 is about to be released and it is incredible. Is it "superior" to Asterisk? That's a ridiculously subjective question, and an irrelevant one as well. No one on the FreeSWITCH team is out there claiming that FreeSWITCH is "better" or "superior" to Asterisk. What they are saying is that there are many things that FreeSWITCH can do that Asterisk cannot. (Examples: multiple UAs, mix calls to/from any codec and sampling rate, supports sampling rates of 8k, 12k, 16k, 24k, 32k, and 48kHz.) FreeSWITCH being able to do something that Asterisk cannot (or vice versa) is not a claim of superiority. Also, I still subscribe to the Asterisk mailing list. I haven't seen or heard anyone from Digium making any claims about Asterisk being "superior" to FreeSWITCH. I have no idea where this crazy statement came from.

I think both are equally good but differ in the purpose they serve and whom they serve.

Ah, finally a statement that doesn't have me pulling my hair out. The expression "equally good" is very subjective, but that's not the important part of this sentence. Rather, the statement that the projects "differ in the purpose they serve and whom they serve" is key. It is 100% correct. Oh, and kudos for using "whom" correctly and not "who." I wish the blog post consisted of only this sentence because it is the high point of the entire post.

The differentiation is in the number of concurrent call handling and that makes all the difference for choosing one over the other!!!

Yes and no. Yes, FreeSWITCH can ostensibly "handle more calls" than Asterisk. However, Asterisk has been making strides in this area. Olle E Johansson reports that there is a large Asterisk installation that is surpassing 10,000 concurrent calls. Anthony and Brian have experimented with a FreeSWITCH server handling 20,000 calls, but at some point you have to ask, "Why?" and just move on to a different problem. Just because you can put 10K calls on a single box doesn't mean you should. The bottom line is that FreeSWITCH is a soft-switch and Asterisk is an IPPBX. They have lots and lots of overlapping functionality. They each do things the other doesn't. No big deal there. My take on this is simple: use what works for you, regardles of how many calls you need to handle on a single machine.

...but SMB’s must not invest in Windows…

I'm no Windows fan but I don't know that SMB's "must" avoid Windows no matter what. I came from a place that had 100+ Windows XP machines and they worked really well for us. That being said, I do prefer Linux for pretty much all of my server needs. However, many others out there use Windows 2003 and 2008 Server edition with FreeSWITCH and report good success. Like we said before: use what works for you.

Freeswitch [sic] is not simple.

That's a bit of a straw man. Of course, FreeSWITCH isn't "simple." Why? BECAUSE VOIP IS NOT SIMPLE!!! Hello? Have you read all the SIP RFC's out there? Have you seen all the crazy NAT devices and evil SIP ALG's in various products? On the other hand, I suppose you could say that the power of a platform is inversely proportional to it's simplicity. Translation: FreeSWITCH is really powerful.

It’s [sic] SIP Stack is too robust to debug or understand.

Huh? How can a SIP stack be too robust? FreeSWITCH currently uses the Sofia SIP library from Nokia. It's pretty robust. As for not being able to be understood or debugged - what full-featured SIP stack is non-robust enough to debug or understand? Is this person really saying that chan_sip.c is easy to debug or understand? Has he seen the bug reports in Mantis?

Its 407 authentication always nullifies your Avaya trunk.

Perhaps Avaya should actually follow the RFC's and not bastardize SIP the way so many others do. SIP is complicated enough without all of the vendors making their own goofy little quirks and additions.

Its [sic] not a good test platform.

Wrong. It's a great test platform! The FreeSWITCH devs don't pander to those wanting dirty hacks in order to gain interoperability with vendors who choose to cut corners or play fast and loose with the RFCs. If your stuff works with FreeSWITCH then chances are that your stuff really does follow the RFCs. There are some exceptions, of course. Classic example is Sonus and their DTMFs. If you want the sordid details then check this out.

It is too scalable to be handled by a single person.

Except for the hundreds of single persons who use it and administer FreeSWITCH-based VoIP systems every day. I don't have any clue where that statement came from.

Freeswitch [sic] is superb for programmers who really like doing something on the cloud, with Vitelity or Amazon EC2. Great return on investment guaranteed.

I'd have to agree with this. We have many users who like to do stuff in the cloud.

The best part? Its MPL license…. What more do we need as application integrators and designers…. All in a single product.

I generally agree with these statements as well. However, I don't agree that FreeSWITCH doesn't scale down very well. It scales down really well, so well, in fact, that there is a new soft-phone project that will use FreeSWITCH as the telephony engine.

Freeswitch [sic] can never even be managed for a small SMB...If you want to scale Freeswitch [sic] to SMB scenario, then it only means, you need hire someone.

We have hundreds of happy users who would completely disagree with these assertions. However, we don't discourage enterprises from hiring in-house talent to take care of their telecommunications infrastructure. VoIP and FreeSWITCH take time to learn. Frankly, so does Asterisk. The mere presence of is no panacea for curing all the ills one faces when deploying Asterisk. All VoIP systems have some level of complexity and a learning curve. FreeSWITCH is at the high end: lots of power, lots of options, lots of time and effort needed to learn the ins and outs. However, if you download and build FreeSWITCH with its default configuration you will have a simple soft PBX that "just works." In an hour you can be using and learning FreeSWITCH.

When I say, Freeswitch [sic] is difficult to use, I am taking into account the number of resources, help available in the web to do it as well. Its [sic] really really poor.

I would have to disagree with this. FreeSWITCH has a vibrant online community, including an IRC channel and several mailing lists. The three main developers answer questions on both email and IRC pretty much every day. When was the last time Mark Spencer answered a question on email or hung out in #Asterisk to help new users? As far as other resources, yes I understand the challenges. That's why we're writing a book as well as revamping the wiki. I am doing much of this work on my own so it is going slowly, but it definitely is going. The FreeSWITCH wiki does have lots of information, however some of it is really hard to find. We are aware of that and are working on it. (Volunteers welcome, BTW!)

Freeswitch [sic] must remove their big Advertising on Asterisk v/s Freeswitch and focus more on what they are good at.

I just googled "Asterisk vs FreeSWITCH" and mostly everything I found was written by other people. The only thing that we have is "node 117" which is a post that Anthony wrote in response to repeated requests from people who wanted to know the differences between Asterisk and FreeSWITCH. Although the link on the main page (upper left corner) for node 117 says "FreeSWITCH vs. Asterisk" that does not mean the two projects are in some sort of cage match. It simply means, "How does FreeSWITCH compare to Asterisk?" As for this "big advertising" campaign about Asterisk vs. FreeSWITCH - I simply can't find any evidence that it even exists.

They might have been good in blaming before, but its [sic] time to move on and grow up

I don't know who was being "blamed" by the FreeSWITCH dev team nor have I heard them "blame" anyone. I don't know what the author is really trying to say. Perhaps he could explain this statement because it seems just plain wrong to me.

Well, those are the comments he made that I wanted to address. As for the state of "us vs. them" here are my personal thoughts. Is there hatred, animosity, and bad blood between the two projects? Absolutely not. Is there some good-natured ribbing going on? Of course! What about the disagreement between Anthony and some of the core Digium guys? Isn't there some bad blood there? Perhaps. But even if there is, does it really matter? Just because two guys have a disagreement doesn't mean that their two projects represent "two factions that are dividing the telecom world." They are simply two different OSS telephony projects with some overlapping functionality.

The bottom line is rather uncomplicated. The FreeSWITCH developers have a very simple motto: use what works, be it FreeSWITCH, Asterisk, YATE, OpenSIPS, Kamailio, or some combination thereof. That's one of the beautiful things about FOSS - you can try them all and pick the one that works for your scenario. Your choice may be different than mine, and I have no problem with that. You may love Asterisk and I may love FreeSWITCH but that doesn't mean we have to be adversaries. So please, no more "Asterisk vs. FreeSWITCH" diatribes. We've all got better things to do.