Google Voice Dial Out

New features you'd like see on SIP Sorcery

Postby Aaron » Wed Aug 12, 2009 3:38 pm

The GoogleVoiceCall dialplan application has now been updated so that there is no disconnection required in order to receive the callback. The sipsorcery software will take care of matching up the originating call and the inbound call from GoogleVoice->Gizmo->SIPSorcery.

The proper way to use the application has been changed to:

sys.GoogleVoiceCall("me@gmail.com", "password", "17412312", "81812881")

If the boolean parameter is used as per the initial application it will still be accepted but will be ignored.

This latest update makes it a bit nicer for using Google Voice for outgoing calls as they now work close to the same as a normal call. There are some caveats:

- In order to avoid a 5 to 10s of dead air while the HTTP requests go back and forth to Google I send a ringing response back to the caller so at least they know something is happening,

- When the Google Voice callback arrives the call gets answered, if you have an IP phone or soft phone it will be easy to tell, and there will be a pause and then typically a second ring tone. This ring tone is now the other end of the Google Voice call ringing,

- You MUST have your Google Voice number wired up to your Gizmo number for the callback to be accepted. You MUST have your Gizmo account registered with sipsorcery so that the callback from Google Voice can reach the sipsorcery server. If either of these is not in place the call will fail. You can use the log messages to see if there are any problems along the way,

- You can only ever have a SINGLE call in progress since the only way to match the Google Voice callback is by the Gizmo number. If you happen to try two simultaneous calls the last one will overwrite any current one and take the callback.

It's certainly a bit of messing around but I guess it gets a free call for which people will put up with a lot!

In reference to the question about whether this application will be deployed on the mysipswitch service the answer is no. The mysipswitch software is now 10 months behind the sipsorcery software and updates to it are not practical.

Regards,

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

Postby jay235 » Wed Aug 12, 2009 3:41 pm

huibw wrote:@jaguar: I don't know if MySipSwitch will be updated since SipSorcery will take over all together soon. If it is implemented it will work the same as for SipSorcery.


huibw,

I am a new user to this, so please excuse my novice questions...

Below is part of the dialplan I am using for GV feature using a x-lite softphone. I am getting a syntax error when dialing out. Would you please see where my error is?

# Do your OUTGOING call processing customisations here.
case dst
sys.GoogleVoiceCall("me@gmail.com", "gv password", "my SIP Phone number", "${dst}", true)
else sys.Dial("sipgate")
end
jay235
 
Posts: 21
Joined: Wed Aug 12, 2009 2:15 pm

Postby jay235 » Wed Aug 12, 2009 3:54 pm

Aaron wrote:The GoogleVoiceCall dialplan application has now been updated so that there is no disconnection required in order to receive the callback. The sipsorcery software will take care of matching up the originating call and the inbound call from GoogleVoice->Gizmo->SIPSorcery.

The proper way to use the application has been changed to:

sys.GoogleVoiceCall("me@gmail.com", "password", "17412312", "81812881")

Regards,

Aaron


Aaron,

What are the two phone numbers? I take it the first one is the Gizmo number. What is the second number?

Thanks,
Jay
jay235
 
Posts: 21
Joined: Wed Aug 12, 2009 2:15 pm

Postby huibw » Wed Aug 12, 2009 4:18 pm

Code: Select all
# Do your OUTGOING call processing customisations here.
case dst
when /^some number$/ then sys.GoogleVoiceCall("me@gmail.com", "gv password", "my SIP Phone number", "${dst}")
else sys.Dial("${dst}@sipgate")
end

This assumes you have a SIP provider defined called sipgate
huibw
 
Posts: 31
Joined: Sun Sep 07, 2008 12:13 am

Postby MikeTelis » Wed Aug 12, 2009 4:22 pm

Aaron wrote: - You MUST have your Google Voice number wired up to your Gizmo number for the callback to be accepted. You MUST have your Gizmo account registered with sipsorcery so that the callback from Google Voice can reach the sipsorcery server. If either of these is not in place the call will fail.

For some reason, having Sipsorcery registered with Gizmo isn't the best solution from voice quality point of view. I found that configuring Gizmo so that it would forward all incoming calls to myname@sipsorcery.com works much better.

Details: the option is in Gizmo5 / My, "Forwarding Gizmo5 calls". Select "Forwarding All Calls" on the left and "SIP" on the right, enter your Sipsorcery URI.
MikeTelis
 
Posts: 1150
Joined: Wed Jul 30, 2008 6:48 am

Postby huibw » Wed Aug 12, 2009 4:54 pm

Aaron,

Thank you for the latest GoogleVoice enhancement. It’s much appreciated.

The way I understand how it works is that when the dialplan executes a sys.GoogleVoiceCall it will put the client on-hold, sends GV the required info for the callback and then ANY call that comes in through ANY of the defined SIP providers will be connected to the call on-hold. As you mention, it leaves something to be desired as it’s relatively prone to a mix-up.

