Adhearsion - Home

Mailing List

Subscribe to the Adhearsion mailing list for development and usage help.

Email:

PwnYourPhone

The official Codemecca video podcast

Coming soon

Want Examples?

# Maybe you want your public number to operate
# differently depending on the time.

main_context {
  if Time.now.hour.between?(9, 17)
    +opened_context
  else
    +closed_context
  end
}

opened_context {
  # Play main IVR here
}

closed_context {
  play 'sorry-were-closed'
}
(Load Another)

So what is it?

Adhearsion is an open-source, unconventional framework that ties technologies together neatly. Of these, Adhearsion is most noted as being “adhesion you can hear” for integrating VoIP by building atop the fantastic Asterisk PBX software by Digium. Adhearsion was designed to “understand” the many elements of the VoIP picture and both improve them individually and tie them together in one comprehensive solution.

With Adhearsion many tasks in VoIP engineering are improved, such as

These improvements Adhearsion offers build upon Asterisk’s potential without losing any functionality.

Adhearsion is written in Ruby and lets those even without any VoIP experience write applications intuitively and productively or simply download and use a pre-written solution. With the framework extension architecture, VoIP functionality can now be actually traded around – an issue the VoIP industry has always suffered from. Existing helpers standard with Adhearsion range from Jabber/XMPP instant messaging integration (works with Gmail/GTalk messaging too), a distributed computing server for remotely controlling your PBX (or calling other helpers), weather fetching, and remote Xbox Media Center controlling, to name a few. These all work anywhere in the framework, thus Adhearsion “adheres” these technologies together. What’s more, integrating your own extensions with these helpers or Adhearsion itself is extremely easy.

What can it do?

Tons! The entire Adhearsion framework rests atop the philosophy that things should be pulled closer together. This includes adhering technologies, people, and businesses.

A fresh, standard Adhearsion system out of the box does what many companies spend thousands on. It includes a wide – and growing – set of features that should not have to be rewritten for every business that wants to implement them. And yes, this is open-source.

Database integration rocks. Adhearsion uses the database object relational mapper developed for Ruby on Rails by 37signals. With this, Ruby objects map straight over to a table in your database. A “users” table becomes a User object (notice pluralization handling too) and each column of a table is a property of its representative object. If “users” has an name, extension, and age column, then you can simply pull this data out with your_user.age. The SQL is handled in the background, making your VoIP application truly database agnostic.

It makes life DRY. No self-respecting programmer should have to violate this Don’t Repeat Yourself principle. By hacking Ruby’s internals, the Adhearsion framework employs domain specific languages that are catered to the VoIP domain specifically, but still work as completely valid Ruby code. In your dial plan for example, all call-specific variables – such as “extension” or “callerid” – are already established for every call. For low-level access to your Asterisk box, the “PBX” object envelopes the idea of your physical PBX. PBX.sip_users for example abstracts the AstDB database access and parsing for you, returning the information Asterisk has on these users conveniently. This is where Adhearsion steps completely out of traditional bounds – in this example, you didn’t even have to know what the Asterisk Manager Interface is, did you? It should be simple because it can be this simple.

How mature is it?

There’ll be no hiding it: Adhearsion is presently beta software and should be adequately tested before put into production use. Giving it a try and reporting issues lets us make Adhearsion better. Our bug tracker URL is simple to remember: bugs.adhearsion.com. When you discover a bug, let us know there.

With that said, many are using Adhearsion with increasing success. If you’re doubtful, take a look at the page on having Adhearsion affect only one phone.

I wanna try it!

Our wiki runs a good Getting Started guide for newcomers to either Asterisk, Ruby or both. The wiki also features a guide for safely trying Adhearsion without having it interfere with anything else. This can be done by configuring just a single phone to use Adhearsion.

But you don’t want to click links. Fortunately for you the instructions are brief enough to include right here. If you’re on Ubuntu or Debian, go download RubyGems first and do

# Install Ruby
sudo apt-get install ruby rdoc

# Install RubyGems
unzip rubygems*.zip # From link above
cd rubygems*
sudo ruby setup.rb

# Install Adhearsion
sudo gem install adhearsion

And that’s it. If you’re using a different flavor of Linux, check your own package manager for Ruby’s appropriate package names. If you’re on Windows, you’ll probably want to unzip the file graphically.

From here on, Adhearsion is installed. Try doing “ahn help” in your command terminal for more information or read the getting started guide.