XMPP Issues In Asterisk 11.6.0 For Distributed Device States…

Home » Asterisk Users » XMPP Issues In Asterisk 11.6.0 For Distributed Device States…
Asterisk Users No Comments

I have been working with distributed device states in Asterisk using XMPP
attached to an OpenFire server. I have it working well across two servers and want to roll it out across every server in my company. All servers are Asterisk 11.6.0. I am running into a problem that seems like it should be a bit easier to solve than it is seeming to be. On the third server I am rolling into this solution, I get plenty of the following:

res_xmpp.c:1398 xmpp_pubsub_handle_error: Error performing operation on PubSub node device_state, 403.

So, basically, servers 1 and 2 continue to hum along nicely updating their device state, but server 3 gets a 403 forbidden message when it tries to deal with device state. I believe this has to do with the permissions set up on the device state node. I have a small example that demonstrates the creation of a new node.

In the Asterisk CLI, I ran ‘xmpp create collection asterisk test’ on server 3, which was successful and can be seen on servers 1 and 2 with
‘xmpp list nodes asterisk’

The debug output from server 3 for this is as follows:

<--- XMPP sent to 'asterisk' --->




http://jabber.org/protocol/pubsub#owner


collection


http://jabber.org/protocol/pubsub#node_config


1


1


whitelist



<------------->

<--- XMPP sent to 'asterisk' --->






<------------->

As we can see, the first message creates the test node and sets the access model to whitelist, so only jids in the whitelist are allowed to modify it. The second message then sets the appropriate server 1 and server 2
jids to be owners, thus meeting the requirements of the whitelist.

Since these nodes are persistent, it would appear that server 3 cannot properly access device_state because it was never whitelisted when the node was created originally. I am fairly certain that I can solve this by deleting all my nodes and letting them be recreated, but that seems extreme as I put more servers into the system. Any thoughts on a better way to handle xmpp and making sure new servers can access the proper nodes?

Kevin Larsen – Systems Analyst – Pioneer Balloon Company