Plain Old Telephony Services for Webapps

November 30th, 2009  |  Published in Nerdy stuff  |  4 Comments

I used to have a job shaping the future of telecommunications in Europe and yet I can’t even transfer an incoming call without cutting someone off.

The dirty little secret of telecoms is – that bugger all people actually do know how to transfer someone without cutting them off, or configure an IVR or pretty much do anything else useful.  The reason for this is that real telecoms expertise is far more nerdier that your run of the mill computer science grad.  We’re not just talking pocket-protectors, we’re talking Ronny Drew beards and open tow sandals.

This presented me with a bit of problem, when last week, I decided to build a phone auditioning system for Piehole.  We’re been trying to come up with a decent USP for Piehole for a while and trying to stand out amongst the bloody Google search results is proving a pain.  We were hoping that allowing people to phone in auditions might help to do this.

The murky world of telecoms is about to be cracked wide open however.  Guys like Sean at Dial2Do are starting to bridge the gap between mere mortals and the telecoms set.  Up to now, the most user friendly way to integrate telecoms functionality into your web-application was to use something like Asterisk.

  1. Asterisk is a PBX that runs on the major platforms (Linux, Mac, Windows).  Its one real advantage is that it is very scalable. You can plug as many physical cards into it as your heat desires and it has developed somewhat of a niche as an open source alternative to the commercial PBX systems.  It deals in a rather arcane looking ‘dialplan’ files which allow you to create IVR’s, transfer calls and even integrate with web services.  Having said that, I wouldn’t recommend it.  You at the very least need an unwashed AC/DC T to even consider getting your hands muck.  Compiling and configuring it is not for the feint hearted.
  2. AsteriskNow is an attempt to make Asterisk less hairy.  Its a CentOS distribution compiled and configured for you as an ISO.  All you have to do is find a spare machine and install it.  While this makes installing Asterisk easier, it doesn’t really solve the ugly Dial plan syntax.  If however your Christmas card lists consists mainly of people you’ve only met on IRC, this might be an option for you.
  3. Adhearsion is a Ruby library that sits on top of Asterisk and does got quiet a way to solving the ugly dialplan problem.  The syntax is clean and it works by running as its own daemon which accepts requests from Asterisk over a TCP/IP socket.  When a call comes in, Asterisk connects to your Adhearsion server and receives text based commands instructing it what to do with the call.  You can answer/transfer/play an audio file/hangup etc and it looks pretty clean.  You are still stuck with configuring an Asterisk box however but they have mitigated this somewhat by providing a sandbox environment that allows you to run your Adhearsion clients directly against a Asterisk client in the cloud.
  4. Voxilla have created a pretty comprehensive guide to installing Asterisk as an EC2 instance.  Again, the geek level is set to seriously injure if not kill but they also provide a handy EC2 AMI which you can install yourself with some minor tweaking to the security group settings.
  5. Voxeo/CallFire/Twilio/Ribbit/Dial2Do are a breed of companies that have recognised the right royal pain in the arse it is to get your telecoms infrastructure configured.  They are all providing flavours of cloud based telecoms infrastructure.  Most of these services are not yet available in Europe although you can get around this to a certain extent by renting European numbers and having them forward to the US numbers provided.  Voxeo does provide support in Europe for around €2.5k of setup and €500 a month in hosting charges.  This isn’t really what the web folk are used to.  I pay you a stack of cash so I can lock myself into your platform?  Well, maybe lock is a little harsh.  They do operate using an pretty nasty VoiceXML and CCxml standard in that regard they are somewhat portable, so long as you are willing to say goodbye to your €2.5k setup.  Twilio and Callfire seem to be doing a great job however in the states and it can’t be long before they roll out the same service in Europe which should impact these setup fees.  At the moment they don’t charge anything for setup in the US and seem to be making their money on the call charges.
  6. Tropo.com proved to be the easiest solution I have found for my purposes.  Tropo is a collaboration between the guys behind Adhearsion and Voxeo.  Using their servers, you are actually using that rather pricey Voxeo backbone but for free.  Of course you don’t get an SLA and the whole thing is in beta, but that doesn’t normally put off web-folk.  They provide a range of simple libraries from ruby to groovy to javascript and a few in between.  The service works by reading your dialplan from either their hosted environment or a file you host yourself on the web.   All they are doing is wrapping the still rather clunky command structure underneath but there are some really impressive features available out of the box including transcription and recording.  All in all, it took me about 3 days to intregrate and get our service up and running with them.

So that is it.  The long and the short of it is – you probably want to use Tropo to have a play around with.  While the docs weren’t stunning, they were useable and they managed to make something that should be easy, well easy, where others seem to fall flat.

Responses

  1. Brian Armstrong says:

    December 1st, 2009 at 4:04 am (#)

    Interesting write up! I wasn’t aware of these services coming out to try and make it easier. I haven’t had a web app yet that needed it, but I could envision it someday. Sounds like a great feature that would help you guys stand out.

  2. thegoose says:

    December 1st, 2009 at 10:32 am (#)

    Hi Brian

    They are actually very cool Tropo will send you .wav files of recordings or even transcribe the content of a message and post that back to you as text. They weight the confidence in the transcription also so you can make a judgement on how accurate the transcription was. It’d be pretty easy to set up your own voicemail transcription service using the API.

    James

  3. Troy Davis says:

    March 13th, 2010 at 9:50 pm (#)

    James, if you’re looking for a place to use Adhearsion without knowing anything about Asterisk, our service Cloudvox is worth checking out: http://help.cloudvox.com/faqs/getting-started/setup-for-ruby-adhearsion

    This doesn’t tie you to a proprietary format, something that the telecom industry has decades of experience trying to do. It’s like Heroku for phone calls.

    Plain HTTP/JSON is also available: http://help.cloudvox.com/faqs/getting-started/http-api

    We have some folks who have live JSON apps hosted on gist.github.com. It’s pretty neat.

  4. thegoose says:

    March 13th, 2010 at 9:59 pm (#)

    Hey Troy -

    Thanks for those resources. I have a bit of time to start looking at this again. I managed to get an IVR setup with realitive ease on tropo but ran into some limitations on tracking the incoming call numbers It wasn’t anything to do with tropo – just the SIP provider I was using.

    James

Leave a Response