Asterisk – the Future of Telephony
Finally, after over a year of dabbling, I have had success creating my own Private Branch Exchange (PBX) at home! A what? It’s a telephone system not unlike you would find at a medium to large company. Yes, it’s got extensions, it’s got voicemail boxes, it’s got (potentially) least cost routing and it’s got interactive menus! Press 1 to continue reading this blog or press 2 to commit ritual suicide! Yes – callers to my home phone number will soon be in for phone menu hell!
Asterisk is the key to this new little project. Those who know me will not be surprised to hear this is an Open Source application that adheres to Open Standards and runs under Linux. It really is a remarkable piece of software kit and is, I believe, fairly dramatically changing the face of corporate telephony systems. It’s what is termed a ‘disruptive technology‘ – a technology that is destroying the status quo in it’s niche and really leveling the playing field for everyone, especially newcomers. Until very recently your only option for an Interactive Voice Response (IVR) system, or even a semi competent office PBX, would be an expensive closed system – tens of thousands of Pounds plus annual support contracts. Now practically anyone can create such a system for virtually nothing. All you need is a computer running Linux plus an Internet and/or telephone network connection.
In my case I bought a slightly exotic telephone adapter called a Sipura SPA-3000. I had hell getting it to talk to Asterisk. This wasn’t Asterisk’s fault, nor that of the Sipura. The real problem is that the Sipura was primarily designed to work alone (or rather not with a complex PBX like Asterisk). Voice over IP (VoIP), IP being Internet Protocol, is a phrase you will hear more of in the future (and may very well have come across already). You’ve heard of Skype, I expect. That’s a form of VoIP. Skype (rhymes with type NOT typie) has created its own proprietary protocol and is very closed source and rightly criticised for it – you cannot interoperate with it, you cannot bug fix it, you cannot port it to other platforms (Windows, Mac OS X and Linux (though only x86 architecture) are supported) and, possibly most importantly these days, you cannot inspect the code to see what it might be doing to your system. All in all, Skype should be avoided for both trust and conscience reasons. But I digress. Asterisk supports the open VoIP standards that increasingly everyone except Skype uses, namely SIP, IAX2 and H.323. My Sipura, as the names suggests, supports the most popular of those protocols – SIP. It has a socket for a phone line (in my case going to a Telewest/Virgin Media outlet), a telephone handset socket (going to my DECT basestation) and a normal Ethernet network port, plus a power connector. It presents the two phone type sockets as SIP devices, i.e. they can connect to a SIP service such as Sipgate, VoIP.co.uk, VoXaLot, etc. In other words you can use a Sipura to give your normal phone access to, potentially, free phones calls over the Internet. The Sipura can be configured to route your outbound calls either over the Internet or through the normal phone network depending on the number you are trying to call. It’s clever stuff and only the tip of the iceberg to what this device can do. Sadly I wanted none of that, I just wanted a plain mindless SIP device that will connect to my Asterisk box. That was the tricky bit. Nonetheless I got there, eventually! I should say a big thank you to Fay of the East Grinstead Linux Users Group and the chaps at Runtime Consultancy Services – seeing Asterisk in action really brought the concepts home, I was really floundering before that!
I should also point out trixbox, which is basically a preconfigured Linux installation (based on the great CentOS – a Linux distribution I use all the time at work, in fact I’m using right now over this lunchtime) with various Asterisk packages already added, ready to go. There is a VMware image there along with a bootable CD image for installation onto a real machine. I’m using the VMware virtual machine image with it in mind to build up my Asterisk configuration there and then copy the config files across to my existing home server (it has a max of 512MB of RAM, so running VMware on that headless machine is impractical but it should be able to run the Asterisk packages natively).
In addition I should say that there are far easier ways to interface Asterisk to the normal phone network. There are several PCI cards available, most notably from Digium (the people who first developed and open sourced Asterisk – they realised they could make more money selling commodity hardware by opening up Asterisk than they’d ever make by selling bespoke PBX systems). You can get really cheap cards for about £30 on eBay. I wanted something a bit more reliable. Digium’s decent cards were coming out at about £160 with one FXO (Foreign Exchange Office – i.e. BT, Telewest, Bell, etc.) and one FXS (Foreign Exchange Subscriber – i.e. phone handset) socket. The Sipura had excellent reviews, didn’t take up a PCI slot (my main server only accepts half height cards) and was somewhat cheaper at about £90. A Digium card would, however, just have worked out of the box!
That was all a load of nonsense to most people, I am sure. Basically, since the breakthrough late last night of both making and receiving Telewest calls via Asterisk (with the Sipura inbetween) I am buzzing with the opportunities to tinker around with Asterisk. All that is really left is getting CallerID to come through from the Sipura to Asterisk. Based on the CallerID I will either let the call through directly (falling back to either voicemail (which will be immediately emailed to me) or, possibly, redirected to my office or mobile when away (using traditional VoIP as clearly my Telewest line will be busy)) or pushing the caller into some form of IVR menu trap – I’ll let those who I deem worthy know the secret way to get out of it! A worrying Text2Speech message may be included to scare off telesales people… And so the fun begins!
hmm…
Um..
ah yes…..
ahem..
Huh???????????????????
ah, right..phone thingy like Stephan Hawking,………gotcha
ah, right..phone thingy like Stephan Hawking,………gotcha
wrote Lord Macfadyan
“Now Spell Color………” as his speech synthesiser would say.
I always remember a skit on Virgin FM when it used to be a good radio station.Some of you my remember that Stephen Hawking lent a few lines of his spoken words to the song ‘Keep Talking….’ by Pink Floyd off the album ‘The Division Bell’.The sketch involved Steven Hawking saying how important it is for us to keep talking,with the aforementioned song playing in the background, but someone had sabotaged his speech processor,which gradually started speeding up until he was gabbling and squawking ‘Exterminate! Exterminate! Exterminate!’