FreeSWITCH, an amazing open source PBX and telephony solution
About 6 months ago, we launched a very interesting project. Now that it has been in production for awhile and been slammed with traffic, I feel obligated to let the world know about a particularly BADASS piece of technology that is out there — and not just the part that we built!
The Challenge:
Ever wanted to track your conversions from an offline marketing campaign? We were contracted to develop a system for making thousands of simultaneous inbound and outbound calls which are routed to end users’ phone lines, based on business rules. Users pick a custom 800 number from a pool. Then they use that number in their print ads or on their billboard. When the line picks up, it can run callers through a verbal survey and records their answers, routing them to certain reps based on those answers. Or the users can create custom menu systems (for example, press 5 for a Korean-speaking salesperson).
The Technology:
How to handle the load? After a ton of research, we eliminated Asterisk as a viable solution because it lacks cost-effective scalability. Asterisk can handle hundreds of simultaneous calls per server and, it functions as a fully-functional PBX. Impressive, but we needed something more. And it was then that we came across the open source telephony platform, FreeSWITCH. FreeSWITCH was originally developed from the Asterisk codebase by a splinter team that wanted to see exactly how much performance they could squeeze out. By rewriting the stack from scratch, they managed to get about TEN TIMES the performance. Yes, FreeSWITCH handles thousands of calls at one time.
The Result:
At this point, we contracted with a SIP trunking service (their service is awesome, but their support super-sucks, so I won’t mention any names) to provide VOIP service. We built in the ability to detect busy signals and answering machines. And then, after a tremendous amount of testing, the beast was born. The system is currently in place and tremendously reliable. In fact, in about 6 months of production use, the server has only crashed once.
If you would have asked me 5 years ago if such a system could be built, I would have probably looked confused and babbled semi-coherently about insane 7-figure budgets and 12-month development cycles. But having helped get this amazing system in place, I am a pleased to say that custom telephony solutions can be had for not much more than your typical social networking site. We truly achieve great things by standing on the shoulders of giants.
Next up … voice recognition. Oh yeah!
EDIT (03-22-10): I wasn’t sure if this client was keen on having me post up details of the technology that their app runs on, so I left their name out of the post. However, I just got permission to link to their app. I know this sound like advertising, but it isn’t at all … I’m just very proud of what we’ve accomplished. Call Tracking It’s free to give it a test.









575 Anton Blvd.
Thanks, it’s nice to see FreeSWITCH getting used in the real world solving real-world-problems.
You should consider presenting your application at ClueCon this August http://www.cluecon.com !
BTW, if you are looking into voice recognition we will soon support a commercial module released by Vestec http://www.vestec.ca/ , a very inexpensive embeddable ASR engine.
Jason,
Very interesting post! I’m glad to hear that FreeSWITCH is working for your project. For those who want to know more about the history of FreeSWITCH you can check out Anthony Minessale’s Asterisk vs. FreeSWITCH article here: http://www.freeswitch.org/node/117
-MC
And you didn’t mention what programming language you used to build your system. Freeswitch does a good job of handling that many calls, but system has to take data from somewhere, store data somewhere, and it has to be done with some programming language. So what was it?
Good question … data resides in an MS SQL 2000 database. Yes, good old bulletproof SQL 2000! As far as the code, we used C# under .NET 3.5. The whole system is running on two Windows 2003 servers.
How many calls are you running through FS at once? Is it scaled over multiple FS servers, if so, how are you handling the Load balancing?
Simultaneous inbound calls has peaked at about 3 thousand. FreeSWITCH is scaled over two servers. But there is a database & webserver which is also associated with the app and that runs off a third server. Load balancing is handled through a very simple software-based algorithm which looks at total calls being handled by each server and routes to the server with the least calls. No dedicated hardware for load balancing.
Do you make thousands of simultaneous inbound and outbound calls in one server? What’s the machine’s hardware configuration?
2x Quad core Xeons; hardware RAID 10 with 4 drives total in the array; 8 gigs of RAM
Hi Tony,
Thank you very much for FreeSWITCH. I know have confidence to move away from Asterisk, i’m looking into moving into FreeSWITCH seriously especially for IVR applications hosting.
Question:
1. when will the module for commercial ASR be ready?
2. how can i go about detect busy signals and answering machines in FreeSWITCH
I need those features above?
Very motivating blog post. I am on the same way. Is it possible for you to share some of your concepts in realising such a big job, e.g. which mod you used, did you use the same mod for inbound and outbound, etc.
If there’s significant interest, I’ll make a more tech-oriented followup post.
Wow .. amazing that users can get their own menu. Truly custom telephony system that will be a solution for the development of telecommunications
@Jason - very interesting post. A tech orientated follow up would be great!
We’re working on a FreeSWITCH solution for a client at the moment and would be very interested in a bit of background on yours. Our backend is Linux based but I’m sure the concepts will be the same.
Well done by the way!
Pls do Jason
Could you elaborate on which API you used? Any other details would also be apreciated.
Thanks!
We built a custom C# API
Absolutely interested in a tech follow up, especially how you implemented “the ability to detect busy signals and answering machines”. I have been struggling with this one myself, wondering if I need to implement a custom module?
Is there any chance of open sourcing the “C# API” that you made for FreeSwitch? I think the .net and freeswitch community will really appreciate it.
Very interesting information. Thanks for sharing.