Problem requesting an instant room

Hi,

I am developing a chat application using an Openfire server. I am reading this specification but I have a problem trying to create an instant room. Sample code is:

<iq from='crone1@shakespeare.lit/desktop' id='create1'to='darkcave@chat.shakespeare.lit' type='set'>
  <query xmlns='http://jabber.org/protocol/muc#owner'>
    <x xmlns='jabber:x:data' type='submit'/>
  </query>
</iq>

And my code is:

<iq to='newroom@conference.ftone.eu' from='diego@ftone.eu' id='H_3' type='set'>
     <query xmlns='http://jabber.org/protocol/muc#owner'>
          <x xmlns='jabber:x:data' type='submit'/>
     </query>
</iq>

But the answer is:

<iq type="error" id="H_3" from="newroom@conference.ftone.eu" to="diego@ftone.eu/c88367dc">
     <query xmlns="http://jabber.org/protocol/muc#owner">
          <x xmlns="jabber:x:data" type="submit"/>
     </query>
     <error code="401" type="auth">
          <not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
     </error>
</iq>

Service ‘conference’ in server ‘ftone.eu’ has the room creation permissions set to ‘’, so I do not understad what is wrong in my code or configuration. Could anybody help me?

Thanks in advance.

Has not anybody had this problem? I will copy the entire trace:

SEND: <stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='ftone.eu' version='1.0'>
RECV: <?xml version='1.0' encoding='UTF-8'?>
          <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="ftone.eu" id="8b03e62d" xml:lang="en" version="1.0">
               <stream:features>
                    <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls">
                    </starttls>
                    <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
                         <mechanism>DIGEST-MD5</mechanism>
                         <mechanism>PLAIN</mechanism>
                         <mechanism>ANONYMOUS</mechanism>
                         <mechanism>CRAM-MD5</mechanism>
                    </mechanisms>
                    <compression xmlns="http://jabber.org/features/compress">
                         <method>zlib</method>
                    </compression>
                    <auth xmlns="http://jabber.org/features/iq-auth"/>
                    <register xmlns="http://jabber.org/features/iq-register"/>
               </stream:features>
SEND: <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
RECV: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
SEND: <stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='ftone.eu' version='1.0'>
RECV: <?xml version='1.0' encoding='UTF-8'?>
          <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="ftone.eu" id="8b03e62d" xml:lang="en" version="1.0">
          <stream:features>
               <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
                    <mechanism>DIGEST-MD5</mechanism>
                    <mechanism>PLAIN</mechanism>
                    <mechanism>ANONYMOUS</mechanism>
                    <mechanism>CRAM-MD5</mechanism>
               </mechanisms>
               <compression xmlns="http://jabber.org/features/compress">
                    <method>zlib</method>
               </compression>
               <auth xmlns="http://jabber.org/features/iq-auth"/>
               <register xmlns="http://jabber.org/features/iq-register"/>
          </stream:features>
SEND: <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='DIGEST-MD5'/>
RECV: <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cmVhbG09ImZ0b25lLmV1Iixub25jZT0iZEoxODk3bWlzSTVhS084S2hXSG9qRXd1VkFFMUg0Wnl4MTQrQitjViIscW9wPSJhdXRoIixjaGFyc2V0PXV0Zi04LGFsZ29yaXRobT1tZDUtc2Vzcw==</challenge>
SEND: <response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>dXNlcm5hbWU9ImRpZWdvIixub25jZT0iZEoxODk3bWlzSTVhS084S2hXSG9qRXd1VkFFMUg0Wnl4MTQrQitjViIsY2hhcnNldD11dGYtOCxyZWFsbT0iZnRvbmUuZXUiLHFvcD1hdXRoLGNub25jZT0iMGUyOTU2OGY5MjNkODY0YjU0Zjk2MjAzYjkzZTZlNzAiLG5jPTAwMDAwMDAxLGRpZ2VzdC11cmk9InhtcHAvZnRvbmUuZXUiLHJlc3BvbnNlPWJiMWU2MWZiZmJmNWNjNTJmMWZiOWQxZTRkZjE1MmU1</response>
RECV: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl">cnNwYXV0aD02YzRkNGIxYjRiYTY0NGIxNmIzZjZjNGUwYWY5NTg4Zg==</success>
SEND: <stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='ftone.eu' version='1.0'>
RECV: <?xml version='1.0' encoding='UTF-8'?>
          <stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="ftone.eu" id="8b03e62d" xml:lang="en" version="1.0">
          <stream:features>
               <compression xmlns="http://jabber.org/features/compress">
                    <method>zlib</method>
               </compression>
               <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/>
               <session xmlns="urn:ietf:params:xml:ns:xmpp-session"/>
          </stream:features>
