Jitsi creating and reserving a room

We are using a self-hosted version of jitsi, we have configured it with jitsi token.

We are currently attempting to generate private sessions e.g. jitsi.com/private-session-id and have two user types. One of the user types should be the admin/moderator the other user does not have any permissions and can only join once the moderator is in.

How do I create a unique room that will be reserved and used in the future by both user types (dynamically)

1 Like

You can use this or get inspired by it


Those two options dors exactly what you want, moderators only for those with jwt

Hi thanks for that! Just one more quick question - with regards to generating unique links is that possible? And if yes, how?

I don’t understand your question … The link is whatever you want.
There is no option for people waiting for host, everyone joins when they want its just that those with jwt are moderators

So far I have tried the following

const options = {
roomName: ‘RandomName’,
width: 700,
height: 400,
jwt: ‘token’,
parentNode: document.querySelector(’#meet’),
moderator: true
};
const api = new JitsiMeetExternalAPI(domain, options);

But it always give me a 404 error, so its not making the room. Do you know where the issue could be?

Thanks

No idea, looks good, check js console logs and network tab in dev tools

unfortunately, there are no issues. I tried using the public version of jitsi and it worked, but on self hosted its not working

Try the self hosted without the api first, make sure ot works with 3 tabs open, then try the iframe api

If you mean try and have 3 people on at once, I have tried that. If not, could you please clarify?

So it is working your deployment. Then use the console log to find what is not working when using the api

Hi,

I cleared /var/log/jitsi/jvb.log and the result was (see below) after trying to use the API:

Why are you looking at jvb logs when you said you are getting 404? You need to look at client logs

Oh my mistake. Is this what you mean?

Yep you need to fix origins in webserver configs

I see, could you give me some guidance on how to do that? Also thank you for the support I really appreciate it. Oh my web server is apache by the way

Check the forum there are hints for it and look how nginx set that up

Hi I looked through the forums and I setup BOSH on the server (this didn’t fix it). I was wondering whether the issue could be because of the fact that jitsi is being hosted on live.domain.com and the window is being show on domain.com.

Do you think this could be the reason?

Well I see and the 404 error on domain live… And you are passing the jwt there, is that configured in your apache?

Hi damencho,

I have two apache virtual hosts - one for domain.com (a normal web app) and live.domain.com (jitsi). By passing do you mean I need to add a proxy in the domain.com file?

Here’s the domain.com conf

<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

ServerAdmin bob@bob.com
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /var/www/domain.com/public

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
RewriteEngine on
RewriteCond %{SERVER_NAME} =domain.com [OR]
RewriteCond %{SERVER_NAME} =www.domain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

Here’s the live.domain.com (Jitsi)

<VirtualHost *:80>
ServerName live.domain.com
Redirect permanent / https://live.domain.com/
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</VirtualHost>

<VirtualHost *:443>

  ServerName live.domain.com

  # enable HTTP/2, if available
  Protocols h2 http/1.1

  SSLEngine on
  SSLProxyEngine on
  SSLCertificateFile /etc/letsencrypt/live/live.domain.com/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/live.domain.com/privkey.pem

  Header always set Strict-Transport-Security "max-age=63072000"

  DocumentRoot "/usr/share/jitsi-meet"
  <Directory "/usr/share/jitsi-meet">
Options Indexes MultiViews Includes FollowSymLinks
AddOutputFilter Includes html
AllowOverride All
Order allow,deny
Allow from all
  </Directory>

  ErrorDocument 404 /static/404.html

  Alias "/config.js" "/etc/jitsi/meet/live.domain.com-config.js"
  <Location /config.js>
Require all granted
  </Location>

  Alias "/external_api.js" "/usr/share/jitsi-meet/libs/external_api.min.js"
  <Location /external_api.js>
Require all granted
  </Location>

  ProxyPreserveHost on
  ProxyPass /http-bind http://live.domain.com:5280/http-bind/
  ProxyPassReverse /http-bind http://live.domain.com:5280/http-bind/

  RewriteEngine on
  RewriteRule ^/([a-zA-Z0-9]+)$ /index.html

   <Location /http-bind>
  Order allow,deny
  Allow from all
   </Location>
   RewriteEngine On
   RewriteRule ^/http-bind$ http://live.domain.com:5280/http-bind [P,L]

</VirtualHost>

# Mozilla Guideline v5.4, Apache 2.4.41, OpenSSL 1.1.1d, intermediate configuration, no OCSP
SSLProtocol             all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite          ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
SSLHonorCipherOrder     off
SSLSessionTickets       off

Thank you once more for your continued support.

I think your rewrite rule is not working for some reason that points to index.html but it is hard for me to understand without seeing the code as you are opening a meeting link directly, but you were talking about iframe API, so I’m still not sure what you have and what you are trying to achieve … and why is the origin error …