Conferencing with Asterisk on a $20/month Linode

nkinkade, January 7th, 2010

For quite some years CC has been using Free Conference Call for tele-conferencing needs. It generally worked pretty well, but people frequently complained of not being able to connect, or getting erroneously dropped into some empty conference room, and things of that nature … to say nothing of the questionable practices used by services like Free Conference Call that allow them to make a service like that free. Paid conferencing systems are actually quite expensive, and CC doesn’t have the resources to be able to roll out some $10,000 to $20,000 custom conferencing system. We ended up deciding to setup Asterisk on one of our servers. We didn’t really want to load one of our core servers, so we decided to give it a try on a $20/month Linode which we were already using for server monitoring.

Getting Asterisk installed on a Debian system is as easy as $ apt-get install asterisk. Configuring it is covered by thousands of other articles on the Internet. However, the problem is that Debian’s default kernel is shipped with a particular configuration that is unacceptable for VoIP applications like Asterisk. Debian’s default kernel sets CONFIG_HZ=250, but for tele-conferencing with Asterisk to have acceptable audio quality it needs to be 1000. No problem, building a custom Debian kernel package is pretty easy, but we wanted to run this on a Linode VPS, which is a Xen environment. So the question became how to get Xen patches applied to the vanilla Debian kernel sources. It may sound trivial, but it actually took me quite some time to work it out. The first issue was resources — a $20/month Linode doesn’t have many, and the VPS ran out of memory while trying to compile the kernel. I got around this by killing virtually every other un-needed process. The next problem was what turned out to be a bug in the Debian kernel-package package, which took me quite a long time to find … I didn’t locate the bug in the code myself, but it took me a long time to realize it was a bug causing my problem and then find the existing bug report and a workaround.

I’ll try to post here again soon with the actual steps needed to get this working, partly for the benefit of the community, but also to document what I did in case I ever have to do it again. For now, suffice it to say that we are successfully running our own conferencing system using FOSS telephony software (Asterisk) on a $20/month VPS. Not only does this give us much more control over the system, but it opened up the possibility for people to start calling in via VoIP (SIP or IAX!) software instead of dialing in through the PSTN. This saves CC even more money because dialing into our conferencing system through the PSTN is not free. For that we had to find a good DID provider. We ended up going with Flowroute and so far I’ve been very happy with their service. Their rates are very competitive (< 1ยข/minute), and the web interface for account management is very clean and intuitive. We have had conference calls with 20 people and the call quality has been just fine. Not only that, we can set up as many conference rooms as we want and hold multiple conferences simultaneously.

UPDATE: Wed Aug 11 21:56:24 UTC 2010 Belorussian translation provided by Patricia Clausnitzer.

6 Responses to “Conferencing with Asterisk on a $20/month Linode”

  1. Ryan Tucker says:

    Did you need to use the dahdi_dummy module at all, or did the Debian package not require it? I’ve been documenting various ways of accomplishing this with Ubuntu on a Linode, and it keeps getting tougher with each new Ubuntu release. For what it’s worth, I didn’t end up needing to recompile the kernel, but I have done compiles on 360s before without OOMing.

    The necessary Xen magic is in recent vanilla kernels, by the way, so that part shouldn’t need patching with kernels after 2.6.24 or so (‘tho you want at least 2.6.29 for stability).

  2. Yes, the zaptel and ztdummy modules were/are necessary. The Debian asterisk package doesn’t require the zaptel modules, but there are packages available. How did you get around the CONFIG_HZ issue without a recompile, or do Ubuntu’s default kernels ship with CONFIG_HZ=1000? I tried using a stock Debian kernel (CONFIG_HZ=250), but call quality was pretty terrible. Yes, the Xen patches are already included in the vanilla sources, but I still has to apply them with:

    /usr/src/kernel-patches/all/2.6.26/apply/debian -a amd64 -f xen

  3. Chris says:

    Thanks for the info.

    On the DID provider, has a flat rate did with up to 20 channels. Not sure how they will hold up with 20 channels, but you might give them a try as free=good.

  4. Ido Rosen says:

    I’ve gotten this working on Debian and Ubuntu on a Linode, and created kernel headers for the latest Linode kernels to let other Linode users play with kernel modules already.

  5. mazpe says:

    Any chance on getting the details on how you got dahdi_dummy installed and how you change CONFIG_HZ to 1000? It will be a great post for FOSS

  6. mazpe,

    There is a follow up post to this one which should have the information you are looking for.