[asterisk-bugs] [JIRA] (ASTERISK-26327) res_xmpp.c motif google voice login fails when username domain isnt google

Asterisk Team (JIRA) noreply at issues.asterisk.org
Tue Aug 30 15:39:01 CDT 2016


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=232092#comment-232092 ] 

Asterisk Team commented on ASTERISK-26327:
------------------------------------------

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

> res_xmpp.c motif google voice login fails when username domain isnt google
> --------------------------------------------------------------------------
>
>                 Key: ASTERISK-26327
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-26327
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_xmpp
>    Affects Versions: 13.10.0
>         Environment: Linux CentOS 7 x86
> IncrediblePBX FreePBX GUI
>            Reporter: Chris Coleman
>
> Getting a vague "Parsing failure: Invalid XML" error, while trying to add a GV motif account inside Incredible 13-12 centos 7 32bit.
> GV motif is working fine on this machine, it has 3 working GV accounts connected (green).
> This 4th line which I'm attempting to add now, however, shows status Disconnected (red).
> As a test to see whether this account is able to login dial out at all, this 4th GV line is indeed able to login fine and is working fine inside the Hangouts app, to dial out and receive calls, so the line/number/dialing abilities are valid.
> Have exited Hangouts app so there is no other simultaneous jabber xmpp login on this particular GV lne.
> Relevant snippet of log lines from the var log asterisk full log:
> [code]
> [2016-08-29 13:22:14] NOTICE[28711] res_xmpp.c: Connecting to client token : (my refresh token)
> [2016-08-29 13:22:14] NOTICE[28711] res_xmpp.c: Command CURL(https://www.googleapis.com/oauth2/v3/token,client_id=466295438629-prpknsovs0b8gjfcrs0sn04s9hgn8j3d.apps.googleusercontent.com&client_secret=4ewzJaCx275clcT4i4Hfxqo2&refresh_token=(my refresh token)&grant_type=refresh_token)
> [2016-08-29 13:22:14] NOTICE[28711] res_xmpp.c: Command status : {
> "access_token": "(the access token it generates)",
> "token_type": "Bearer",
> "expires_in": 3600
> }
> [2016-08-29 13:22:14] NOTICE[28711] res_xmpp.c: access Token : (the access token it generated above)
> [2016-08-29 13:22:14] WARNING[28711] res_xmpp.c: Parsing failure: Hook returned an error.
> [2016-08-29 13:22:14] WARNING[28711] res_xmpp.c: Parsing failure: Invalid XML.
> [2016-08-29 13:22:14] WARNING[28711] res_xmpp.c: JABBER: socket read error
> [/code]
> This exact error sequence (above) repeats literally about 100 times per minute in the logs as res_xmpp.c tries and retries to connect over xmpp to the gtalk server api.
> Reasons why I believe this to be a bug:
> 1.  When you you sign up for a "google account", which is simply an email address and password, used to build a profile about you, and to identify you when accessing any google service (youtube, gvoice, maps, search, etc..). Google lets you use an existing email account for your username, such as a yahoo.com address in this case.  You're not forced to have a gmail email account in order to have a google account.
> 2. This google account (myusername at yahoo.com) has gvoice and a phone number which are working fine, for call forwarding, text messages, etc. Google chat is available.
> 3. The issue appears to be on the xmpp code.  I appears that in res/res_xmpp.c the OAUTH2 implementation is making a wrong assumption, namely, the code is ignoring the fact that OAUTH is a login client, and when the code talks to google and incorrectly just parses out the domain from the email address entered in the username field, and specifies the "domain" as yahoo.com, google.com is from this point technically, as far as the OAUTH protocol is concerned, not the proper login provider for that domain, so, error.
> In other words, res_xmpp is telling google that it wants to login to the yahoo OAUTH2 authenticator.  I think res_xmpp.c should force pick google.com for the "domain" field of the xmpp conversation, or possibly omit the domain, and just use the full (myusername at yahoo.com in this case) email address as the username.  
> Said another way, the code should skip parsing out the domain from the email address.  google is always the login server for motif/gvoice,  not yahoo.com.  The login username would probably succeed as the full email address, and specify default or google for the domain.
> Independent verification:  
> Has anyone ever tested this xmpp (gvoice motif) code, with a google account, with gtalk/gvoice phone number assigned, which does NOT have a gmail address as its login username?  If not, you could you create such a google account, using a work email address, or a yahoo/hotmail/any free webmail, and test this motif xmpp module with such an email adddress?



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list