[jitsi-users] Max users per room


#1

Dear All

Probably this question have been answered previously, however I haven't
found any information related. How can I set the maximum users per room in
jitsi-meet? Is there any variable that I need to add to config in focus
folder?

Your help is really appreciated.

Thank you in advance,

Best regards.


#2

Hi Jack,

This must be done by a module in prosody.

Regards
damencho

Dear All

Probably this question have been answered previously, however I haven't

found any information related. How can I set the maximum users per room in
jitsi-meet? Is there any variable that I need to add to config in focus
folder?

···

On Mon, May 28, 2018 at 12:58 PM Jack Freakazoid <jfreakszoid@gmail.com> wrote:

Your help is really appreciated.

Thank you in advance,

Best regards.
_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users


#3

Hi Damencho

Thank you very much for your response. Im gonna reasearch, however any help
is welcomed.

Cheers

···

El lun., 28 de may. de 2018 3:39 PM, Damian Minkov <damencho@jitsi.org> escribió:

Hi Jack,

This must be done by a module in prosody.

Regards
damencho

On Mon, May 28, 2018 at 12:58 PM Jack Freakazoid <jfreakszoid@gmail.com> > wrote:

> Dear All

> Probably this question have been answered previously, however I haven't
found any information related. How can I set the maximum users per room in
jitsi-meet? Is there any variable that I need to add to config in focus
folder?

> Your help is really appreciated.

> Thank you in advance,

> Best regards.
> _______________________________________________
> users mailing list
> users@jitsi.org
> Unsubscribe instructions and other list options:
> http://lists.jitsi.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users


#4

Hi Damencho
I had searched it in google but not able to find out the solution of set it
in prosody server side...
I get this: https://xmpp.org/extensions/xep-0045.html#enter-maxusers
but could not determine where to set it, do you have any idea?

Cheers

···

2018-05-29 21:23 GMT+08:00 Jack Freakazoid <jfreakszoid@gmail.com>:

Hi Damencho

Thank you very much for your response. Im gonna reasearch, however any
help is welcomed.

Cheers

El lun., 28 de may. de 2018 3:39 PM, Damian Minkov <damencho@jitsi.org> > escribió:

Hi Jack,

This must be done by a module in prosody.

Regards
damencho

On Mon, May 28, 2018 at 12:58 PM Jack Freakazoid <jfreakszoid@gmail.com> >> wrote:

> Dear All

> Probably this question have been answered previously, however I haven't
found any information related. How can I set the maximum users per room in
jitsi-meet? Is there any variable that I need to add to config in focus
folder?

> Your help is really appreciated.

> Thank you in advance,

> Best regards.
> _______________________________________________
> users mailing list
> users@jitsi.org
> Unsubscribe instructions and other list options:
> http://lists.jitsi.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users


#5

Hi,

You need to implement your own prosody module (
https://prosody.im/doc/developers/modules).

module:hook("muc-occupant-pre-join", check-for-max-users, 10);
And implement check-for-max-users, where you receive as parameter the
event the stanza for joining, from where you can get the room, query the
room and number of participants and return an error in response:
origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));

Regards
damencho

Hi Damencho
I had searched it in google but not able to find out the solution of set

it in prosody server side...

I get this: https://xmpp.org/extensions/xep-0045.html#enter-maxusers
but could not determine where to set it, do you have any idea?

Cheers

Hi Damencho

Thank you very much for your response. Im gonna reasearch, however any

help is welcomed.

Cheers

Hi Jack,

This must be done by a module in prosody.

Regards
damencho

> Dear All

> Probably this question have been answered previously, however I

haven't

found any information related. How can I set the maximum users per room

in

···

On Tue, May 29, 2018 at 9:54 PM 岳永东 <yueyongdong@gmail.com> wrote:

2018-05-29 21:23 GMT+08:00 Jack Freakazoid <jfreakszoid@gmail.com>:

