Showing posts with label telephony. Show all posts
Showing posts with label telephony. Show all posts

Saturday, August 22, 2009

Google Voice Automation

We've been using Google Voice since it was Grand Central. The one number for life really is a great convenience. I like having it ring all the phones I have when I get a call - so if my cell coverage is weak or I'm running out of minutes, I can just answer a landline. Realistically though, I only want it to ring all the phones that I can answer based on where I am. Recently, I found pygooglevoice, which exposes the Google Voice API to Python. This is exactly what I need - now I can write a script to choose which phones to forward calls to - based on where I am. No sense on forwarding calls there if nobody's there. Also, if my wife's at home but I'm at work, there's no need to bother her by having my calls forwarded home. With our Bluetracker software, the HA system can tell if we're at one of our homes and execute a Python script to forward to the appropriate phones.

A sample script follows, based heavily on the gvoice script included in pygooglevoice:

import sys
from atexit import register
from optparse import OptionParser
from googlevoice import Voice,util
from googlevoice.util import LoginError,input,print_

parser = OptionParser(usage='''gvoice [-e -p ] commands
Where commands are

home
work
home2
out''')
parser.add_option("-e", "--email", dest="email", default=None,
help="Google Voice Account Email")
parser.add_option("-p", "--password", dest='passwd', default=None,
help='Your account password (prompted if blank)')
options, args = parser.parse_args()

def login(email=options.email, passwd=options.passwd):
global voice
try:
voice.login(options.email,options.passwd)
except LoginError:
if input('Login failed. Retry?[Y/n] ').lower() in ('', 'y'):
login(None, None)
else:
sys.exit(0)

try:
action,args = args[0],args[1:]
except IndexError:
print "you need to give a command"
sys.exit(2)

voice = Voice()
login()

register(voice.logout)

if action == "home":
voice.phones[0].disable() # work
voice.phones[1].enable() # mobile
voice.phones[2].enable() # home
voice.phones[3].disable() # home 2
elif action == "work":
voice.phones[0].enable()
voice.phones[1].disable()
voice.phones[2].enable()
voice.phones[3].disable()
elif action == "home2":
voice.phones[0].disable()
voice.phones[1].disable()
voice.phones[2].enable()
voice.phones[3].enable()
elif action == "out":
voice.phones[0].disable()
voice.phones[1].disable()
voice.phones[2].enable()
voice.phones[3].disable()


You give it three options - your email address, your password and the command (in this case home, home2, work and out):

gvforward.py -e ABCdefGHI9876543210@gmail.com -p password work

Thursday, May 21, 2009

Taking the Plunge on Magic Jack

I saw Radio Shack was having a one day sale yesterday and they had the Magic Jack for $29.99 instead of the regular $39.99. Having recently cut the landline, I decided to give it a try (in spite of the horror stories). $29.99 covers the device and the first year of service, with each additional year costing $20 ($60 for 5 years in advance). For $29.99, I could pay for only 2 months of my AT&T landline service - and that was the bare minimum plan. (Half of the $15 monthly bill was the service and the other half was taxes!)

Installation was a breeze. I installed it on the Sage server, which runs Server 2003. It seems to work OK for the most part. However, I've run into a problem a couple times where I call someone and they pick up, but I never heard the phone ring nor them talking. I hang up and call back and it gets connected OK. Sound quality seems fine on both ends.

One annoyance is the MJ software is always foregrounding itself when you make a call or you get a call. I set up an EventGhost macro to automatically minimize the MJ window whenever it's activated:



Since it now comes with caller ID, I decided to turn HAL back on. I had to do this fix to get the caller ID working consistently. HAL's telephone VR works with MJ the same as with a landline.

I've got a little more playing around to do with MJ, but it's usable. It's definitely going to get used more than the landline did since long distance is free.

Wednesday, May 6, 2009

Canceled Landline

I canceled our landline today. I should have done it a while ago, but was lazy. Ever since we got the Sprint AirRave, our cell coverage is perfect so we've used the landline even less. It's ridiculous that the lowest priced service is almost $8 and the taxes and fees nearly doubles the bill! I don't think I'll miss it much. I got tired of the dumba** carpet cleaning morons violating the do not call list with the automated dialers and recorded messages. I have been contemplating Ooma, but I'm just going to wait a bit.