views:

2068

answers:

11

I have a specific scenario in mind, but I will ask this generally:

Is there a way to make my mobile phone trigger an action on my computer? I am thinking that with a smart phone it must be possible to link the phone and the pc with bluetooth, and have some sort of small program running on my computer that will listen for incoming phonecalls on the phone. When someone calls me, i want my mobile to simply submit the callers phonenumber to the pc, and then the pc will do its stuff from there. Then, I want to handle the call on the mobile phone as usual.

Edit: Updated this question! I am currently using the HTC Hero, and hopefully the Android SDK will make this more easy to accomplish.

My specific scenario was: When my phone (Nokia N82) calls, i want to submit the callers phonenumber to a search applet/application, that will query Microsoft Dynamics CRM and see if a contact person or a company has that phonenumber, and if so, show the corresponding person or companys info on my screen. My preferred development platform is .Net

A: 

I know you certainly can't do this on an iphone.

Regarding a nokia n82, I'm not sure if symbian (that's what they use isn't it?) provides developer hooks for things like phone calls, but I wouldn't be at all surprised if it didn't. Phone calls fall in the category of "we really really don't want third parties to screw this up, so it's off limits"

Orion Edwards
Mono has been ported to the iPhone, so it's at least theoretically possible that something could work.
MusiGenesis
I don't think it's to do with mono at all, but rather the API's which get exposed by the underlying OS on the phone. If apple provided a "the phone rang" notification, then you could do it in objc/mono/etc... If they don't (and I'm pretty sure this is the case) you're outta luck
Orion Edwards
A: 

This would be very easy to do in .NET Compact Framework on a Windows Mobile device. You could have an app running on the device and triggered by a phone call write a file to an ActiveSync-connected PC using RAPI, and then have a file listener app on the PC triggered whenever a file is written to a specific folder by the device.

Unfortunately the N82 runs the Symbian OS, so I got nothing. Just wanted to brag about my favorite device OS before we're all crushed by the iPhone.

MusiGenesis
why not just use the regular TCP/IP networking? if you had to use an Activesynce connected model, I think you could build something more elegant 'talking' via RAPI than writing to files (or use the TCP/IP network setup between desktop and PocketPC to talk).
Steven Adams
Normally I would do PDA-to-ASP.NET-webservice, but the question implied (to me anyway) a casual user who might not have or want IIS running. Also, I just felt like saying "RAPI" today (it's actually a royal PITA to work with, but his N82 is safe). :)
MusiGenesis
+1  A: 

I would say that this can be done for that phone, but in C++. There are Symbian applications for blocking incoming calls, which means that you will have access on caller number. And bluetooth access should not be a problem, because this phone has access to it even in J2ME.

/JaanusSiim

JaanusSiim
+1  A: 

'depends'

you'd need to check the SDK for the phones you're targetting - but Symbian and certainly WindowsCE phones can do that (NFI about the iPhone).

Calling into Dynamics would be easy from a webservice, you could expose that either internally or externally and thus use either WiFi in the area (be it your own corporate network, or a hotspot) or data over the mobile phone network.

From days working in Microsoft CRM (hellish days of v 1.*) there were mods to do what you talk about using either Skype or regular landline phones then, I'm sure writing stuff for it has improved since when it was craptacular.

Steven Adams
A: 

A strong indicator that what i want to do is technically feasible is that I can link the cellphone to my car GPS navigator system by bluetooth, and see the phonenumber of any incoming calls on the car navigation display.

I was hoping this was going to be not so difficult to accomplish, but my hopes are waning.

Edit: Been searching further, but still no luck. I'm going to let this question stay open until I can find any more information on the subject,

Bjørn
+3  A: 

The N82 runs Symbian, so you could develop an application that used the CTelephony (C++) class to detect the phone status and do whatever you want with it. You have an example here

http://www.symbian.com/developer/techlib/v9.1docs/doc_source/guide/Telephony-subsystem-guide/N1013A/answer.html

Alejandro Mezcua
+6  A: 

The way your sat-nav interfaces with your phone is by creating a bluetooth serial connection with your phone's Dial-Up modem. You can see which COM port that corresponds to in your Control Panel's Bluetooth options.

Once connected, regular AT commands can be sent and received with the handset -- for Nokias these are documented (along with a full guide to the process) here.

You should wait for the "RING" notification of an incoming call, then immediately issue the command "AT+CLCC" (List Current Calls). On my N78 this results in the following

+CLCC: 1,1,4,0,0,"07xxxxxxxxx",129

This should be all the information you require to trigger any desired action on the PC.

Edit: that particular link does not actually mention AT+CLCC for some reason. For a full set of commands (including those to query the phone book, and even view incoming SMSs on some handsets) try this document.

funkybro
A: 

How about thinking outside of the box?

If you can route calls via switchboards (Asterisk, GrandCentral or anything else that supports ring groups), then you could actually send the call simultaneously to your phone and to a computer listening to SIP events.

This is a much more general technique and does require some special setup, but it then becomes phone independent and can be much more flexible.

A: 

Shall we do it using PHP?

Same situation for me.

I need to trigger a browser with phone number as get method.

So i may do my programs in php using that get method phone number.

Any one help ?

A: 

Salling Clicker works on the Mac to do just that. I think there is a PC version.

It's a cool tool either way!!!

Edit: Actually, the way your car's handsfree kit and GPS and all that show the number and caller on an incoming call is by implementing the Bluetooth handsfree protocol. If you make the PC look like a Bluetooth car kit (you'll probably have to write the protocol yourself) you could do it.

Failing that, you could write an app for the phone which detects the phone state and sends messages via bluetooth to the PC and then write another custom app for the PC which handles those events. Personally I'd just download the clicker and run with it :)

Edit2: I wasn't thinking of the clicker at all, but it should do what you want. There is a tool called BluePhone for the Mac which does what you want. I'm not sure there's a PC version of it, but there is very likely a PC equivalent if you poke about on the interwebs.

Adam Hawes
A: 

It is possible if you can access the Bluetooth HandsFree profile APIs on your PC. If the mobile is HF connected, it will send AT+CLIP packet with the phone number. You will be notified with the incoming phone number. The rest is easy. But your mobile should support CLIP. I am pretty sure all modern mobiles will do that.

If you can write an application which access the Microsoft bluetooth stack this would be easy.

suraj