I am on the phone all the time. I'm calling and getting calls all day. I was running into a situation where I was missing important inbound calls because I had just picked up the phone. So I decided to write a mashup that would notify me of inbound calls. My first crack at this was using Twitter. As an avid Twitter user, I always have it open. And the Twitter API is VERY easy to use. I eventually moved on to use Google Talk for inbound notification, just because it was slightly faster and more reliable (although the Fail Whale has been absent in recent weeks ).
Within my IBP account I created a stub Survo that does a post to my web page, passing along the Caller ID of the caller. As soon as that post is done, it transfers the call to my existing Virtual Receptionist. In order to send a direct (private) Tweet, you need a second Twitter account. Here is the code that sends the Tweet:
$ch = curl_init(); $tweet= "You have a new message. CallerID:".$callerid; $mydata = array('user' => 'RECIPIENT', 'text' => $tweet); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_URL,"http://twitter.com/direct_messages/new.xml"); curl_setopt($ch, CURLOPT_USERPWD, "USER:PASSWORD"); curl_setopt($ch, CURLOPT_POSTFIELDS, $mydata);
curl_exec ($ch); curl_close ($ch);
Where RECIPIENT = The Twitter account that is receiving the Tweet; USER=the Twitter account that is sending the tweet. Other than that, all you have to do is get the Caller ID from the URL, and you're set.