With all the parts of this project up and running; when you receive a Google Voice call the red and green LEDs on the LaunchPad alternate flashing on and off. Then if you press the on-board button the call will be answered. This is an interesting experiment in itself, but there is also value in each of the independent parts.
A dedicated phone line is a staple for any presidents desk. And now that Google is giving away phone numbers anyone can have a single use line for free. Using a TI Launchpad to interact with it is just fun.
Cortelco 8211 Single Line VoIP Analog Terminal Adapter ($10.99@Amazon)
Check this out if you want to use Google Voice and your new Yate server to get free home phone service.
Cortelco 2500 desk phone in fire engine red ($35.00)
Unnecessary but awesome.
In the photo attached you can see the telephone handset I wanted to use with this project. The handset was sonic welded completely around the edge and on the supports. Ended up having to slice it in half with a hack saw, not my finest work. I connected the microphone to a double A battery and a stereo headphone jack. Then using the displayed splitter I separated the microphone singal out to a sound card. At this point the signal is so weak as to be unusable. I had intended to use the battery to amplify the signal to the speaker as well, but when I discovered that the circuit wasn't powerful enough to drive the microphone I lost interest.
ser = serial.Serial()
ser.port = "/dev/ttyACM0"
ser.baudrate = 9600
value = 0
blinkcount = 10
p = subprocess.Popen(["linphonecsh", "status", "hook"], stdout=subprocess.PIPE)
result = p.communicate()
if "hook" in result :
if blinkcount > 9 :
blinkcount = 0
blinkcount = blinkcount + 1
value = ser.read();
if value == "[":
p = subprocess.Popen(["linphonecsh", "generic", "answer"], stdout=subprocess.PIPE)
This project is very portable. It could be used to signal a results from any program that can be poled from the command line. Or execute any designated command on a button press.
Yate(Yet Another Telephony Engine):
Answering Google Voice calls that are forwarded to Google chat is tricky if you don't want to use the Gmail chat application. I found the most functional results were achieved by using Yate, to create an SIP server that handles the communication with Googles servers.
At the end of the first tutorial there is a section "SIP account logged in YateClient". For some extra explanation on this section. Run Yate Client then in the setting menu select accounts. Now click new and fill out the form like this.
use provider = none protocol = -sip- username = username password = something server = 192.168.0.5
These same settings can be used to register your SIP server with Empathy to send and receive calls, or with other softphones.