Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
mahendra #1
Member since Mar 2015 · 12 posts
Group memberships: Members
Show profile · Link to this post
Subject: Unable to Config Room
Hello,

I have successfully created the room on Openfire Server, and but when i am going to edit the muc details, it sending me error Code 409.

Please find XML Logs:

  1. <iq xmlns="jabber:client" to="admin@vgwwinsvr2008/agsXMPP" id="agsXMPP_5" type="result" from="testid@conference.vgwwinsvr2008">
  2.  <query xmlns="http://jabber.org/protocol/muc#owner">
  3.     <x xmlns="jabber:x:data" type="form">
  4.       <title>Room configuration</title>
  5.       <instructions>The room "testid" has been created. To accept the default configuration, click the "OK" button. Or, modify the settings by completing the following form:</instructions>
  6.       <field var="FORM_TYPE" type="hidden">
  7.         <value>http://jabber.org/protocol/muc#roomconfig</value>
  8.       </field>
  9.       <field type="text-single" var="muc#roomconfig_roomname" label="Room Name">
  10.         <value>testid</value>
  11.       </field>
  12.       <field type="text-single" var="muc#roomconfig_roomdesc" label="Description">
  13.         <value>testid</value>
  14.       </field>
  15.       <field type="boolean" var="muc#roomconfig_changesubject" label="Allow Occupants to Change Subject">
  16.         <value>0</value>
  17.       </field>
  18.       <field type="list-single" var="muc#roomconfig_maxusers" label="Maximum Room Occupants">
  19.         <option label="10">
  20.           <value>10</value>
  21.         </option>
  22.         <option label="20">
  23.           <value>20</value>
  24.         </option>
  25.         <option label="30">
  26.           <value>30</value>
  27.         </option>
  28.         <option label="40">
  29.           <value>40</value>
  30.         </option>
  31.         <option label="50">
  32.           <value>50</value>
  33.         </option>
  34.         <option label="None">
  35.           <value>0</value>
  36.         </option>
  37.         <value>30</value>
  38.       </field>
  39.       <field type="list-multi" var="muc#roomconfig_presencebroadcast" label="Roles for Which Presence is Broadcast">
  40.         <option label="Moderator">
  41.           <value>moderator</value>
  42.         </option>
  43.         <option label="Participant">
  44.           <value>participant</value>
  45.         </option>
  46.         <option label="Visitor">
  47.           <value>visitor</value>
  48.         </option>
  49.         <value>moderator</value>
  50.         <value>participant</value>
  51.         <value>visitor</value>
  52.       </field>
  53.       <field type="boolean" var="muc#roomconfig_publicroom" label="List Room in Directory">
  54.         <value>1</value>
  55.       </field>
  56.       <field type="boolean" var="muc#roomconfig_persistentroom" label="Room is Persistent">
  57.         <value>0</value>
  58.       </field>
  59.       <field type="boolean" var="muc#roomconfig_moderatedroom" label="Room is Moderated">
  60.         <value>0</value>
  61.       </field>
  62.       <field type="boolean" var="muc#roomconfig_membersonly" label="Room is Members-only">
  63.         <value>0</value>
  64.       </field>
  65.       <field type="fixed">
  66.         <value>Note: by default, only admins can send invitations in an members-only room.</value>
  67.       </field>
  68.       <field type="boolean" var="muc#roomconfig_allowinvites" label="Allow Occupants to Invite Others">
  69.         <value>0</value>
  70.       </field>
  71.       <field type="boolean" var="muc#roomconfig_passwordprotectedroom" label="Password Required to Enter Room">
  72.         <value>0</value>
  73.       </field>
  74.       <field type="fixed">
  75.         <value>If a password is required to enter this room, you must specify the password below.</value>
  76.       </field>
  77.       <field type="text-private" var="muc#roomconfig_roomsecret" label="Password" />
  78.       <field type="list-single" var="muc#roomconfig_whois" label="Role that May Discover Real JIDs of Occupants">
  79.         <option label="Moderator">
  80.           <value>moderators</value>
  81.         </option>
  82.         <option label="Anyone">
  83.           <value>anyone</value>
  84.         </option>
  85.         <value>anyone</value>
  86.       </field>
  87.       <field type="boolean" var="muc#roomconfig_enablelogging" label="Log Room Conversations">
  88.         <value>0</value>
  89.       </field>
  90.       <field type="boolean" var="x-muc#roomconfig_reservednick" label="Only login with registered nickname">
  91.         <value>0</value>
  92.       </field>
  93.       <field type="boolean" var="x-muc#roomconfig_canchangenick" label="Allow Occupants to change nicknames">
  94.         <value>1</value>
  95.       </field>
  96.       <field type="fixed">
  97.         <value>Allow Users to register with the room</value>
  98.       </field>
  99.       <field type="boolean" var="x-muc#roomconfig_registration" label="Allow Users to register with the room">
  100.         <value>1</value>
  101.       </field>
  102.       <field type="fixed">
  103.         <value>You may specify administrators of this room. Please provide one JID per line.</value>
  104.       </field>
  105.       <field type="jid-multi" var="muc#roomconfig_roomadmins" label="Room Admins" />
  106.       <field type="fixed">
  107.         <value>You may specify additional owners for this room. Please provide one JID per line.</value>
  108.       </field>
  109.       <field type="jid-multi" var="muc#roomconfig_roomowners" label="Room Owners">
  110.         <value>admin@vgwwinsvr2008</value>
  111.       </field>
  112.     </x>
  113.  </query>
  114. </iq>
  115.  
  116. Send:
  117. <iq id="agsXMPP_6" type="set" to="testid@conference.vgwwinsvr2008">
  118.  <query xmlns="http://jabber.org/protocol/muc#owner">
  119.     <x xmlns="jabber:x:data" type="submit">
  120.       <field type="text-single" var="muc#roomconfig_roomname">Test</field>
  121.       <field type="text-single" var="muc#roomconfig_roomdesc">Testing</field>
  122.       <field type="boolean" var="muc#roomconfig_changesubject">0</field>
  123.       <field type="list-single" var="muc#roomconfig_maxusers">0</field>
  124.       <field type="list-multi" var="muc#roomconfig_presencebroadcast">visitor</field>
  125.       <field type="boolean" var="muc#roomconfig_publicroom">1</field>
  126.       <field type="boolean" var="muc#roomconfig_persistentroom">0</field>
  127.       <field type="boolean" var="muc#roomconfig_moderatedroom">0</field>
  128.       <field type="boolean" var="muc#roomconfig_membersonly">0</field>
  129.       <field type="boolean" var="muc#roomconfig_allowinvites">0</field>
  130.       <field type="boolean" var="muc#roomconfig_passwordprotectedroom">0</field>
  131.       <field type="list-single" var="muc#roomconfig_whois">anyone</field>
  132.       <field type="boolean" var="muc#roomconfig_enablelogging">0</field>
  133.       <field type="boolean" var="muc#roomconfig_reservednick">0</field>
  134.       <field type="boolean" var="muc#roomconfig_canchangenick">1</field>
  135.       <field type="boolean" var="muc#roomconfig_registration">1</field>
  136.       <field type="boolean" var="muc#roomconfig_roomowners">admin@vgwwinsvr2008</field>
  137.     </x>
  138.  </query>
  139. </iq>
  140.  
  141. Recv:
  142. <iq xmlns="jabber:client" to="admin@vgwwinsvr2008/agsXMPP" id="agsXMPP_6" type="error" from="testid@conference.vgwwinsvr2008">
  143.  <query xmlns="http://jabber.org/protocol/muc#owner">
  144.     <x xmlns="jabber:x:data" type="submit">
  145.       <field var="muc#roomconfig_roomname" type="text-single">Test</field>
  146.       <field var="muc#roomconfig_roomdesc" type="text-single">Testing</field>
  147.       <field var="muc#roomconfig_changesubject" type="boolean">0</field>
  148.       <field var="muc#roomconfig_maxusers" type="list-single">0</field>
  149.       <field var="muc#roomconfig_presencebroadcast" type="list-multi">visitor</field>
  150.       <field var="muc#roomconfig_publicroom" type="boolean">1</field>
  151.       <field var="muc#roomconfig_persistentroom" type="boolean">0</field>
  152.       <field var="muc#roomconfig_moderatedroom" type="boolean">0</field>
  153.       <field var="muc#roomconfig_membersonly" type="boolean">0</field>
  154.       <field var="muc#roomconfig_allowinvites" type="boolean">0</field>
  155.       <field var="muc#roomconfig_passwordprotectedroom" type="boolean">0</field>
  156.       <field var="muc#roomconfig_whois" type="list-single">anyone</field>
  157.       <field var="muc#roomconfig_enablelogging" type="boolean">0</field>
  158.       <field var="muc#roomconfig_reservednick" type="boolean">0</field>
  159.       <field var="muc#roomconfig_canchangenick" type="boolean">1</field>
  160.       <field var="muc#roomconfig_registration" type="boolean">1</field>
  161.       <field var="muc#roomconfig_roomowners" type="boolean">admin@vgwwinsvr2008</field>
  162.     </x>
  163.  </query>
  164.  <error type="cancel" code="409">
  165.     <conflict xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
  166.  </error>
  167. </iq>

Please check , and help me

Thanks
This post was edited on 2015-04-05, 20:58 by Alex.
Avatar
mahendra #2
Member since Mar 2015 · 12 posts
Group memberships: Members
Show profile · Link to this post
Hello,

I am using agsxmpp library.

Thanks
Avatar
Alex #3
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you submit the form wrong.

You always have:

  1. <field type="text-single" var="muc#roomconfig_roomname">Test</field>

it should be:
  1. <field type="text-single" var="muc#roomconfig_roomname">
  2.    <value>Test</value>
  3. </field>

see also:
http://xmpp.org/extensions/xep-0004.html

Alex
Avatar
mahendra #4
Member since Mar 2015 · 12 posts
Group memberships: Members
Show profile · Link to this post
Thanks Alex, Its Working Now!! :)
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS