I guess tonight while packing I had a few too many cups of coffee so I was obviously wired and decided to sit down and write some code.  I ended up writing an XMPP / Jabber relay for ENUMPlus which I must say works pretty damn good.  Setting this all up is a three step process ;

  1. Create an account / Login to enumplus.org and click “Notifications”.  Input your XMPP user account in the form and press “Send Me Notifications!”.
  2. Copy the provided dialplan addition and paste it into /etc/asterisk/extensions_custom.conf.  Reload your dial plan of course with asterisk -rx “dialplan reload”.
  3. Add enumplus@gmail.com to your buddy list and test it out!

Here’s a screenshot to get started.

Anyway, go get signed up and test it out for yourself – it is a ton of fun!

I got an email a few days back regarding the Jabber interaction with Asteristickies with some great suggestions for future features :

Hey Greg!

Wow, watching the forum, you’re really going to town on this!  Awesome stuff.
I’ll have to install a newer build!

Perhaps you could think about a dream integration  I have for
Asterisk/Jabber IM…

Imagine this:

- You have a jabber account
- You have a PIAF box.

You build a script that does this:

1 – When an incoming call comes in to a specific DID, you get the
following Jabber text message:

You have an incoming call to NXX-XXX-XXXX from ‘John Doe’
What would you like to do?
1 – let call go to voicemail (default; same as not responding)
2 – transfer to NXX-NXXX (pre-configured number)
3 – transfer to number entered in IM
4 – TTS text you type.

So, for example, if you were sitting in a meeting and an important
call notification came in,
you could, for example, TTS “I’m in a meeting, I’ll call back in 10 minutes”
Or, if you expecting a very important client call, force a transfer to
your cell phone.  A way to
circumvent standard behaviour.

For this to work, it must all happen between the 1st ring and the
timeout to voicemail.
I think this would be a VERY awesome integration… don’t know how to
do it on linux, as I’m a
.Net Windows guy.  I’ve built a mashup on Windows + Linux but just for
concept testing.

So I decided to investigate further – this is what I came up with.

Still only a proof of concept, you can imagine how this could benefit those with mobile devices and support teams.

I have successfully rolled out call transfer and call out, next in line are TTS (almost ready) and call forward.

Want Asterisk call notifications sent to Gtalk / Jabber?  Here it is :

Tell me you do not think this is awesome.  I spent 12 hours straight fine tuning this process, it is working quite well.

This module will be release in our next release of Asterisk Stickies.  Stay tuned!

I have been looking for a simple solution to keep an eye on all of the systems I run without waiting for logwatch or until a system has been compromised.  I also wanted a way to be notified when a call hit my IVR, instead of waiting for CID on whatever device, this was my solution.

Since PHP is such a beautiful language (and I work with it every day), I dicided to write several little scripts that help me stay in the loop with my server boxes, namely Asterisk and a few web/email servers.  I used the XMPPHP Google code, yeah I know there are cmdline utils for sending IM (sendxmpp) but I wanted more control over the content as well as I needed a portable solution.

Using XMPPHP is quite simple – you do not have to be a prgrammer as you should notice what to modify and what not to touch.  My first test was to notify myself when a visitor hit one of my sites (their IP, Browser, Operating system and Referrer).  This is not the most elegant solution but it has proven to work perfectly, I am sure javascript would do a better job than iframe :


<?php
$data = "\r\nUser Agent\t\t".$_SERVER['HTTP_USER_AGENT']."
IP Address\t\t".$_SERVER['REMOTE_ADDR']."
Page\t\t".$_SERVER['HTTP_REFERER']."";
include 'xmpp/XMPP.php';
$conn = new XMPPHP_XMPP('example.com', 5222, 'notify', 'notify_password', 'xmpphp', 'rappidhost.com',
$printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO);
try {
$conn->connect();
$conn->processUntil('session_start');
$conn->presence();
$conn->message('gregory@rappidhost.com', $data);
$conn->disconnect();
} catch(XMPPHP_Exception $e) {
die($e->getMessage());
}
?>

Then all I had to do was place an iframe pointing to that script on whatever page I wanted to collect this data from :


<iframe style="width:1px; height:1px; border:none;"src="http://sip.geekhut.org"></iframe>

So now I get instant messages whenever someone visits my site that look like this :

You can imagine how this can be quite useful for real time logging of anything,  I am going to play some more and report back.