VoIP, SIP, IAX, Asterisk and Bluetooth Presence
Posted on 30. Aug, 2005 in SciTech
I've been playing with the Linux open sourced Asterisk PBX software for the past couple of weeks, it's really quite an impressive package. I've got Asterisk linked with a Sipura SPA-3000. The Sipura provides the PSTN inbound and outbound trunk to the Asterisk (via SIP) and also acts as an ATA so I can use the Panasonic cordless as an IP phone. The Asterisk handles SIP and IAX registrations, call routing and voice mail. The great thing about Asterisk is that any combination of inbound and outbound providers, dial rules, hard and soft phone extensions, call forwarding, ivr menu prompts and more can be easily defined. The initial configuration is daunting at first, but once you get the hang of the key files sip.conf, iax.conf and extensions.conf the possibilities are endless.
I have Sipgate, Sipphone, FWD, Gossiptel and Oztell SIP peers and users defined, and a VoIPtalk IAX2 peer. I have three free PSTN direct-in-dials in the UK, and a Sydney direct-in-dial 02 number from Oztell for less that AUD$5 per month. The nice thing is that any inbound call rings the cordless phone in our flat in London rather than relying on a PC soft phone. The local Sydney number is a nice touch too, allowing friends and family to ring us from home for the cost of a local call and it rings directly through to the flat in London.
Using the extensions.conf you can define any number of dialing routes and codes. For example PSTN calls to Australia are transparently routed to Sipgate, where as local London and mobile calls switch to the PSTN trunk on the Sipura and go out via our normal BT line.
Inbound calls can ring on multiple extensions and each inbound call can be handled in a different way. Another extremely cool feature is creating interactive voice response applications. I've set it up so if any inbound IP or PSTN call is not answered you're taken to a IVR menu where you can press 1 or 2 to divert to one of our mobiles or press 3 to leave a voice mail. The diversion to mobile is routed over IAX2 rather than SIP to VoIPtalk, which is much more reliable for quickly and reliably initiating calls over NAT. The diversion to mobile is the same whether the call was inbound from VoIP or PSTN. The inbuilt voice mail server is quite good too.
Possibly the coolest feature though is linking Asterisk to Bluetooth presence! I have a cron script that grep's for the MAC address of my mobile phone on Bluetooth every 5 minutes. If I'm home, through my Linux box detecting my Bluetooth mobile, any incoming VoIP or PSTN calls ring the home phone. If I'm out, through the Linux box being not able to detect my Bluetooth mobile, it will forward the call via VoIPtalk and ring my mobile. All this logic takes place in the extensions.conf where an incoming call runs initially runs an AGI script (Bash), which then returns a variable anthonyhome=yes or anthonyhome=no and then the appropriate diversions take place, all in about 5 seconds.
Asterisk is really quite amazing, and purrs on a low spec 733MHz Celeron sharing resources with several other servers and a couple of X sessions running on the same box. I can't recommend Asterisk and a Sipura box more highly as an excellent geek VoIP project.
http://www.asterisk.org/...




wbix
24. Nov, 2005
Title: .
one of the guys here are also working wirg asterix and finding it awesome for the pbx… readng on… seems like you’re having fun with it as well
fablamenas
29. Jun, 2006
the bluetooth part sounds very good to me… can your share your script that update your conf.
thanx