Google Voice Dial Out

New features you'd like see on SIP Sorcery

Google Voice Dial Out

Postby fixup77 » Tue Aug 11, 2009 4:38 am

It should be fairly easy for MySipSwitch to add a feature for Google Voice. There is now such a script for Asterisk and a GVOut.exe for Windows.
fixup77
 
Posts: 71
Joined: Sun Jan 27, 2008 1:56 am

Postby Aaron » Tue Aug 11, 2009 7:02 am

Have you seen this http://www.gizmovoice.com/?

Using that you can get free calls from your ATA (with or without sipsorcery) with your Google Voice account. The free calls are limited to 3 minutes by Gizmo.

I read the http://nerdvittles.com/ article a couple of times but still haven't quite grasped what they are doing to get the outgoing calls working with a parking lot.

Regards,

Aaron
User avatar
Aaron
Site Admin
 
Posts: 2495
Joined: Thu Jul 12, 2007 12:13 am

Postby huibw » Tue Aug 11, 2009 12:05 pm

Conceptually it sounds straightforward. When you want to make a call you dial the number, your line/phone is put on hold in the parking lot and the code extension to Asterisk uses the Google API to have Google Voice call you back. As soon as Google calls back it's connected to the line/phone on hold. Then the dialed number will be connected to the call by Google Voice.

Would be a very neat feature for SipSorcery :D
huibw
 
Posts: 31
Joined: Sun Sep 07, 2008 12:13 am

Postby djon » Tue Aug 11, 2009 12:51 pm

Initially, Gizmo5 was using the Google API for unlimited calls through Google Voice. Your GV Login and password were required.

Now that 3 minute call is through Gizmo5 with caller-ID spoof.

There's also a Firefox AddON
http://thatsmith.com/2009/03/google-voi ... or-firefox
djon
 
Posts: 58
Joined: Wed Jun 10, 2009 10:29 am

Postby Aaron » Tue Aug 11, 2009 3:34 pm

I've been able to get the Google Voice callbacks initiated from the sipsorcery dialplan and have added a new dialplan application for it.

At this stage it does not bridge to the originating call, that's the next thing I'll work on, so once the application is initiated you will normally need to hang up your phone and wait for the incoming Google Voice call.

The dialplan application is:

sys.GoogleVoiceCall(string emailAddress, string password, string forwardingNumber, string destinationNumber, bool hangupOriginator)

Parameters:

- emailAddress: The email address you login to your Google Voice account with,

- password: The password you login to your Google Voice account with,

- forwardingNumber: A number you have regeistered with Google voice
as a forward. Note you cannot use any old number in here it must be one you have registered as Home, Gizmo etc. on your account. With sipsorcery the best idea is to use a Gizmo number since that's an incoming SIP call and I've tested that it works properly,

- destinationNumber: The outgoing number you want to connect to once the forwarding number call has been answered,

- hangupOriginator: Whether to hangup the call that rang into initiate the Google Voice call. If true the call will be hungup and an additional 3s will be waited for before the HTTP request sequence is initiated. This will give you plenty of time to hangup your phone in preparation for the incoming forward number call.

Example:
when /^500$/ then sys.GoogleVoiceCall("me@gmail.com", "password", "17476120000", "2132701859", true)

Note: The 17476120000 is an example of a Gizmo number and is the one that would be registered against your Google Voice account. The 2132701859 number is the destination number to call once the incoming forward has been received. In this case it's one line vxml app at tropo.com so can be used as a test number if you wish.

Regards,

Aaron
User avatar
Aaron
Site Admin
 
Posts: 2495
Joined: Thu Jul 12, 2007 12:13 am

Postby djon » Tue Aug 11, 2009 4:57 pm

As implemented, would this require hard coding the number(s) to be called in the dial plan?
I understand that this is a proof of concept, just want to be sure I didn't miss anything.

That's quick work.
djon
 
Posts: 58
Joined: Wed Jun 10, 2009 10:29 am

Postby huibw » Tue Aug 11, 2009 4:58 pm

That's awesome! When I get home from work I'll give it a try! Thanks! :D
huibw
 
Posts: 31
Joined: Sun Sep 07, 2008 12:13 am

Postby huibw » Tue Aug 11, 2009 5:00 pm

@djon: no hardcoding necessary. Aaron just gave a simple to understand example. With the Ruby scripting you can do what ever you want.
huibw
 
Posts: 31
Joined: Sun Sep 07, 2008 12:13 am

Postby djon » Tue Aug 11, 2009 5:15 pm

huibw wrote:@djon: no hardcoding necessary. Aaron just gave a simple to understand example. With the Ruby scripting you can do what ever you want.
Thanks for responding. What goes in the field string destinationNumber in the dial plan?
sys.GoogleVoiceCall(string emailAddress, string password, string forwardingNumber, string destinationNumber, bool hangupOriginator)
djon
 
Posts: 58
Joined: Wed Jun 10, 2009 10:29 am

Postby huibw » Tue Aug 11, 2009 8:10 pm

Depending on your dailplan it can be
Code: Select all
${dst}
or in my case
Code: Select all
numbertocall = req.URI.User.to_str
...process the cr*p out of it...


So you would get
Code: Select all
when /^500$/ then sys.GoogleVoiceCall("me@gmail.com", "password", "my gizmo number", "${dst}", true)
or
Code: Select all
when /^500$/ then sys.GoogleVoiceCall("me@gmail.com", "password", "my gizmo number", "#{numbertocall}", true)
huibw
 
Posts: 31
Joined: Sun Sep 07, 2008 12:13 am

Next

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 0 guests