System information
Compiling Jabber Support into Asterisk
The res_jabber module contains various dialplan applications and functions that are
useful from the Asterisk dialplan. It is also a dependency of the chan_gtalk and
chan_jingle channel modules. To get started with XMPP integration in Asterisk, we
need to compile res_jabber.
CentOS dependencies
To install res_jabber, we need the iksemel development library (http://code.google.com/
p/iksemel/). If the OpenSSL development library is installed, res_jabber will also utilize
that for secure connections (this is recommended). We can install both on CentOS with
the following command:
$ sudo yum install iksemel-devel openssl-devel
As always, be sure to append .x86_64 to the module names if installing
on a 64-bit machine.
Ubuntu dependencies
To install res_jabber, we need the iksemel development library. If the OpenSSL de-
velopment library is installed, res_jabber will also utilize that for secure connections
(this is recommended). We can install both on Ubuntu with the following command:
$ sudo apt-get install libiksemel-dev libssl-dev
Jabber Dialplan Commands
Several dialplan applications and functions can be used for communication using the
XMPP protocol via Asterisk. We’re going to explore how to connect Asterisk to an
XMPP server, how to send messages to the client from the dialplan, and how to route
calls based on responses to the initially sent messages. By sending a message via XMPP,
we’re essentially creating a simple screen pop application to let users know when calls
are coming to the system.
Connecting to an XMPP server
Before we can start sending messages to our XMPP buddies, we need to connect to an
XMPP-enabled server. We’re going to utilize the XMPP server at Google, as it is open
and easily accessible by anyone. To do so, we need to configure the jabber.conf file in
our /etc/asterisk/ configuration directory. The following example will connect us to the
XMPP server at Google.
Using XMPP (Jabber) with Asterisk | 419