UPDATE: Aug-20-2009 I added the ability to use a ~/.netrc file (if Net::Netrc is installed, if its not it will not use that I also fixed the meta following problem. Fixed a couple other bugs – like the username/pass incorrect not reporting that error properly. You should upgrade to the new version now.
UPDATE: Sept-10-2009 I added the ability to send calls/sms messages to named contacts. It will use your google voice contact data, so if you want to use this feature you have to create a contact in google voice and use the nickname that you gave them. I changed the way arguments are passed, run the program for usage information. If you were already using this you will have to adjust how you call the program.
I wrote a perl script that lets you interface with your Google Voice account. You can place a call, cancel a call, and send a SMS message easily. This is ideal for people that want to send SMS messages for system alerts, or for other reasons.
In order to use this script you must first download it. Then edit the username, password and default number variables near the top of the script. Install any missing perl modules based on whatever distribution you have, if you run the script it will tell you what it is missing. Invalid args or no args will give you a help screen.
To send an SMS message to 12345678
./googlevoice.pl sms 12345678 this is a test sms message
To place a call to 12345678 (optionally set the ‘forwarding number’)
./googlevoice.pl call 12345678
./googlevoice.pl call 12345678 90123456
To cancel a call placed through the web (or this script)
In the future I may access the HTTP based inbox so that you can periodically check for messages, and react to triggers on them. In order to do this you would access the following URLs. If anyone is bored I will gladly accept patches to my script to add this functionality.
Starred Calls XML:
All Calls XML:
Recorded Calls XML:
Placed Calls XML:
Received Calls XML:
Missed Calls XML: