Problems with Google Voice

Hi everyone,

I’ve spent pretty much all day Googling this today, with no avail so far :confused:

I just installed Asterisk 11 and FreePBX on my Debian Wheezy server this morning. All of the internal stuff seems to work fine now, so I wanted to proceed with getting things linked up to Google Voice, since Google was kind enough to continue support for it, and used the built-in Motif module to do the configuration.

After setting this up, things wouldn’t connect - the logs just rotated with a continual spiral of

[2015-03-20 20:52:49] WARNING[22432]: res_xmpp.c:3570 xmpp_client_receive: Parsing failure: Invalid XML. [2015-03-20 20:52:49] WARNING[22432]: res_xmpp.c:3637 xmpp_client_thread: JABBER: socket read error [2015-03-20 20:52:50] WARNING[22432]: res_xmpp.c:3573 xmpp_client_receive: Parsing failure: Hook returned an error. [2015-03-20 20:52:50] WARNING[22432]: res_xmpp.c:3637 xmpp_client_thread: JABBER: socket read error [2015-03-20 20:52:51] WARNING[22432]: res_xmpp.c:3573 xmpp_client_receive: Parsing failure: Hook returned an error. [2015-03-20 20:52:52] WARNING[22432]: res_xmpp.c:3570 xmpp_client_receive: Parsing failure: Invalid XML. [2015-03-20 20:52:52] WARNING[22432]: res_xmpp.c:3637 xmpp_client_thread: JABBER: socket read error [2015-03-20 20:52:53] WARNING[22432]: res_xmpp.c:3573 xmpp_client_receive: Parsing failure: Hook returned an error. [2015-03-20 20:52:53] WARNING[22432]: res_xmpp.c:3570 xmpp_client_receive: Parsing failure: Invalid XML.

As I checked the xmpp connection status for my account, it just rotated through:

countryside*CLI> xmpp show connections Jabber Users and their status: [gxxxxxxgmailcom] xxxxxx@gmail.com - Disconnected [gxxxxxxgmailcom] xxxxxx@gmail.com - Waiting to request TLS [gxxxxxxgmailcom] xxxxxx@gmail.com - Requested TLS [gxxxxxxgmailcom] xxxxxx@gmail.com - Waiting to authenticate [gxxxxxxgmailcom] xxxxxx@gmail.com - Authenticating

After a lot of research, it seems as if gnutls support isn’t available on Wheezy, but TLS is required for Google Talk. From further checking, I found this posting:
viewtopic.php?f=1&t=88258&p=206015&hilit=xmpp#p206015

and tried setting up stunnel on the server, which seems to connect fine -

[code]; debugging stuff
debug = 7
output = /var/log/xmpp_stunnel.log
client = yes
sslVersion = all
options = NO_SSLv2

[jabber]
accept = 5225
connect = talk.google.com:5222[/code]

[code][general]

#include xmpp_general_custom.conf

[gxxxxxxgmailcom]
type=client
serverhost=127.0.0.1
username=xxxxxx@gmail.com
secret=xxxxxx
port=5225
usetls=no
usesasl=yes
status=available
statusmessage="I am Available"
timeout=5
priority=127

#include xmpp_custom.conf[/code]

root@xxxxxx:/var/log/asterisk# netstat -alnp | grep 522 tcp 0 0 0.0.0.0:5225 0.0.0.0:* LISTEN 21510/stunnel4 tcp 0 0 192.168.1.8:56588 64.233.171.125:5222 ESTABLISHED 21510/stunnel4 tcp 135 0 127.0.0.1:5225 127.0.0.1:57399 ESTABLISHED 21510/stunnel4 tcp 0 0 127.0.0.1:57399 127.0.0.1:5225 ESTABLISHED 17822/asterisk

However, after doing so, things still don’t want to connect. The error messages in the full log are simpler:

