Get the list of rooms

You can install and that jitsi-meet/jitsi-meet-tokens.postinst at 4cd5be9d8b757b01573ec49fbc7a829fc3fd00b3 · jitsi/jitsi-meet · GitHub

1 Like

this what I get when I try to install it :frowning:

@damencho is this the right way to configure nginx :
I edited nginx mydomain.conf like this (/etc/nginx/sites-enabled/mydomain.conf) :

server {
listen 443 ssl;
listen [::]:443 ssl;

location = /xmpp-websocket {
proxy_pass http://localhost:5280/xmpp-websocket?prefix=$prefix&$args;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
proxy_set_header Host $http_host;
tcp_nodelay on;
location /nbConfPart {
proxy_pass htt*://localhost:5280/nbConfPart;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;

location /room {
proxy_pass htt*://localhost:5280/room;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;


sorry, I edited my problem. I actually faced a problem in net-url while implementing mod_muc_status but later succeeds anyway i guess, but had to comment out TOKEN related lines (faced problem installing). If you are still stuck in mod_muc_size i suggest you to try out mod_muc_status which will give better overview. you can just tell in that thread if you faces any problem.Thanx

Have ytou succeded installing it? it said you had to run command with crypto dir like :

luarocks-5.2 install luaossl CRYPTO_DIR=/usr/local

and for this my guess is, you will need to run below things first :

$ luarocks install luacrypto

and you already have lua-cjson installed so I dont think you will need to reinstall it.
now you all set for luajwtjitsi and then you can check by calling curl from server console to localhost whether it is working or not, if it’s working on localhost then you should bother about bypassing it to public domain through nginx. hope this helps…!

1 Like

Thank you @Fuji
I already installed luajwtjitsi

luajwtjitsi 2.0-0 is now installed in /usr/local (license: MIT

but when I want to check with :

curl http://localhost:5280/room

I got >404 Not Found
by the way this my prosody status

have you any idea ?
thank you again guys ^^

Set logs in mod_muc_size and print them in console to see the path of the execution and track where it gets the error and what you are missing by tailing prosody logs and error in realtime (both tailing logs/error and api call from localhost simultaneously) and restart prosody,jicofo,videobridge. also check these jitsi services, whether they are running ok or not.
Thats the way to track your error or any prosody module error.

1 Like

Can you please give me an example of how to set logs in mod_muc_size ?
I’m confused :confused:

I tried to set something like

log(“debug”, “getNbConfPart function”);

when I call :

function getNbConfPart()

but I got nothing on my log even when I call

curl http://localhost:5280/nbConfPart

How you check prosody log and errors?
normally in 2 tab I keep running

tail -f /var/log/prosody/prosody.log


tail -f /var/log/prosody/prosody.err

something like these and in another I run testing commands like restarting prosody/jicofo/video-bridge and keep an eye on logs/errors.
now if you look at mod_muc_size code, there you see when you curl “/room” api it calls “handle_get_room function” “/room” api call and if you inspect the “handle_get_room” function you will see that if you dont give any parameters it will response back 400 error checking url query and it is expecting “room”, “domain” and “subdomain”(optional) parameter in the url required parameters and so on. You can just read the logic and make sure you are doing right to that logic, you can even set extra logs or even delete logs from code if you need like I deleted token related checks to make my mod_muc_staus module work. you will get the effect in next prosody/jicofo/vodeo-bridge restart.

1 Like

To test I created a callTest function with static values and I added logging inside: (in mod_muc_size)

 function callTest()

        module:log('info', "call test here!");
  --create result as json
     local result_json=array();
                     part= 11,

         return { status_code = 200; body = json.encode(result_json); };
  ["GET callTest"] = function (event) return async_handler_wrapper(event,callTest) end;

then I restarted all jitsi services prosody/jicofo/vodeo-bridge and nginx :

systemctl reload prosody
systemctl restart prosody
systemctl restart jicofo
systemctl restart jitsi-videobridge2
systemctl restart nginx

and I called inside the server by :

curl http://localhost:5280/callTest

but always 404 not found :frowning: and nothing inside
/var/log/prosody/prosody.log and /var/log/prosody/prosody.err
And I was checking also /var/log/nginx/

I am not sure whether you need “event” parameter in your function or not and you did use it in api mapping but not in function defination which is wrong i guess. you can just remove it may be.
what you are seeing in prosody log/error? you can also use “error” to track messages easily if your default log level is set for not showing info level messages. you should atleast your log/error messages when you make that curl call

1 Like

I updated my code like this :

function callTest()

        module:log('error', "call test here!");

 ["GET callTest"] = function (event) return async_handler_wrapper(callTest) end;

but still nothing in log/error messages when I curl call

can you try more simply like this :

["GET testing"] = function () return "5"; end;

you can omit ‘event’ in here. where are you editing? if it is in mod_muc_size.lua then are you sure prosody is accessing it?
where is the location of your mod_muc_size.lua and what path have you set for “prosody_plugins” in /etc/prosody/conf.d/localhost.cfg.lua ?
for example, as I am loading my mod_muc_status module in localhost my /etc/prosody/conf.d/localhost.cfg.lua looks like below :

plugin_paths = { "/usr/share/jitsi-meet/resources/prosody-plugins/" }

VirtualHost "localhost"
    modules_enabled = {
    muc_mapper_domain_prefix = "conference"

dont mistake localhost.cfg.lua with your_domain.cfg.lua , as now you are trying to access prosody module functionality from localhost you must have to have VirtualHost “localhost” block (I did it by creating separate file as “localhost.cfg.lua” and adding necessary lines).

1 Like

@Fuji I replaced my get function with yours

Now I have in my localhost.cfg.lua (/etc/prosody/conf.d/localhost.cfg.lua) :

plugin_paths = { "/usr/share/jitsi-meet/resources/prosody-plugins/" }

VirtualHost "localhost"
    modules_enabled = {
    muc_mapper_domain_prefix = "conference"

And in mydomain.cfg.lua (/etc/prosody/conf.d/mydomain.cfg.lua) :

plugin_paths = { "/usr/share/jitsi-meet/prosody-plugins/" }
VirtualHost "mydomain"
   -- enabled = true -- Remove this line to enable this host
    authentication = "token"
    -- Properties below are modified by jitsi-meet-tokens package config
    -- and authentication above is switched to "token"
    -- Assign this host a certificate for TLS, otherwise it would use the one
    -- set in the global section (if any).
    -- Note that old-style SSL on port 5223 only supports one certificate, and will always
    -- use the global one.
    ssl = {
        key = "/etc/prosody/certs/mydomain.key";
        certificate = "/etc/prosody/certs/mydomain.crt";
    av_moderation_component = "avmoderation.mydomain"
    speakerstats_component = "speakerstats.mydomain"
    conference_duration_component = "conferenceduration.mydomain"
    -- we need bosh
    modules_enabled = {
        "ping"; -- Enable mod_ping
        "muc_size"; -- it's enabled here!!

but when I try to curl call curl http://localhost:5280/testing always 404 not found
it seems that I’m not accessing to the endpoint GET testing in my muc_size

I thank you for your patience :slight_smile:

when you hit the endpoint with curl what is the error/log showing in prosody.log or prosody.err? It should say what is the problem and what is missing. you must restart services too after any change in there… prosody, jicofo, video-bridge2 & Nginx(optional for now) finally.

your mod_muc_size.lua module is in the “/usr/share/jitsi-meet/resources/prosody-plugins” path right? you can try with mod_muc_status.lua . your configs look fine but something silly is causing problem (my guess is your mod_muc_size module ran into some dependency module problem which needs to be installed) which can be determined through inspecting log and errors.

Hi new to Jitsi want to figure out the number of rumes created and users login
@ile how do you run this script i saved this on text and gave it chmod +x filename and I am getting this error
root@cb-a:~# ./
./ line 1: local: can only be used in a function
./ line 2: local: can only be used in a function
./ line 3: local: can only be used in a function
./ line 6: syntax error near unexpected token local' ./ line 6: local result={};’

just for info I am able to get the info by typing this or running this as a shell script
egrep “(Created|Stopped)” /var/log/jitsi/jicofo.log |
sed -E “s/Jicofo ([0-9 :-]+).room=(.)@.(Created|Stopped)./\1 \2 \3/”


Great thanks for sharing works like a charm

Hi everyone, is there a way to get recent-list rooms info ?