Last year I posted a PHP script that lets you dial phone numbers using Grand Central. I updated it this morning to support Google Voice as well. The syntax is the same
$gv = new GoogleVoice('[email protected]', 'password');
You can grab the code from my google-voice-dialer project on GitHub.