Instead of using your Gizmo number as parameter can you use the name of your SIP provider that defines your Gizmo connection? The sys.GoogleVoiceCall function can grab the username (the Gizmo number) from the SIP provider details and consequently knows where to expect the GV callback to come from. When a call comes in through a different provider it will be processed as usual instead of being connected to the call on-hold.

This still leaves the option that when another party calls your Gizmo/GV line at the same time as the GV callback you have a potential for mixed up calls but it’s so much slimmer then when you connect any incoming call with the call on-hold.

I noticed that when GV does the callback it uses your own GV number. Maybe that’s the simplest and relatively most certain way to know if it’s the GV callback the dialplan is waiting for or not. It can be used to determine if a simultaneous call comes in (caller ID <> your GV number) and needs to be processed the normal way or if it’s indeed the GV callback the dialplan is waiting for. This would require an extra parameter in the sys.GoogleVoiceCall to define the GV number it expects the callback to come from.

Regards, Huib
huibw
 
Posts: 31
Joined: Sun Sep 07, 2008 12:13 am

Postby fixup77 » Wed Aug 12, 2009 5:36 pm

Aaron, I knew you could do it!

Why people are still into that Asterisk crap is beyond me - huge, too hard to set up and, the worst, touching audio.
fixup77
 
Posts: 71
Joined: Sun Jan 27, 2008 1:56 am

Postby MikeTelis » Wed Aug 12, 2009 6:36 pm

This may sound like a crazy idea, but I would like to question the very basics. Do we really need that sys.GoogleVoiceCall method?

The idea is that you employ old good sys.Dial and sys.Callback for both SIP and GV calls. Probably it could be implemented as an "internal SIP proxy", an application simulating regular SIP proxy but interacting with Google Voice.

This approach would allow to solve problems with multi- and failover dialing, time-outs etc (because all this has already been implemented in sys.Dial) and also eliminate the need of "special case" programming in Ruby scripts.

And of course, it would be nice to have Google Voice parameters (like login/password, GV phone number, Gizmo number) entered somewhere on "SIP providers" page (or a dedicated page for GV account(s)).

Mike
MikeTelis
 
Posts: 1150
Joined: Wed Jul 30, 2008 6:48 am

Postby gvtricks » Wed Aug 12, 2009 7:09 pm

Does anybody can tell me what is wrong with his this dial plan to make work with this application.

Code: Select all
#Ruby # OUT
sys.Trace = true
sys.Log("*****************************************************\t")
sys.Log("*             OUTBOUND CALL FROM RUBY DIALPLAN                  *\t")
sys.Log("*****************************************************\t")
sys.Log(" Received-URI:#{req.URI.User}\t URI-Length:#{req.URI.User.Length}\t")
sys.Log(" URI-Host:#{req.URI.Host}\t")
sys.Log(" From:#{req.Header.From.FromURI.User}\t Name:#{req.Header.From.FromName}\t")
sys.Log(" Incoming-Call:#{sys.In().ToString()}\t Outgoing-Call:#{sys.Out().ToString()}\t")
sys.Log(" ATA-Online:#{sys.IsAvailable("My_SS_User_Name", "sipsorcery.com").ToString()}\t")

# Logic for routing outgoing calls.
case req.URI.User
when /^\*1/ then sys.GoogleVoiceCall("My_gmail_User_name@gmail.com", "My_GV_User_ID", "17475551212", "${dst}")
else sys.Dial("${dst}@proxy01.sipphone.com")
end


I do have my G5 account registered with sipsorcery, and also is one of my forwarding phones on GV, G5 is also set to my GV account so I can make 3 min free calls. My sipsourcery account is register with my XLite soft Phone in witch I can only get incoming calls if some one dials my GV number.
But when I try to make a call using this dial plan I get "the person you are calling is unavailable bla,bla"

Please forgive me for been new here, but I have been reading a lot an unable to find a solution on my own, I have try so many things and still the same issue, maybe asking will help.

Thank you
gvtricks
 
Posts: 80
Joined: Wed Aug 12, 2009 2:48 pm

Postby guduri » Wed Aug 12, 2009 7:51 pm

I cannot seem to get this to work. I here ringing for a couple of times and then get a busy tone and the log says

"UAS call failed with a response status of 480"

Before this I see the following in the log

Code: Select all
Call key mW3CVf0kS1MK0tXwnTqJTNXAzb8= successfully retrieved for myemail@gmail.com, proceeding with callback
Google Voice Call to ${dst} forwarding to {mygizmonum} successfully initiated
Google Voice Call timed out waiting for callback
Dial plan execution completed without answering and with no last failure status.
guduri
 
Posts: 87
Joined: Tue Jun 09, 2009 10:11 pm
Location: Ann Arbor, MI

PreviousNext

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 0 guests

cron