I'm trying to sort out our telephone situation at home. As some of you may know, I live in a complete mobile deadspot. We have two people in the house who use Vodafone, one who uses O2 (with an iPhone) and another who uses Orange (me). None of these networks work properly where we are. I've heard reports that someone with T-Mobile gets good service, but haven't confirmed them. We have a BT landline, of course, and it's got ADSL. 
What we really want is a way to have it so that we can each have a personal number that redirects to mobile or landline depending on the location of the person. I've looked into call forwarding from the mobiles to a Skype number, then having a Skype phone setup to answer incoming calls. This is okay as far as it goes: but there are problems. We tried it first with our iPhone-on-O2 user. The iPhone has a pretty neat call forwarding interface. All one has to do is to go into the Settings and then slide an On/Off switch. Then it sends the request over the mobile network to O2. It works, but if you forget to do it before you get home, you are stuffed. Anything that requires daily user intervention just isn't practical. 
Instead, here is how I'd prefer it: we'd set up a variety of ways of detecting user presence within the house - I'm sure I can figure out some ways to do this (I'm thinking of login detection, device detection over wifi, IP usage pattern detection, Bluetooth device detection, and maybe even RFID detection using Arduino - perhaps attaching an Arduino RFID key sensor into a dish, and then people just drop their keyrings with a little RFID tag on them into the dish in order to signal that they are home). Then we'd have a server which would basically inspect the detected location and if it's at home, trigger call forwarding to the home number (the landline) for that user number. 
Also, we could just have a 'home number' which would be distinct from the user numbers, and would follow a ruleset to connect to (a) whoever is at home, if they are at home, or (b) mobile or office numbers following a set of rules, and (c) if nobody is at home, take a message and deliver that message to various people as required. 
Now, what I want to know is if this is possible. If it is, a rough estimate of what I'd have to do, how much it would cost, and how many wacky new tools I have to familiarise myself with. I'd also like to know if there are any strange drawbacks I'd have to worry about. I'm thinking that all we'd have to do would be to install Asterisk on my Linux box, put in a PSTN PCI card in that box, buy some SIP numbers from a SIP provider, write some code, set up whatever location magic I want to have, install softphones on the various computers around the house (I know Ubuntu comes with a pretty good SIP softphone pre-installed, the name of which I can't recall; any suggestions for Windows, OS X and iPhone/iPod touch?) and buy some hardware SIP phones to replace our shitty DECT phones. 
As for coding the back-end: I've looked at the Asterisk settings language and it looks rather strange and complex. I see there are some language bindings available for Asterisk including RAGI for Ruby and various bindings for Python. 
Might there be an easier way of doing this? It'd be really nifty if the mobile companies were to make a call forwarding API so one could set call forwarding via HTTP. Most of the mobile providers have online account administration (I know Orange and O2 do), so they've already handed out usernames and passwords to their users. It wouldn't be that difficult to have an API so that one could set call forwarding programatically. I've also looked at Tring's API, but the documentation is less than optimal, and I'm not even sure it would do what I want. I even looked at Skype's API, but it's a client-side API not one which lets you change data on Skype's servers about a user. 
This is all quite boring plumbing. Any advice gratefully accepted. 
