So after following all the guides I could find, I had XMPP handling state information for my asterisk boxes, but then I wanted to add another server to the mix.

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

Here's the details derived from http://xmpp.org/extensions/xep-0060.html#owner-affiliations

So, to query the current affiliations I ran:

<iq type='get' from='server1@xmpp.domain.tld/astvoip01'
to='pubsub.xmpp.domain.tld'
id='ent1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
<affiliations node='device_state'/>
</pubsub>
</iq>

The reply contained the following:

<iq from="pubsub.xmpp.domain.tld" type="result" id="ent1" to="server1@xmpp.domain.tld/astvoip01">
<pubsub xmlns="http://jabber.org/protocol/pubsub#owner">
<affiliations node="device_state">
<affiliation affiliation="owner" jid="server3@xmpp.domain.tld"/>
<affiliation affiliation="owner" jid="server1@xmpp.domain.tld"/>
</affiliations>
</pubsub>
</iq>

So, for example, we need to make it so that server2 can play too, so according to the spec we only send the modifications, so we just need to add the missing buddy.

<iq type='set' from='server1@xmpp.domain.tld/astvoip01' to='pubsub.xmpp.domain.tld' id='ent2'>
<pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
<affiliations node='device_state'>
<affiliation jid="server2@xmpp.domain.tld" affiliation="owner"/>
</affiliations>
</pubsub>
</iq>

and then we receive the reply:

<iq from="pubsub.xmpp.domain.tld" type="result" id="ent2" to="server1@xmpp.domain.tld/astvoip01"/>

Now if we run the original "get" we get all three in the list.

So, I guess extrapolating that, it could either be a new CLI command, something like xmpp add affiliation <buddy> or it could be added to the startup procedure for the res_xmpp.so so that all of our buddies have ownership over device_state and message_waiting nodes.

And on the client side if we could put in something like
res_xmpp.c:1397 xmpp_pubsub_handle_error: Error performing operation on PubSub node device_state, 403 -- add affiliations from exisiting xmpp account
instead of
res_xmpp.c:1397 xmpp_pubsub_handle_error: Error performing operation on PubSub node device_state, 403.

it would give users a direction to resolve that error.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>