Posts Tagged ‘Jabber’

I just have to write up a quick post to show you JUST HOW SIMPLE it is to get interesting events from your PBX via Jabber. Right now I’m using it to notify me of anyone trying out my test ISN number, or whenever they join my conference bridge (good reminder if I lose track of time and forget that I scheduled some people to join my conference room).

This is based on Asterisk 1.4, although the same configuration should work on 1.6, but I like to try and give 1.4 examples where I can for those of you still running 1.4.

So the first thing you need to do is configure Asterisk to connect to a Jabber server. I like to use the Google Jabber servers since it saves me from setting one up 🙂 I have setup Google Apps as well so that I can use my own domain, but using a Gmail address should work just as well.

Configuring res_jabber (the Jabber module in Asterisk) is nice and easy. The main thing to notice is that I uncommented the ‘debug’ option as the default is to have a bunch of debugging on the console. Find below the entire jabber.conf file from /etc/asterisk based on the sample file, but with the required options uncommented for connecting to talk.google.com. Note that I’ve created a Jabber account specifically for my Asterisk box, although I’m sure you could use an existing account if you wanted.

You’ll notice that I’ve added the buddy ‘leif@leifmadsen.com’ manually. In order to be able to send messages to the ‘leif@leifmadsen.com’ contact, I need to add them to the buddy list in the Asterisk memory. Once Asterisk goes to send a message via the JabberSend() application, then you will get an authorization request. Once the authorization has been granted, then you will be able to get messages.

Now that we have configured jabber.conf, lets reload the res_jabber module.

From the Asterisk CLI, run:

*CLI> module reload res_jabber.so

Then we can verify we have connected to the server correctly by running: