Starting with Asterisk 1.4, you can connect Asterisk and Google Talk, however as of now (Asterisk 1.4.4) you should consider this feature to be in beta phase, there are still quite a number of problems and glitches around.
You may want to create a new gmail account for use with Asterisk; note that for gmail you need an invitation, whereas for a pure gtalk account you don't. Jabber/Gtalk depends on iksemel so make sure you have that installed and that the jabber/jingle/gtalk channel drivers are selected (run 'make menuselect' to verify this) before compiling Asterisk 1.4
First you will need to download and install iksemel 1.2:
Note that since June 2007, iksemel is now available from code.google.com: http://code.google.com/p/iksemel/ and the svn repository below is obsolete.
Due to the recent problems, svn repository is moved away from jabberstudio.org.
To run autogen.sh you must have several packages, it will prompt you for the packages except for libgnutls-dev if you don't have this it will generate an error message in configure.
svncheckouthttp://svn.uludag.org.tr/projeler/iksemeliksemel
cdiksemel
./autogen.sh
./configure--prefix=/usr
make
makecheck
makeinstall
Iftheabovedidn'tworkforyou,trythistooifyouhavegnutlsinstalled:
cdiksemel
./configure--with-gnutls
make
makecheck
makeinstall
The iksemel deb package will most probably not work out (you see 'JABBER: socket read error' and 'jabber show connected' always shows your gtalk user as 'disconnected'), so you will need to compile from source (see above)
The iksemel package appears to do the job, at least with usetls=on in jabber.conf (as required by the server talk.google.com)
Q: I see these error message in the CLI, what is wrong? "res_jabber.c:1504 aji_recv_loop: JABBER: socket read error" and "res_jabber.c:482 aji_act_hook: gnuTLS not installed."
A1: I had installed iksemel (XML parsing library for Jabber) from an rpm package, and i guess it had been compiled without GNUTLS being included. i wrote a test program calling a gnutls function call and it failed. So I downloaded iksemel source, compiled it and ran the same test program again, and this time it returned the int value from the function call that i was expecting. Now, "jabber show connected" shows the google talk account as connected.
A2: I was getting a similar problem on ubuntu. It keep saying GnuTLS not installed. After much debugging, we checked the config.log for iksemel-1.2 and observed that the following:
checkingforlibgnutls-config
checkingforlibgnutls-version>=0.1.0
were failing. The fix was to download the source for libgnuTLS and issue a recompile
A3: This works for me, during iksemel source compilation, specify the --with-gnutls option in ./configure.
./configure--with-gnutls
make
makecheck
makeinstall
A4: This is my testing. Create test.c
$vi test.c
include <stdlib.h>
include <stdio.h>
include <iksemel.h>
int main()
{
printf("testiks_has_tls/n/r");
if(iks_has_tls())
printf("iks_has_tlsis1/n/r");
else
printf("iks_has_tlsis0/n/r");
return0;
}
$gcc -liksemel -o test test.c
run ./test if out iks_has_tls is 0, then gnutls need recompile .
$wget http://www.gnu.org/software/gnutls/releases/gnutls-1.7.15.tar.bz2
recompile gnutls
$tar -jxvf gnutls-1.7.15.tar.bz2
$cd gnutls-1.7.15
$./configure --prefix=/usr
$make
$make install
get iksemel from svn
$svn checkout http://svn.uludag.org.tr/projeler/iksemel iksemel
$cd iksemel
$./autogen.sh
$./configure --prefix=/usr --with-libgnutls-prefix=/usr --with-gnutls
$make
$make install
Then run ./test ,I get the right out "iks_has_tls is 1". Good luck!!
This is where you set your gmail/gtalk account info and will register you with the google server.
This is where the settings for the actual calls are made:
Just like SIP also gtalk (jingle) uses UDP for the media path (=audio), so you'll need to make sure your firewall is configured accordingly. The settings in rtp.conf also apply to gtalk. The gtalk/jingle signalling defaults to port 5222 tcp (how about TLS?).
Once you have established a gtalk call it is also possible to receive instant messages - as long as the other channel supports SendText(). If, for example, a Google Talk client calls a SNOM 360 via SIP and then sends a text message, that message will cause the SNOM's message LED to start blinking, and the user can read the message by pressing the Retrieve key.
Q: I call on the phone and I see an incoming call on my google talk client. Once I click answer on google talk the google talk client appears connected, though I don't hear anything on it. Meanwhile my phone keeps ringing as if the call wasn't answered. When I finally hang up the call on the phone the google talk client shows a message that the call ends. Any ideas on what's going on?
A: To fix it, you will have to add bindaddr=<the_ip_address_of_the_server_running_asterisk> to general in gtalk.conf
Thats simple, edit /etc/asterisk/modules.conf and add:
noload=>res_jabber.so
noload=>chan_gtalk.so
A timeout handling issue in the iksemel library was fixed using OpenSSL instead of GnuTLS. For the details, see : bug 9972
This also solves the reload issue experienced with the current jabber module.
It appears that as of Asterisk 1.4.11 there are still a couple of issue around with gtalk support, here's an excerpt:
update: by applying some of the patches below (marked with "update") it is possible to run a stable chan_gtalk, having both incoming and outgoing calls with good audio quality!
update:1.0.0.104isreportedtowork(sometimesrequiringarestartbeforebeingabletoconnect);checkyourversionbyright-clickingtheexecutable