El lun., 28 de may. de 2018 3:39 PM, Damian Minkov <damencho@jitsi.org> escribió:

On Mon, May 28, 2018 at 12:58 PM Jack Freakazoid <jfreakszoid@gmail.com> >>> wrote:
jitsi-meet? Is there any variable that I need to add to config in focus
folder?

> Your help is really appreciated.

> Thank you in advance,

> Best regards.
> _______________________________________________
> users mailing list
> users@jitsi.org
> Unsubscribe instructions and other list options:
> http://lists.jitsi.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users


#6

Hi Damencho,
I wrote a mod_maxusers.lua in the folder
/usr/lib/prosody/modules/mod_maxusers.lua like this:

local st = require "util.stanza";
local iterators = require "util.iterartors";

function check_for_max_users(event)
    local room, stanza = event.room, event.stanza;
    local participant_count = 0;

    if room then
        local occupants = room._occupants;
        if occupants then
            participant_count = iterators.count(room:each_occupant());
        end
        log("debug", "there are %s occupants in room",
tostring(participant_count));
    else
        log("debug", "no such room exists");

    if (participant_count >= 10) then
        event.origin.send(st.error_reply(stanza, "cancel",
"service-unavailable"));
    end
end
module:hook("muc-occupant-pre-join", check_for_max_users, 10);

and add a "maxusers" in modules_enabled segment of VirtualHost in the file
"/etc/prosody/conf.d/mydomain.cfg.lua",
but it seems not to work ( I restart service of prosody but I don't see the
debug log )... where is the miss? I an new to write lua...
Thanks

Damian Minkov <damencho@jitsi.org> 于2018年5月31日周四 上午4:02写道:

···

Hi,

You need to implement your own prosody module (
https://prosody.im/doc/developers/modules).

module:hook("muc-occupant-pre-join", check-for-max-users, 10);
And implement check-for-max-users, where you receive as parameter the
event the stanza for joining, from where you can get the room, query the
room and number of participants and return an error in response:
origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));

Regards
damencho

On Tue, May 29, 2018 at 9:54 PM 岳永东 <yueyongdong@gmail.com> wrote:

> Hi Damencho
> I had searched it in google but not able to find out the solution of set
it in prosody server side...
> I get this: https://xmpp.org/extensions/xep-0045.html#enter-maxusers
> but could not determine where to set it, do you have any idea?

> Cheers

> 2018-05-29 21:23 GMT+08:00 Jack Freakazoid <jfreakszoid@gmail.com>:

>> Hi Damencho

>> Thank you very much for your response. Im gonna reasearch, however any
help is welcomed.

>> Cheers

>> El lun., 28 de may. de 2018 3:39 PM, Damian Minkov <damencho@jitsi.org> > escribió:

>>> Hi Jack,

>>> This must be done by a module in prosody.

>>> Regards
>>> damencho

>>> On Mon, May 28, 2018 at 12:58 PM Jack Freakazoid < > jfreakszoid@gmail.com> > >>> wrote:

>>> > Dear All

>>> > Probably this question have been answered previously, however I
haven't
>>> found any information related. How can I set the maximum users per room
in
>>> jitsi-meet? Is there any variable that I need to add to config in focus
>>> folder?

>>> > Your help is really appreciated.

>>> > Thank you in advance,

>>> > Best regards.
>>> > _______________________________________________
>>> > users mailing list
>>> > users@jitsi.org
>>> > Unsubscribe instructions and other list options:
>>> > http://lists.jitsi.org/mailman/listinfo/users

>>> _______________________________________________
>>> users mailing list
>>> users@jitsi.org
>>> Unsubscribe instructions and other list options:
>>> http://lists.jitsi.org/mailman/listinfo/users

>> _______________________________________________
>> users mailing list
>> users@jitsi.org
>> Unsubscribe instructions and other list options:
>> http://lists.jitsi.org/mailman/listinfo/users

> _______________________________________________
> users mailing list
> users@jitsi.org
> Unsubscribe instructions and other list options:
> http://lists.jitsi.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users


