by 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