[2015-03-20 20:44:52] WARNING[22432]: res_xmpp.c:3637 xmpp_client_thread: JABBER: socket read error [2015-03-20 20:44:52] WARNING[22432]: res_xmpp.c:3637 xmpp_client_thread: JABBER: socket read error [2015-03-20 20:44:52] WARNING[22432]: res_xmpp.c:3637 xmpp_client_thread: JABBER: socket read error [2015-03-20 20:44:52] WARNING[22432]: res_xmpp.c:3637 xmpp_client_thread: JABBER: socket read error [2015-03-20 20:44:53] WARNING[22432]: res_xmpp.c:3637 xmpp_client_thread: JABBER: socket read error

When I view the stunnel log file, I see this:

2015.03.20 20:51:57 LOG6[25873:3065762928]: connect_blocking: connecting 64.233.171.125:5223 2015.03.20 20:51:57 LOG7[25873:3065762928]: connect_blocking: s_poll_wait 64.233.171.125:5223: waiting 10 seconds 2015.03.20 20:51:58 LOG5[25873:3065762928]: connect_blocking: connected 64.233.171.125:5223 2015.03.20 20:51:58 LOG5[25873:3065762928]: Service [jabber] connected remote server from 192.168.1.8:58830 2015.03.20 20:51:58 LOG7[25873:3065762928]: Remote socket (FD=3) initialized 2015.03.20 20:51:58 LOG7[25873:3065762928]: SNI: host name: talk.google.com 2015.03.20 20:51:58 LOG6[25873:3065762928]: SSL connected: previous session reused 2015.03.20 20:51:58 LOG7[25873:3065762928]: SSL socket closed on SSL_read 2015.03.20 20:51:58 LOG7[25873:3069165568]: Service [jabber] accepted (FD=15) from 127.0.0.1:33392 2015.03.20 20:51:58 LOG7[25873:3065762928]: Sent socket write shutdown 2015.03.20 20:51:58 LOG7[25873:3065697392]: Service [jabber] started 2015.03.20 20:51:58 LOG5[25873:3065762928]: Connection closed: 247 byte(s) sent to SSL, 428 byte(s) sent to socket 2015.03.20 20:51:58 LOG7[25873:3065697392]: Waiting for a libwrap process 2015.03.20 20:51:58 LOG7[25873:3065697392]: Acquired libwrap process #0 2015.03.20 20:51:58 LOG7[25873:3065697392]: Releasing libwrap process #0 2015.03.20 20:51:58 LOG7[25873:3065762928]: Remote socket (FD=3) closed 2015.03.20 20:51:58 LOG7[25873:3065697392]: Released libwrap process #0 2015.03.20 20:51:58 LOG7[25873:3065697392]: Service [jabber] permitted by libwrap from 127.0.0.1:33392 2015.03.20 20:51:58 LOG5[25873:3065697392]: Service [jabber] accepted connection from 127.0.0.1:33392 2015.03.20 20:51:58 LOG6[25873:3065697392]: connect_blocking: connecting 2607:f8b0:400d:c03::7d:5223 2015.03.20 20:51:58 LOG7[25873:3065762928]: Local socket (FD=14) closed 2015.03.20 20:51:58 LOG7[25873:3065762928]: Service [jabber] finished (1 left) 2015.03.20 20:51:58 LOG3[25873:3065697392]: connect_blocking: connect 2607:f8b0:400d:c03::7d:5223: Network is unreachable (101)

Does anyone have any ideas? I’d really like to be able to get this working if possible :wink:

Keeping this ahead of the Korean spam.

More Korean spam.

So, it turns out that there’s a security setting that you have to enable on your Google account for it to work, at least for me. I did this on google.com/settings/security/lesssecureapps After doing so, I was able to connect without a problem, and made my first call from my laptop through to my cell phone! :smiley:

Just for my random curiosity, would anyone happen to know why this setting would be necessary, or if there’s something that can be done to not require enabling it?