views:

224

answers:

3

This is a dumb sounding question, but I've tried to find an answer digging through FAQs and forums, and came up short.

Just like you can use tel: in hyperlinks for mobile browsers, you can set a link to start a call with Skype's software with:

<a href="skype:15555555">Call This Number</a>

Is there any way to do anything similar with Google Voice? Or, as of recent, Gmail? Or the Google/voice/chat/whatever plugin? It seems they're really trying to solder a lot of their projects together, and I understand there's nothing like a desktop software package, until/unless they decide to overhaul their 'Google Talk' to support VoIP calling.

But, surely, with all of this stuff going live, there's a way to just link a phone number manually. No little API? Can't send POST/GET somewhere?

+1  A: 

Simulating the HTTP POST requests needed to initate Google Voice calls and SMS is pretty easy and there are a few tools/utilities around that do it. A couple of C# classes I wrote to do exactly that job are GoogleVoiceCall and GoogleVoiceSMS.

To do the equivalent from a HTML page the best bet would be to use javascript/jquery. The sample C# classes should show be easy enough to follow as to the mechanism and which parameters need to be sent in the POST requests.

sipwiz
A: 

The best way would be to make a request the same way Google Voice does when you click "Connect" on the "Place a call" box. I don't think you can use Gmail, since it requires a plugin to make calls.

The hard part is figuring out exactly how the form works, since there is no submit button and the form does not have an action parameter (the page it submits to) set. They've done an excellent job hiding the inner works in javascript files. The form itself is not even in the source code, so you'll probably need to view the DOM; I suggest you use the Firebug extension in Firefox to take a look at it. I'm sorry I couldn't be of more help, but I don't have the time to sift through Google's code.

Alternatively, you could use the WebBrowser control in .NET to fill out the textboxes via code and simulate a click on the Connect button (either through the WebBrowser control or by taking control of the mouse cursor). It's dirty, as it uses Internet Explorer, but it might be a lot easier. You'll still need the Firebug extension to get the names of the textboxes, though. Once installed, just right click on the textbox and select "Inspect Element".

Hope this helps!

- Grant

grantman16
+2  A: 

Here's an API for python: http://code.google.com/p/pygooglevoice/

Java: http://code.google.com/p/google-voice-java/

C#/.NET: http://sourceforge.net/projects/gvoicedotnet/

I think there's an API in Ruby also. You basically need to login to your google voice and extract the "API KEY", then use the API.

fseto