Initial impressions of Adhearsion

As I mentioned Last night, I spent last week setting up an Asterisk server and writing a simple proof-of-concept using Adhearsion, a Ruby MVC framework for managing calls. I wrote up a HOWTO for Adhearsion that covers a few things not covered in the Adhearsion “Getting Started” tutorial — things that may be of interest to people completely new to Asterisk (like me) such as some simple SIP routing, where to find a phone number that will dial into your Asterisk box for free, and some basic networking issues that you need to be aware of when setting up Asterisk on a NAT’d network. Programming Asterisk is fun. Now I can be the guy setting up mindless phone trees and irritating callers! Seriously, it is fun. Access to phones is more wide-spread than access to web-browsers so you can potentially reach more poeple. In the tech-scarce regions that I’ll be writing software for soon, this is important.

What I Like

Adhearsion does make it relatively easy to set up call rules.The framework takes a lot of the drudgery out and Adhearsion scripts are more straight-forward than the cryptic Asterisk extentions.conf file. The #adhearsion IRC channel isn’t the most active channel I’ve seen, but the maintainers of the software do show up there and help out if you ask questions. Since the call management portion of relatively simple, I was able to throw something together really quickly without thinking too much about how to do it. In fact, most of the how time was spent on networking and Asterisk.

What I Didn’t Like

Well, there is quite a bit. So lets get started.


There don’t appear to be any simple step-by-step HOWTOs for Asterisk. This isn’t necessarily a bad thing — you should not need a cookbook to take care of a system on a day-to-day basis. But for people just starting out, or for best practices when you encounter a new problem, this sort of thing would really help out. AstriskNow (the distribution Adhearsion prefers, at least for the Getting Started guide) takes care of a lot of the setup, so that is good, but as soon as you step out beyond the lovely confines of the web-based control panel (say, to create a simple zip-code lookup service), you can kiss much of that simplicity good-bye.

SIP Knowlege Required

Beyond just Asterisk, you have to know SIP — at least some basic information. I didn’t know how SIP lookups worked. I knew SIP had a designated port, but I didn’t know about how it worked with RTP. I found most of this out, but it was sniffing the wire using WireShark and tcpdump. I would have prefered a nice step-by-step HOWTO or, at least, a heads-up. Still, I learned a lot that I might not have learned otherwise.

The “Ruby on Rails” Mindset

Look, I appreciate simplicity as much as the next guy. I appreciate that you think Ruby is the best invention since the wheel. But I already have my favorite tools. Telling me that your ORM takes twice as long to do things as doing it myself doesn’t mean your ORM is “FAST!”. It means it is slow and unoptimized. Furthermore, the creators of Ruby on Rails (RoR) specifically say they want you to Grow Out of their products. Apparently, they are more interested in generating hype as a way to make money than in building robust, scalable software. Now, this might not seem that important, but Adhearsion uses many of the framework elements from RoR.


The documentation for Adhearsion is pretty anemic. Yes, they have a great getting started document. Yes, they have alpha software (not “very beta” as the site says). But the documentation for moving beyond the initial examples isn’t that great. I’m sure they’ll improve it, so this is a pretty minor complaint.


The mailing list for Adhearsion is quiet as is the IRC channel. People are there, true, but there just aren’t a lot of them.

Development Status

This is another minor complaint. I understand the software is still pretty alpha at the moment. But it is pretty alpha. If I’m going to start working in a new area (i.e. Asterisk Development) doesn’t it make sense to use tools that I’m familiar with rather than learning a new set of tools on an immature platform? At this point (version 0.8), Adhearsion contains around 3000 lines of code. I’m tempted to go write my own framework in my favorite language and see how it holds up.


I like the idea of Adhearsion. Asterisk is very compelling, even if it isn’t the most intuitive thing in the world. I just wish things were farther along.

3 thoughts on “Initial impressions of Adhearsion”

  1. Re: erm

    You demonstrate half my point and miss the other half.

    I realize it isn’t far along. It was just a wish. I have seen Asterisk’s dialplans. They are horrible. But please don’t compare them to Perl. I have made a tidy living at working in Perl every day, including maintaining source that other people wrote while they were in high school. I don’t find Perl any more difficult to read than C, Java, or (shock!) Ruby.

    I appreciate a good ORM like ActiveRecord as much as the next guy, but my point is that ORMs like ActiveRecord aren’t unique to Ruby nor is AR very featureful or optimized when compared to other ORMs (but, granted, that is just second-hand knowledge since I’m more familiar with other ORMs). I was referring to AR’s own “marketing” material when I criticized its performance.

    I appreciate the ease-of-use that Adhearsion provides and I said as much. Perhaps you missed that?

  2. Re: erm

    Agreed. To have a valid comparison, you need some sort of benchmark. Like you, I had trouble finding any that compared AR to any other ORM out there (I looked for it when writing this up.)

    I was able to find a comparison between RoseDB and Class::DBI (two Perl ORMs). RoseDB is highly tuned and optimized whereas Class;;DBI did not have that focus. INSERTs are 3 times as fast in RoseDB while SELECTs are around 10 times as fast.

    Granted, that doesn’t mean anything about ActiveRecord’s speed. But it does tell you what a difference optimization can make.

    That said, I’m now interested enough that I’ll run my own simple benchmarks. I’ll post something when I’m done.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.