Tools for inspecting a running Jitsi Meet deployment, e.g. counting the participants in a room from its URL.
Project description
inspect-jitsi
Tools for inspecting a running Jitsi Meet deployment.
Command Line API
The command line requires installing inspect-jitsi[cli].
First, join or leave the room at meet.hosted.quelltext.eu/inspect-jitsi. Then run the commands:
inspect-jitsi count https://meet.hosted.quelltext.eu/inspect-jitsi
inspect-jitsi participants https://meet.hosted.quelltext.eu/inspect-jitsi
inspect-jitsi diagnose https://meet.hosted.quelltext.eu/inspect-jitsi
inspect-jitsi created https://meet.hosted.quelltext.eu/inspect-jitsi
| Command | Prints | Exit code |
|---|---|---|
count <url> |
number of participants | 0, or 1 on failure |
participants <url> |
participants as indented JSON | 0, or 1 on failure |
diagnose <url> |
connectivity/auth report as indented JSON | 0, or 1 on failure |
created <url> |
nothing (use --json to print true/false) |
0 if the room exists, 1 if not, 2 on failure |
count/participants fall back to running diagnose and printing its report
to stderr if they fail, to help explain why (e.g. a token being required).
Python API (Sync)
from inspect_jitsi import (
get_participant_count,
get_participants,
diagnose_jitsi_access,
is_room_created,
)
get_participant_count("https://meet.example.com/SomeRoomName") # -> 2
get_participants("https://meet.example.com/SomeRoomName") # -> [Participant(...), ...]
diagnose_jitsi_access("https://meet.example.com/SomeRoomName") # -> DiagnosisResult(...)
is_room_created("https://meet.example.com/SomeRoomName") # -> True
| Function | Returns |
|---|---|
get_participant_count(url, nick=None, ...) |
int |
get_participants(url, nick=None, ...) |
list[Participant] |
diagnose_jitsi_access(url, ...) |
DiagnosisResult |
is_room_created(url, ...) |
bool |
Participant and DiagnosisResult are dataclasses with .to_dict() (and
Participant also has .to_json()) for easy serialization. Participant
carries jid, nick, name (display name, if disclosed), role,
affiliation, real_jid, and occupant_id.
Python API (Async)
For anything beyond a single one-shot call - e.g. holding a room open and
polling it repeatedly - use JitsiConference directly instead of the sync
wrappers above; it's fully async/await:
import asyncio
from inspect_jitsi import JitsiConference
async def main():
async with JitsiConference("https://meet.example.com/SomeRoomName") as conference:
print(await conference.is_created()) # -> True, without joining
print(await conference.get_participants())
asyncio.run(main())
How it works
We try joining the room as a participant and inspect who is there.
Jitsi's prosody deployment locks down disco#info on MUC rooms to
occupants only (confirmed live: a bare disco#info query gets
<error type="auth"><forbidden/></error>), so the usual XEP-0045 "peek
without joining" trick doesn't work here. Instead, JitsiXmppConnection
briefly joins the room as a real (if anonymous) occupant over an XMPP
connection carried by WebSocket (the same wss://<domain>/xmpp-websocket
endpoint the web client itself uses), reads the roster of <presence>
stanzas the MUC sends back, then leaves - meaning the room briefly gains
(and loses) one occupant, and other participants may see a transient
join/leave notification.
No Python XMPP library (slixmpp, aioxmpp, ...) supports the WebSocket
transport Jitsi requires - they're TCP-only, and Jitsi deployments generally
don't expose raw XMPP client-to-server (port 5222) publicly - so
inspect_jitsi.xmpp.connection hand-rolls the small slice of RFC 6120
(stream/SASL/bind) and RFC 7395 (XMPP over WebSocket framing) needed to join
a MUC room.
jicofo (the conference focus component) also joins every active Jitsi
conference's MUC as a pseudo-participant nicknamed focus - that occupant
is filtered out so participant counts/lists reflect only humans.
Deployments (e.g. docker-jitsi-meet) commonly use an internal XMPP domain
(typically meet.jitsi) and MUC component (typically muc.meet.jitsi) that
differ from the public hostname in the URL - the public web server proxies
the WebSocket through, but the XMPP stream's to attribute and the MUC room
JID must use the internal names. discover_hosts figures these out
automatically by reading the site's public /config.js (the same file the
browser client itself relies on), rather than guessing.
Installing
pip install -e . # Python API only
pip install -e ".[cli]" # + the inspect-jitsi command line tool
pip install -e ".[test]" # + test dependencies
Testing
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inspect_jitsi-0.0.1.tar.gz.
File metadata
- Download URL: inspect_jitsi-0.0.1.tar.gz
- Upload date:
- Size: 37.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2ef65edc1b2742575f29e6b5348da4a7de6b22fcc970d7895fcb20b82ab4a69
|
|
| MD5 |
6701f2fc8726695ba776491ec7d67b49
|
|
| BLAKE2b-256 |
27c6d6992daf0db7989f7ff4b6e97f22955594de8c441491ecd1433e3f455ae0
|
Provenance
The following attestation bundles were made for inspect_jitsi-0.0.1.tar.gz:
Publisher:
tests.yml on niccokunzmann/inspect-jitsi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inspect_jitsi-0.0.1.tar.gz -
Subject digest:
c2ef65edc1b2742575f29e6b5348da4a7de6b22fcc970d7895fcb20b82ab4a69 - Sigstore transparency entry: 2217100423
- Sigstore integration time:
-
Permalink:
niccokunzmann/inspect-jitsi@6aaaf367d79658687f57100c61381e8ee325faa1 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/niccokunzmann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
tests.yml@6aaaf367d79658687f57100c61381e8ee325faa1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file inspect_jitsi-0.0.1-py3-none-any.whl.
File metadata
- Download URL: inspect_jitsi-0.0.1-py3-none-any.whl
- Upload date:
- Size: 57.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36363de1eb1dca65e960a0020ba1079c8f9a58612656f52a0186aaa874b98b34
|
|
| MD5 |
b94a10b090ca97fc74d25b5d33a0e6f7
|
|
| BLAKE2b-256 |
d1ff7cbdd7112b207e3489225cd85e817c24ec9e2d5e0fdfb54440c1707580dc
|
Provenance
The following attestation bundles were made for inspect_jitsi-0.0.1-py3-none-any.whl:
Publisher:
tests.yml on niccokunzmann/inspect-jitsi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inspect_jitsi-0.0.1-py3-none-any.whl -
Subject digest:
36363de1eb1dca65e960a0020ba1079c8f9a58612656f52a0186aaa874b98b34 - Sigstore transparency entry: 2217100457
- Sigstore integration time:
-
Permalink:
niccokunzmann/inspect-jitsi@6aaaf367d79658687f57100c61381e8ee325faa1 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/niccokunzmann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
tests.yml@6aaaf367d79658687f57100c61381e8ee325faa1 -
Trigger Event:
push
-
Statement type: