I am trying to connect Asterisk to a Google Talk account as described here, with the goal being to allow Google Talk users to call my pbx.
I have set up my configuration files as described in that document, but I am unable to connect to my Google Talk account.
My jabber.conf file looks like this:
[general]
debug=yes
autoprune=no
autoregister=yes
[asterisk]
type=client
serverhost=talk.google.com
username=my_username@gmail.com/Talk
secret=my_password
port=5222
usetls=yes
usesasl=yes
statusmessage="I am a robot"
timeout=100
My gtalk.conf looks like this:
[general]
context=incoming-google
bindaddr=0.0.0.0
allowguests=yes
[guest]
disallow=all
allow=ulaw
context=local
connection=asterisk
And finally, this is the output I get in the Asterisk console when I try to connect, with ‘jabber set debug on’.
[code]JABBER: asterisk OUTGOING: <?xml version='1.0'?><stream:stream xmlns:stream=‘http://etherx.jabber.org/streams’ xmlns=‘jabber:client’ to=‘gmail.com’ version=‘1.0’>
JABBER: asterisk INCOMING: <stream:stream from=“gmail.com” id=“D87F9CDF5C58C4E9” version=“1.0” xmlns:stream=“http://etherx.jabber.org/streams” xmlns=“jabber:client”>stream:featuresX-GOOGLE-TOKENX-OAUTH2</stream:features>
JABBER: asterisk OUTGOING:
JABBER: asterisk INCOMING:
JABBER: asterisk OUTGOING: <?xml version='1.0'?><stream:stream xmlns:stream=‘http://etherx.jabber.org/streams’ xmlns=‘jabber:client’ to=‘gmail.com’ version=‘1.0’>
JABBER: asterisk INCOMING: <stream:stream from=“gmail.com” id=“1209DDC90296ABE2” version=“1.0” xmlns:stream=“http://etherx.jabber.org/streams” xmlns=“jabber:client”>
JABBER: asterisk INCOMING: stream:featuresPLAINX-GOOGLE-TOKENX-OAUTH2</stream:features>
JABBER: asterisk OUTGOING: XXXXXXXXX
JABBER: asterisk INCOMING:
[Aug 4 03:12:43] ERROR[3887]: res_jabber.c:1693 aji_act_hook: JABBER: encryption failure. possible bad password.
JABBER: asterisk INCOMING: </stream:stream>
[Aug 4 03:12:43] ERROR[3887]: res_jabber.c:1576 aji_act_hook: aji_act_hook was called with out a packet
[Aug 4 03:12:43] WARNING[3887]: res_jabber.c:1391 aji_recv: Parsing failure: Hook returned an error.
[Aug 4 03:12:43] WARNING[3887]: res_jabber.c:2742 aji_recv_loop: JABBER: Got hook event.
[Aug 4 03:12:43] WARNING[3887]: res_jabber.c:2753 aji_recv_loop: JABBER: socket read error
[/code]
Yes, I’m 100% sure the password is correct. I have successfully tested logging in with these credentials using a standalone Jabber client.
‘jabber show connections’ yields:
computer*CLI> jabber show connections
Jabber Users and their status:
[asterisk] my_username@gmail.com/Talk - Disconnected
----
Number of users: 1
The only other discussions about this issue that I’ve seen were reported several years ago, but I’m under the assumption that this feature works fine in recent releases. I’m running Asterisk 1.8.5, from the current Ubuntu package here on Ubuntu 11.04, with the most recent versions of libiksemel and libssl from the repo (versions 1.2 and 0.9.8, respectively). Any thoughts as to why I am not able to authenticate with Google? Is there a simpler way to achieve the desired functionality?