 |
MySIPSwitch Community Forums SIP Switch is an online call management application, allowing you using multiple SIP providers services with one piece of hardware. Manage all your calls on the fly: hang up, transfer, forward ...
|
| View previous topic :: View next topic |
| Author |
Message |
fixup77
Joined: 27 Jan 2008 Posts: 71
|
Posted: Tue Aug 11, 2009 4:38 am Post subject: Google Voice Dial Out |
|
|
| 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. |
|
| Back to top |
|
 |
Aaron Site Admin
Joined: 12 Jul 2007 Posts: 2072
|
Posted: Tue Aug 11, 2009 7:02 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
huibw
Joined: 07 Sep 2008 Posts: 31
|
Posted: Tue Aug 11, 2009 12:05 pm Post subject: |
|
|
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  |
|
| Back to top |
|
 |
djon
Joined: 10 Jun 2009 Posts: 45
|
Posted: Tue Aug 11, 2009 12:51 pm Post subject: |
|
|
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-voice-add-on-for-firefox |
|
| Back to top |
|
 |
Aaron Site Admin
Joined: 12 Jul 2007 Posts: 2072
|
Posted: Tue Aug 11, 2009 3:34 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
djon
Joined: 10 Jun 2009 Posts: 45
|
Posted: Tue Aug 11, 2009 4:57 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
huibw
Joined: 07 Sep 2008 Posts: 31
|
Posted: Tue Aug 11, 2009 4:58 pm Post subject: |
|
|
That's awesome! When I get home from work I'll give it a try! Thanks!  |
|
| Back to top |
|
 |
huibw
Joined: 07 Sep 2008 Posts: 31
|
Posted: Tue Aug 11, 2009 5:00 pm Post subject: |
|
|
| @djon: no hardcoding necessary. Aaron just gave a simple to understand example. With the Ruby scripting you can do what ever you want. |
|
| Back to top |
|
 |
djon
Joined: 10 Jun 2009 Posts: 45
|
Posted: Tue Aug 11, 2009 5:15 pm Post subject: |
|
|
| 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)
|
|
| Back to top |
|
 |
huibw
Joined: 07 Sep 2008 Posts: 31
|
Posted: Tue Aug 11, 2009 8:10 pm Post subject: |
|
|
Depending on your dailplan it can be
or in my case
| Code: |
numbertocall = req.URI.User.to_str
...process the cr*p out of it...
|
So you would get
| Code: |
| when /^500$/ then sys.GoogleVoiceCall("me@gmail.com", "password", "my gizmo number", "${dst}", true) |
or
| Code: |
| when /^500$/ then sys.GoogleVoiceCall("me@gmail.com", "password", "my gizmo number", "#{numbertocall}", true) |
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|