Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.6: Dial numbers in Google Voice using a Service Internet
I created a Service to send a selected phone number to Google Voice to be dialed. To do this, I actually use two files: The service, which should be installed in your user's Library/Services folder, and the google-voice-dialer php script, which does most of the heavy lifting; install that wherever.

Download the zip file (78KB), expand it and open the resulting folder, move the Service to your user's Services folder and the php script to wherever you'd like it to reside. Before using this Service, you need to open it in Automator for some editing. Within the AppleScript code in the Run AppleScript Action on the right, scroll through the code and change the following properties: usrnm, psswrd, phnm, myFilePath, and myFileName. Save those changes, and you should be good to go.

To use, select a phone number in any Cocoa application (Safari, Mail, Address Book, etc), Control-click on the selection, then go to Services » gvDialer, and Google Voice will dial the number.

[robg adds: I haven't tested this one.]
    •    
  • Currently 1.64 / 5
  You rated: 4 / 5 (14 votes cast)
 
[11,887 views]  

10.6: Dial numbers in Google Voice using a Service | 14 comments | Create New Account
Click here to return to the '10.6: Dial numbers in Google Voice using a Service' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Dial numbers in Google Voice using a Service
Authored by: efc on Oct 09, '09 08:14:34AM

This hint works, but it could use a bit more specificity in the instructions.

The "phnm" phone number should be the number you want Google Voice to use to connect your half of the phone call, NOT your GV number itself.

The "myFilePath" directory name should end in a "/" even though the example in the instructions does not.

Nice script! Thanks!



[ Reply to This | # ]
10.6: Dial numbers in Google Voice using a Service
Authored by: Disconnect on Oct 09, '09 09:06:21AM

Also, it submits your google info over http instead of https - a huge no-no.

Simply changing it to https in the php works fine.



[ Reply to This | # ]
10.6: Dial numbers in Google Voice using a Service
Authored by: techman09 on Oct 09, '09 11:57:19AM

There is also a return sh1 that does not belong in the automater script



[ Reply to This | # ]
10.6: Dial numbers in Google Voice using a Service
Authored by: techman09 on Oct 09, '09 12:03:06PM

Please disregard, I must have un-comented the line trying to get the script to work.



[ Reply to This | # ]
10.6: Dial numbers in Google Voice using a Service
Authored by: geordie on Oct 09, '09 11:58:33AM
I do something similar only I use the googlevoice.pl ( http://www.0xdecafbad.com/?p=87 ) perl script instead of php. I have 3 automator services, one for call from office, one for call from cell, and one for call from home. For my friend who wanted the same thing on 10.5, I used ThisService from http://wafflesoftware.net/thisservice/ with the same script I prefer to retrieve my account and password from my keychain instead of storing it directly in the script. It wouldn't be that hard to convert the following perl snippet to php if you wanted to...
my $use_keychain = 1;

if ($use_keychain)
{
    my $svce = "Google Services";
    open (KEYCHAINITEM, "security 2>&1 find-generic-password -g -s '$svce'|");
    while (<KEYCHAINITEM>)
    {
        /"acct"<blob>="(.*)"/ and  $username = $1;
        /^password: "(.*)"$/  and  $password = $1;
    }
}
I also suggest moving all of the processing into the script my Automator service only has one line: /Applications/bin/googlevoice.pl call "$1" xxx-xxx-xxx (the number I want to call from) Finally the service you provided is set to apply to all text. Automator services have the ability to apply to just certain kinds of text and telephone numbers is one of those kinds. I suggest using that so that the contextual menu item only shows when a phone number is selected.

[ Reply to This | # ]
10.6: Dial numbers in Google Voice using a Service
Authored by: gregraven on Oct 09, '09 02:35:37PM

I just use the GV Connect widget. It even integrates with AddressBook for finding phone numbers.

---
--
Greg Raven
Apple Valley, CA



[ Reply to This | # ]
10.6: Dial numbers in Google Voice using a Service
Authored by: elspub on Oct 10, '09 03:48:28PM
I sent this hint in a while back and have improved things since the original. You no longer need to to fiddle with the script or anything complicated to install. Just put it in your Home/Library/Services folder. The first time you run it it will create a keychain entry with your login/password and automatically install the php script to your services folder. It will also now notify you via Growl or the OS that the call is being dialed.
There's also an SMS service that takes a number and pops up a dialog box allowing you to enter the text message.
Get it here: http://tr.im/BmR3
Get my other services here: http://elasticthreads.tumblr.com/

[ Reply to This | # ]
10.6: Dial numbers in Google Voice using a Service
Authored by: elspub on Oct 10, '09 04:01:12PM
I've also made Quicksilver actions that do the same thing. If you're a QS user it's even better; you can type address book, right arrow, find your contact, right arrow, select the phone number, tab over, and then type till the action comes up.

Install them to Home/Library/Application Support/Actions
dialing and SMS actions are here: http://tr.im/BmU4
the php script is included as a reference, but you can ignore it. The actions will install it automatically the first time you use it.

[ Reply to This | # ]
10.6: Dial numbers in Google Voice using a Service
Authored by: elspub on Oct 10, '09 04:02:56PM
've also made Quicksilver actions that do the same thing. If you're a QS user it's even better; you can type address book, right arrow, find your contact, right arrow, select the phone number, tab over, and then type till the action comes up.

Install them to Home/Library/Application Support/Actions
dialing and SMS actions are here: http://tr.im/BmU4
the php script is included as a reference, but you can ignore it. The actions will install it automatically the first time you use it.

[ Reply to This | # ]
Can I make 2 services for different numbers?
Authored by: eepmatt on Oct 13, '09 07:05:17AM

This is a GREAT little setup... Is it possible to create two different dialer services, one that places the google voice call to my desk phone and one that places it to my cell?



[ Reply to This | # ]
Can I make 2 services for different numbers?
Authored by: elspub on Oct 13, '09 01:11:44PM

Yes. You can use multiple versions of the service. You just need to make 1 small change to the service per version.
Double click on the service, it should open with Automator. You'll see the applescript that defines the service.
hit command-f to activate a text search and type into the search field "Google Voice Dialer". Now hit enter. You should see that phrase highlighted in this sentence:

"set {usrnm, psswrd, phnm} to {account, password, comment} of (first key whose name is "Google Voice Dialer") of current keychain"

If you downloaded an earlier version of the service it might say "Google Voice Dialer for Quicksilver" instead of just "Google Voice Dialer". Either way You need to change the name of the key from "Google Voice Dialer" to whatever, "Google Voice at Home" or "Google Voice at Office".
There's another line in the script 12 lines further down:

"make new generic key at current keychain with properties {name:"Google Voice Dialer", account:usrnm, password:psswrd, comment:(phnm as text)} "

Make sure you change the "Google Voice Dialer" there as well.

And you should be good to go. Obviously, I'd rename the service itself to gvDialerOffice or whatever. As long as each version of the service runs off its own keychain entry you can have as many as you want. The SMS service, though it requests a gv phone number, always sends a text from your Google Voice account phone. So you only need one of those.



[ Reply to This | # ]
Can I make 2 services for different numbers?
Authored by: runithome on Jan 25, '10 06:57:26AM

I tried running this as two different services but keep getting an Applescript Workflow error after trying to use the dialer script for my 2nd number. I renamed the scripts HOME and MOBILE and renamed the text in the script per your instructions above. The first instance works fine, but then the next one stops after entering the call back number. I am wondering if the Applescript is trying to create a keychain and fails when it finds one already with the same name?

Any ideas or tips?

This is wonderful script. Thanks for your time and effort.

Edited on Jan 25, '10 06:59:01AM by runithome



[ Reply to This | # ]
Can I make 2 services for different numbers?
Authored by: SavinHillGuy on Apr 10, '10 11:58:51AM

I got the same error. So I went into my keychain and manually created a new entry for the second phone number, and now they both work like a charm!



[ Reply to This | # ]
10.6: Dial numbers in Google Voice using Phone Amego
Authored by: cerniuk on Apr 30, '10 08:41:00AM

Better to use utility like Phone Amego. Puts it into your popup menu in the address book (click on "work" or "home" and you can sms or dial direct from desktop. Also provides a menu at the top of the screen. uses HTTPS.

Would really like an AppleScript for the address book,, short and sweet, to do this but nothing clean exists. Clean meaning needs an interface to setup, uses https to dial, does not require php or other script language to just drive an http session from AppleScript...



[ Reply to This | # ]