#7

Hi again,

Have you turned on debug in prosody? You can also add a debug log
before module:hook and see whether it loads on prosody restart.

I think this module must be enabled only for the appropriate component muc:
Component "conference.domain.com" "muc"
....
modules_enabled = { ..., maxusers, ...}

Regards
damencho

···

On Sun, Jun 10, 2018 at 8:42 PM 岳永东 <yueyongdong@gmail.com> wrote:

Hi Damencho,
I wrote a mod_maxusers.lua in the folder /usr/lib/prosody/modules/mod_maxusers.lua like this:

local st = require "util.stanza";
local iterators = require "util.iterartors";

function check_for_max_users(event)
    local room, stanza = event.room, event.stanza;
    local participant_count = 0;

    if room then
        local occupants = room._occupants;
        if occupants then
            participant_count = iterators.count(room:each_occupant());
        end
        log("debug", "there are %s occupants in room", tostring(participant_count));
    else
        log("debug", "no such room exists");

    if (participant_count >= 10) then
        event.origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
    end
end
module:hook("muc-occupant-pre-join", check_for_max_users, 10);

and add a "maxusers" in modules_enabled segment of VirtualHost in the file "/etc/prosody/conf.d/mydomain.cfg.lua",
but it seems not to work ( I restart service of prosody but I don't see the debug log )... where is the miss? I an new to write lua...
Thanks

Damian Minkov <damencho@jitsi.org> 于2018年5月31日周四 上午4:02写道:

Hi,

You need to implement your own prosody module (
https://prosody.im/doc/developers/modules).

module:hook("muc-occupant-pre-join", check-for-max-users, 10);
And implement check-for-max-users, where you receive as parameter the
event the stanza for joining, from where you can get the room, query the
room and number of participants and return an error in response:
origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));

Regards
damencho

On Tue, May 29, 2018 at 9:54 PM 岳永东 <yueyongdong@gmail.com> wrote:

> Hi Damencho
> I had searched it in google but not able to find out the solution of set
it in prosody server side...
> I get this: https://xmpp.org/extensions/xep-0045.html#enter-maxusers
> but could not determine where to set it, do you have any idea?

> Cheers

> 2018-05-29 21:23 GMT+08:00 Jack Freakazoid <jfreakszoid@gmail.com>:

>> Hi Damencho

>> Thank you very much for your response. Im gonna reasearch, however any
help is welcomed.

>> Cheers

>> El lun., 28 de may. de 2018 3:39 PM, Damian Minkov <damencho@jitsi.org> >> escribió:

>>> Hi Jack,

>>> This must be done by a module in prosody.

>>> Regards
>>> damencho

>>> On Mon, May 28, 2018 at 12:58 PM Jack Freakazoid <jfreakszoid@gmail.com> >> >>> wrote:

>>> > Dear All

>>> > Probably this question have been answered previously, however I
haven't
>>> found any information related. How can I set the maximum users per room
in
>>> jitsi-meet? Is there any variable that I need to add to config in focus
>>> folder?

>>> > Your help is really appreciated.

>>> > Thank you in advance,

>>> > Best regards.
>>> > _______________________________________________
>>> > users mailing list
>>> > users@jitsi.org
>>> > Unsubscribe instructions and other list options:
>>> > http://lists.jitsi.org/mailman/listinfo/users

>>> _______________________________________________
>>> users mailing list
>>> users@jitsi.org
>>> Unsubscribe instructions and other list options:
>>> http://lists.jitsi.org/mailman/listinfo/users

>> _______________________________________________
>> users mailing list
>> users@jitsi.org
>> Unsubscribe instructions and other list options:
>> http://lists.jitsi.org/mailman/listinfo/users

> _______________________________________________
> users mailing list
> users@jitsi.org
> Unsubscribe instructions and other list options:
> http://lists.jitsi.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users

_______________________________________________
users mailing list
users@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/users