4

I have an application which needs to register an ejabberd user when the normal registration process takes place. I handled this using the ejabberdctl register command.

Similarly, I need to add some users to an MUC group therefore, I need to create a group using php/command line.

I found the ejabberdctl create_room does what I need but I can't seem to make it work.

I used this:

sudo ejabberdctl create_room testRoom conference.localhost conference.localhost

But this prints out a stacktrace. I have enabled mod_muc_admin

Stacktrace when using ejabberdctl create_room

Now, the create_room command takes 3 arguments namely, name, service and host.

I can't seem to figure out this service parameter.

Any help will be greatly appreciated. Have spent a whole day on this!

P.S. I am using Ubuntu 14.04 x64 and ejabberd 15.07

Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
SuperNOVA
  • 721
  • 7
  • 15

1 Answers1

10

The parameters are described on mod_muc_admin documentation page:

ejabberdctl create_room room_name muc_service xmpp_domain

Parameters are as follow:

  • room_name: actual chat room name
  • muc_service_name: usually "conference.YOURXMPPDOMAIN"
  • xmpp_domain: The main domain of your service.

For example in your case, it should be:

bin/ejabberdctl create_room testRoom conference.localhost localhost
Mickaël Rémond
  • 9,035
  • 1
  • 24
  • 44
  • Thanks a lot Mickael, was stuck for a long time! :) – SuperNOVA Aug 07 '15 at 05:28
  • I now want to add users(not invite) to a certain room I made, but I can't seem to find any command in the documentation or module for the same. Are you aware of something that can help? – SuperNOVA Aug 07 '15 at 08:46
  • 1
    You can change affiliations and there is a method for that on that module. However XMPP MUC protocol is presence based so to actually joing the room, the user need to send a presence to that room. It is needed because as it is designed, MUC rooms requires an active user session. – Mickaël Rémond Aug 07 '15 at 08:48