Asterisk XMPP + GTalk

From 2l2oWiki

Jump to: navigation, search

Background

Asterisk 1.4 features an implementation of XMPP messaging and GTalk voice. This guide will give you a working install of the modules and some examples.

This guide picks up from the Asterisk without Tricks guide, but should work on any Redhat based systems.


Install

1. Install the required dependencies:


yum -y install autoconf imake libtool automake libgcrypt-devel libgpg-error-devel gnutls-devel


2. Install iksemel:


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


cd iksemel

./configure

make

make check

make install


3. Recompile Asterisk for Jabber and GTalk support:


cd /usr/src/asterisk-1.4.x

./configure

make install


4. Edit Config files:


/etc/asterisk/gtalk.conf


[general]

context=google-in

allowguest=yes


[guest]

disallow=all

allow=ulaw

context=google-in


[asterisk]

username=user@xmppdomain.com

disallow=all

allow=ulaw

context=google-in

connection=jabber_user


/etc/asterisk/jabber.conf


[general]

debug=yes

autoprune=no

autoregister=no


[jabber_user]

type=client

serverhost=xmppdomain.com

username=user@xmppdomain.com

secret=userpassword

port=5222

usetls=no

usesasl=no

buddy=usersbuddy@xmppdomain.com ; Add extra lines for extra buddies

statusmessage="This is an Asterisk server"

timeout=100


/etc/asterisk/extensions.conf (or /etc/asterisk/extensions_custom.conf for FreePBX)


[google-in]


exten => s,1,NoOp( Call from GTalk )

exten => s,n,Set(CALLERID(name)="From Google Talk")

exten => s,n,Dial(SIP/somephone,20,tr)


[google-out]


exten => 200,1,Dial(Gtalk/jabber_user/buddy@gmail.com) ; Dialout example

exten => 201,1,JABBERSend(jabber_user,buddy@gmail.com, ZOMG, IM'ing from my PBX is COOL!)


exten => 202,1,JabberStatus(jabber_user,buddy@gmail.com,STATUS)

exten => 202,2,GotoIf($[${STATUS}<6]?3:5)

exten => 202,3,JABBERSend(jabber_user,buddy@gmail.com, Hi buddy ${CALLERID(name)} at Ext. ${CALLERID(num)} is calling you.) exten => 202,4,Dial(Gtalk/jabber_user/buddy@gmail.com)

exten => 202,5,Voicemail(6XXX,u)

Personal tools