powered by Jive Software

Beta Asterisk-IM Plugin

There has been some headway in the Asterisk-IM development and we now have a beta for testing.

It only works with Openfire 3.3.0 which can be downloaded from here

The beta asterisk-im.jar is located here

This appears to me to have fixed many of the problems people were having with asterisk-im before. Please give it a try and let us know if it fixes your problems.

Message was edited by: toddejohnson

Whooo! Very exciting to see progress already.


Wow! Thank you so much for your work on this!! I was able to upgrade to openfire and the beta asterisk-im last night. I just made a few calls and at first glance it seems like presence updates are working perfectly (changing to On the Phone, then back to my previous status when the call is done).

Thank you indeed! I just upgraded to 3.3.0Beta in my development environment and the revised Asterisk-IM plugin is working very well here. I use (or rather, will use once we go into production) the queue presence feature and it works a charm now.

Now that I’'ve praised you, of course I have a feature request…

One thing for us is that we use Local channels in Asterisk for our queue members (for not the least of which reason that the phones actually register to OpenSER, but I digress). Unfortunately, it means that for an unmodified version of Asterisk we have to add /n at the end of the channel or else it gets masqueraded out and the queue member is shown as not in use (and hence Asterisk will try to deliver calls to an agent on a call). When we do that, the Asterisk-IM plugin no longer sees the created channels (whose names are always Local/exten@context-xxx or so) as being matched to the configuration of the agents (whose channels are configured with the /n so that the PauseQueueMember and UnpauseQueueMember actions will add them with it) and the On the Phone status is never set. If that could be changed, it would be excellent.

The workaround is to modify chan_local.c so that it never masquerades even if /n isn’‘t in the dialstring and then configure the agents to not have /n, but it’'s yet another patch I have to maintain (there are already quite a few).

Anyway, just thought I’'d mention it.

Thanks again for all the work to stabilize this and get it working, and rapidly at that. It seems a short time since it was announced that some folks stepped up to maintain the plugin.

Thanks for the encouraging feedback!

As a work around can you configure an addtional channel for your agents (i.e. the Local/ channel without /n)?

If you mark it non-primary it is only used for presence detection so your actions should still work.

With the normal database schema, I can see that this would be at least a possible solution. Unfortunately, in our case, the tables are actually views of other tables on our MySQL Cluster for which the username is a primary key. So that wouldn’'t work for us.

The patch to chan_local.c is trivial when it comes down to it, but I was just trying to explain my usage and see what you and others might think. The fewer out-of-tree patches I have to maintain, the happier I am.

Has anyone tried this beta plugin using an embedded database?

It appears to not be able to correctly update the database.

Every time I try to save the server configuration, it stores in session (and I can see the manager register on the Asterisk side), but nothing is written to the database.

Don’'t know if this is a known issue or not. I am now trying it with mysql to see if the issue resolves itself or not.

Just a heads up!


As an update to my last post, it does indeed work correctly using MYSQL rather than an embedded database.

Hope that helps.


Hi Josh,

can you retry it with the internal db and the new “official” beta version from the beta plugins page?


I upgraded to Openfire 3.3.0 and installed this plugin I’'ve tried the jar posted here and from the official beta downloads page. I was previously using it on Wildfire 3.0.x

I get the Asterisk-IM tab. I also can see in my Asterisk console that the manager is logging in.

Unfortunately clicking the Asterisk-IM tab in the Openfire manager does nothing… the browser spins forever. It doesn’'t even time out.

Any ideas?

My error log says:

2007.04.14 16:28:48 org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java: 380) asterisk-im - Database update failed. Please manually upgrade your database.

among other things about Asterisk…

We need some more information to find the source for this problem:

  • the database are you running (MySQL, PostgreSQL, embedded, …)

  • the version of the db schema you are using (run SELECT * FROM jiveVersion WHERE name=’‘asterisk-im’’, should be something in the range 0-2)

  • the structure of your phone tables (e.g. on MySQL use DESCRIBE phoneServer, DESCRIBE phoneUser and DESCRIBE phoneDevice)

I’‘ve opened an issue for the Local/XXX/n channel improvement: PHONE-57 it’'s scheduled for 1.4.0

Hi Stephan,

We are having the same problem as Josh. We tried using the official beta but then we get “Database update failed. Please manually upgrade your database”.

Can you provide the answers to my questions above?

I must know at least what database you are running to have a look at it…

As a work around you can try to drop the phoneXXX tables and create new phone mappings.

Hi Stephan,

The problem happens only when you run the embedded database - we tried both the “official” beta and the one listed at the beginning of this thread, but the beta does not work at all with embedded database.

We’'ve since switched to PostGreSQL which has worked okay today (enterprise generally seems a bit flakier than the Wildfire we were using though).

Does that help?

Yes that helps, it means I have to try it with an Openfire installation that uses the embedded database, I am usually using MySQL for my Openfire installation so I didn’'t encounter the problem.

Sorry for the problems, I just have to get used to supporting the whole rage of Openfire supported databases.

I’'m using the MySQL database and having the same problems.