May 14 2008

Asterisk with Google Talk

Category: AsteriskBipin Balakrishnan @ 4:04 pm

googletalk_logo.gif

Asterisk now speaks with Google Talk using the jingle protocol.(Jingle is an extension to the Jabber/XMPP protocol, to allow for peer-to-peer (p2p) signalling for multimedia interactions such as voice or video. It was designed by Google and the XMPP Standards Foundation.).We can make calls can route to and from google talk to soft phones as well as the hard phones.

Asterisk does not have in build support for this we have to install an addon for this to happen.

 svn checkout http://svn.uludag.org.tr/projeler/iksemel iksemel  

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.

Install the following depending packeges and run autogen.sh script.

sudo apt-get install libiksemel-dev
sudo apt-get install libiksemel3
sudo apt-get install libiksemel-utils
sudo apt-get install libgnutls13

Compile asterisk again after installing these packages if asterisk is installed already.

Now edit the jabber.conf file in /etc/asterisk/

[general]
 debug=yes
 autoprune=no
 autoregister=no
[gtalk_account]
 type=client
 serverhost=talk.google.com
 username=itzbipin@gmail.com/Talk
 secret=XXXXXXXX // put your gmail password here
port=5222
usetls=yes ; TLS is required by talk.google.com, you'll get a 'socket read error' without
usesasl=yes
;buddy=abc@gmail.com
statusmessage="This is my Asterisk server"
timeout=100

Now edit gtalk.conf in /etc/asterisk/

[general]
 context=google-in
 allowguest=yes
 [guest]
 disallow=all
 allow=ulaw
 context=google-in
[buddy]
 ;username=abc@gmail.com
 disallow=all
 allow=ulaw
 context=google-in
connection=gtalk_account

Now edit extension.conf for routing our calls.

[google-in] // Routing in coming calls
exten => s,1,NoOp( Call from Gtalk )
exten => s,n,Set(CALLERID(name)="From Google Talk")
exten => s,n,Dial(SIP/201) // will call a Softphone with extension 200
[google-out] // Routing outgoing calls
exten => 200,1,Dial(gtalk/gtalk_account/abc@gmail.com)

Tags: , ,

Leave a Reply