Janus separates its media gateway from the transports and web interface used to control it. This older Ubuntu 18.04.4 notebook built several dependencies from source and then launched local demos.
The recorded package failure
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/repo.mongodb.org_apt_ubuntu_dists_bionic_mongodb-org_4.0_multiverse_binary-amd64_Packages
E: The package lists or status file could not be parsed or opened.
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update
The second command sequence removes cached package lists. It is a mutation of host package-manager state, not a read-only probe.
Build and inspect the gateway
sudo apt install libmicrohttpd-dev libjansson-dev libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev libopus-dev libogg-dev libcurl4-openssl-dev liblua5.3-dev libconfig-dev pkg-config gengetopt libtool automake gtk-doc-tools doxygen graphviz libnanomsg-dev cmake -y --fix-missing
# Install libnice
cd ~
git clone https://gitlab.freedesktop.org/libnice/libnice
cd libnice
./autogen.sh
./configure --prefix=/usr
make && sudo make install
# Install libsrtp2
cd ~
wget https://github.com/cisco/libsrtp/archive/v2.2.0.tar.gz
tar xfv v2.2.0.tar.gz
cd libsrtp-2.2.0
./configure --prefix=/usr --enable-openssl
make shared_library && sudo make install
# Install usrsctp
cd ~
git clone https://github.com/sctplab/usrsctp
cd usrsctp
./bootstrap
./configure --prefix=/usr && make && sudo make install
# Install libwebsockets
cd ~
git clone https://libwebsockets.org/repo/libwebsockets
cd libwebsockets
# If you want the stable version of libwebsockets, uncomment the next line
# git checkout v2.4-stable
mkdir build
cd build
# See https://github.com/meetecho/janus-gateway/issues/732 re: LWS_MAX_SMP
cmake -DLWS_MAX_SMP=1 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS="-fpic" ..
make && sudo make install
# Install MQTT C
cd ~
git clone https://github.com/eclipse/paho.mqtt.c.git
cd paho.mqtt.c
make && sudo prefix=/usr make install
# Install RabbitMQ
cd ~
git clone https://github.com/alanxz/rabbitmq-c
cd rabbitmq-c
git submodule init
git submodule update
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make && sudo make install
# Install janus
cd ~
git clone https://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure --prefix=/opt/janus
make
sudo make install
sudo make configs
Source: Janus Gateway. Unpinned source checkouts do not provide a reproducible dependency set.
The configuration and start references were:
/opt/janus/etc/janus/janus.jcfg
sudo /opt/janus/bin/janus
# run background: https://janus.conf.meetecho.com/docs/service.html
# or use multi terminal
screen -S janus -d -m
screen -r janus
[CTRL+A+D to detach again]
Separate the transports
localhost:8088/janus
# Get server info
http://localhost:8088/janus/info
localhost:8188
The source also generated a self-signed certificate and configured HTTPS on port 8089. Its advice to switch browsers when certificate validation failed is omitted: changing browsers does not establish a trusted certificate or correct hostname.
Serve the demo separately
npm install -g local-web-server
cd janus-gateway/html
ws --http2
# Test at https://127.0.0.1:8000
# Note: You need to modify janus server point to your server address on specific js demo file. Such as: videocalltest.js
The demo’s web server, gateway API, WebSocket transport, and media connectivity are separate checks. No dependencies were installed, certificates generated, or calls made for this revision.