SEND: <iq type='set' id='H_0'>
          <bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'/>
      </iq>
RECV: <iq type="result" id="H_0" to="ftone.eu/8b03e62d">
          <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
               <jid>diego@ftone.eu/8b03e62d</jid>
          </bind>
      </iq>
SEND: <iq type='set' id='H_1'>
          <session xmlns='urn:ietf:params:xml:ns:xmpp-session'/>
      </iq>
RECV: <iq type="result" id="H_1" to="diego@ftone.eu/8b03e62d">
          <session xmlns="urn:ietf:params:xml:ns:xmpp-session"/>
      </iq>
SEND: <presence id='H_2'>
          <status>Online</status>
      </presence>
SEND: <iq to='newroom@conference.ftone.eu' from='diego@ftone.eu' id='H_3' type='set'>
          <query xmlns='http://jabber.org/protocol/muc#owner'>
               <x xmlns='jabber:x:data' type='submit'/>
          </query>
      </iq>
RECV: <iq type="error" id="H_3" from="newroom@conference.ftone.eu" to="diego@ftone.eu/8b03e62d">
          <query xmlns="http://jabber.org/protocol/muc#owner">
               <x xmlns="jabber:x:data" type="submit"/>
          </query>
          <error code="401" type="auth">
               <not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
          </error>
      </iq>
...
SEND: </stream:stream>
RECV: </stream:stream>

Greetings, Diego Gomez Olvera.

I have tried to request an unique room name. I have send this request:

<iq to="conference.ftone.eu" from="diego@ftone.eu" id="H_2" type="get">
     <unique xmlns="http://jabber.org/protocol/muc#unique" />
</iq>

But server do not response. However, if I change the request to:

<iq to="ftone.eu" from="diego@ftone.eu" id="H_2" type="get">
     <unique xmlns="http://jabber.org/protocol/muc#unique" />
</iq>

The response is:

<iq type="error" id="H_2" from="ftone.eu" to="diego@ftone.eu/5950aa79">
     <unique xmlns="http://jabber.org/protocol/muc#unique" />
     <error code="501" type="cancel">
          <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
     </error>
</iq>

Last response is pretty logical, but first one is very strange. Does anybody know why it happens?

Greetings, Diego Gomez Olvera.

Yes, I have the exact same problems with both creating an instant room and a unique name. I have not found a solution yet. Please post back if you find one please.

Hi,

if you want to create an instant room you must first create a room before configuring an instant room. This means you first have to send a presence to room@service/nick (see XEP-0045, Creating a room) before you can “accept the default room configuration (i.e., create an instant room)” by sending your IQ stanza.

For the request of an unique room name in XEP-0045, Requesting a Unique Room Name is written: “If a service does support this feature, it MUST return a feature of “http://jabber.org/protocol/muc#unique” in its response to service discovery information requests.” But the Openfire MUC implementation doesn’t return this feature.

But you’re right no response to your request is a bad response, maybe a bug ticket should be added that there exists a missing feature-not-implemented error response.

Best regards

Thanks. That solved it!! At least the first part.