I am new to Jitsi, but I have been able to get setup with self-hosting Jitsi Meet (along with the backend JVB, Jicofo, etc), and I am trying to figure out a way for my app server to monitor how many people are in a meeting. Ideally, this would be done with a RESt api, either my app server polls Jitsi or Jitsi calls a method when a user joins or leaves. Has anyone accomplished this in the past, or have any guidance/suggestions on how to go about it?
If you just need to know the number of room occupants at a specific point in time, then metadata’s suggestion above would be the way to go.
If you need an actual list of participants, the only way I know (which doesn’t say much ) is to make your REST API calls from a prosody modules.
The simplest would be to add you call to the speaker_stats function in /usr/share/jitsi-meet/prosody_plugins/ext_events.lib.lua. This will get called at the end of a meeting, and
the speakerStats argument will contain details of all meeting participants.
If you need more real-time information, e.g. API calls each time user leaves or joins, you will need to write your own prosody component and hook into the muc-occupant-joined and muc-occupant-pre-leave events.
I also want to call a rest API to clear some data in DB when the meeting ends.
I tried giving my API URL in the event_sync , mod_reservations.lua and also in speaker_stats in ext_events.lib.lua . But could not trigger the API. Is there any other prosody module that I could use.
what might be the reason that my API did not trigger?
You have tried it with three different prosody modules, and we have already established several times in various posts and PM that API calls are being made successfully from the prosody modules when a different API URL is used; so the issue is your API and simply using “another prosody module” is not going the solve the problem.
The problem you are facing is very likely down to how your endpoint is set up, or how your API request is being routed.
In our last encounter, it looked like you might be calling an endpoint that relies on HTTP redirects. Did you follow up on that?
Also, please do stop asking the same question across multiple thread. Especially when you and your colleage have already opened multiple threads on the same topic and abandoned them - 1, 2, 3, 4
Yes, we followed that . Now we are able to trigger the API endpoint URL from Prosody . We gave the API URL outside the speaker_stats function in ext_events.lib.lua . I think I had issues since I have not hooked any of the MUC components in speaker_stats function.
Now I need to get the jid to make my requirement complete.