GoogleContactLookup stop working

Found something wrong ?
Curious
Posts: 25
Joined: Wed Jan 20, 2010 4:00 am

GoogleContactLookup stop working

Post by Curious » Wed May 27, 2015 12:25 am

GoogleContactLookup is not working!
The function call returns: "Exception in GoogleContactLookup. Execution of authentication request returned unexpected result: 404"
Hope I am not the only one who has this problem! :(

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: GoogleContactLookup stop working

Post by Aaron » Thu May 28, 2015 9:48 am

I haven't had a reason to look at this function in years and it's actually a surprise that you're using it. I'll see if I can track the error down.

Curious
Posts: 25
Joined: Wed Jan 20, 2010 4:00 am

Re: GoogleContactLookup stop working

Post by Curious » Thu May 28, 2015 5:19 pm

Thanks Aaron. I use Google contacts as a whitelist to display caller's name on my phone and filter out telemarketing calls. :)

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: GoogleContactLookup stop working

Post by Aaron » Tue Jun 02, 2015 9:44 am

It's not looking good for a fix to the GoogleContactLookup function.

I spent 3 hours getting to the bottom of it and the reason for the failure is that Google have stopped supporting the authentication scheme (OAuth1) that the function was using. The supported scheme (OAuth2) does not allow authentication from a 3rd party server using an email address and password. Instead the 3rd party application is supposed to redirect the user to Google's servers and get them to authenticate and then use the returned token for subsequent calls, in this case Google contact lookups. In the scheme of things this is a good thing since it makes Google accounts more secure but for non-web apps, such as sipsorcery, it means there is no way to authenticate as an arbitrary user.

I've posted a question on the support forum to see if there is anything I have missed and whether there could be a way to get the authentication working from sipsorcery but I'm not very hopeful.

Curious
Posts: 25
Joined: Wed Jan 20, 2010 4:00 am

Re: GoogleContactLookup stop working

Post by Curious » Fri Jun 05, 2015 7:44 pm

Thanks Aaron. Please take a look if service account can resolve this problem:
https://developers.google.com/identity/ ... iceAccount. As far as I know
both http://GVsip.com and http://simonics.com/gw/ use OAuth2.0 to authenticate. :)

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: GoogleContactLookup stop working

Post by Aaron » Tue Jun 09, 2015 10:06 am

Ok I'll take another look. It's pretty involved though so it will take a bit of time to dig into it all. I'll post updates if/when I make any progress.

bo33b
Posts: 4
Joined: Wed Sep 26, 2012 11:41 pm

Re: GoogleContactLookup stop working

Post by bo33b » Sun Nov 01, 2015 1:45 am

Any update on this? After leaving SS for a while to try other solutions for my VoIP needs I find myself back here at long last...3 years later, and my glorious dialplan is still here, thankfully! :D But now with Oauth2 none of the Google functions work. Well, I was able to get sys.GoogleVoiceCall working again after disabling 2-factor authentication, setting a switch to enable access to less-secure apps, and several visits to https://accounts.google.com/DisplayUnlockCaptcha ... lol ... but I've had no luck getting sys.GoogleContactLookup past the 404 error.

I know these functions are basically relics of a by-gone era...and if users are now paying $70 a year for this service they certainly aren't wasting their time with Google Voice...but I know how you (Aaron) like a challenge and maybe getting Sipsorcery compatible with OAuth could open up other integrations in the future...perhaps by way of IFTTT, for example.

What I could possibly envision is a way for users to authenticate to Google through OAuth and allow us to simply collect the token so that we can paste it into the dialplan function in place of the username/password. I've never seen an app do it that way though, and I'm not able to say if that's possible. But I do know that Oauth2 is incredibly popular and well-documented nowadays. Anyway, just a thought :)

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: GoogleContactLookup stop working

Post by Aaron » Sat Nov 07, 2015 10:08 am

I did have a look at the OAuth integration a couple of months ago but to be honest after a few hours of going through the documentation and trying to find some ready made samples I felt my will to program quickly ebb away... I get a kick from the SIP and network side of things not so much the back end administration side of things.

That being said I have a nice little kitty on freelancer.com from some previous projects that I commissioned and weren't delivered and the OAuth integration is a perfect candidate for those. I'm aiming to get something kicked off shortly.

mthaberman
Posts: 6
Joined: Tue Jul 05, 2011 1:26 pm

Re: GoogleContactLookup stop working

Post by mthaberman » Sat May 14, 2016 11:57 am

That being said I have a nice little kitty on freelancer.com from some previous projects that I commissioned and weren't delivered and the OAuth integration is a perfect candidate for those. I'm aiming to get something kicked off shortly.
Aaron, new progress on this?

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: GoogleContactLookup stop working

Post by Aaron » Mon May 16, 2016 10:39 am

It's in progress, still waiting for some prototype code. Shouldn't be too much longer.

Post Reply