JID for direct connection with XMPP?

Hi! We’d like to have persistent rooms (MUCs) in Jitsi. That seems to require a moderator-type user being logged into the room eternally – fair enough. Since we want this to run on a server, not in a browser, that seems like we want a persistent XMPP connection to “hold” the room open. Later we’ll want to be able to kick problem users and open new chatrooms via XMPP, if possible.

I’ve installed Jitsi via Docker, version jitsi-meet-stable-5765-1, and hooked it up via NGinX with internal auth. That seems to work. I can log in as a guest only if a verified user is logged into the chatroom. Good.

Now to do it with no browser :slight_smile: I’ve written a very small Node.js program using Strophe to open a connection to Jitsi… And it’s failing. My code is at the bottom.

Short version: it’s failing to connect, probably because I don’t know the right JID.

Here’s the output from my error logging:

Strophe is connecting.

LOG: Websocket error [object Object]

Strophe failed to connect.

SEND: <close xmlns="urn:ietf:params:xml:ns:xmpp-framing"/>

LOG: Websocket closed unexcectedly

Strophe failed to connect.

LOG: _doDisconnect was called

Anybody have any idea what I’m doing wrong? Does my JID look reasonable? I got that URL out of the browser version of Jitsi (and of course that’s not even my test password.)

require('./strophe-1.4.2.umd.js');
var SKOTOS_SERVER = 'wss://meet.testing-14.madrubyscience.com/xmpp-websocket?room=testing';
var JID = 'skotosadmin@auth.jitsi.meet';
var PASSWORD = 'S00perS3krit';
var connection = null;

function onConnect(status)
{
  // Skipped for length
}

connection = new Strophe.Connection(SKOTOS_SERVER);
connection.connect(JID, PASSWORD, onConnect);

// Uncomment the following lines to spy on the wire traffic.
connection.rawInput = function (data) { log('RECV: ' + data); };
connection.rawOutput = function (data) { log('SEND: ' + data); };

// Uncomment the following line to see all the debug output.
Strophe.log = function (level, msg) { log('LOG: ' + msg); };

function disconnect() {
    connection.disconnect();
}

setTimeout(disconnect, 5000);

Maybe try GitHub - jitsi/jxs

I’ll give it a try. How do I find the MUC domain?

Ah, and it’s basically a stress test that randomises room names. Okay, so it’s not a client I’m just using, it’s a mini-app I’m modifying. Cool, I’ll do that. Thanks!