Statistics
| Branch: | Revision:

janus-gateway @ d97e0296

Name Size Revision Age Author Comment
  certs ba642639 over 6 years meetecho Restored markdown file describing the certifica...
  conf a9473a52 over 5 years Lorenzo Miniero Changed granularity of new Max NACK queue to mi...
  docs 33cf57b6 over 5 years Lorenzo Miniero Increase version to 0.1.1, due to recorder changes
  events 4d8c7356 over 5 years Lorenzo Miniero More events, in particular from other plugins t...
  html eb87b7ad over 5 years Andreas Girgensohn Don't warn in response to a "detached" event be...
  plugins fee76880 over 5 years Lorenzo Miniero Added outgoing SIP messages to events (to impro...
  postprocessing 1c8871ee over 5 years Lorenzo Miniero Fixed postprocessor compile error when FFmpeg v...
  transports 464495b7 over 5 years Lorenzo Miniero Allow HTTP transports to only bind to a single ...
.editorconfig 85 Bytes 126017e7 about 6 years Saúl Ibarra Corretgé Add .editorconfig file See http://editorconfig...
.gitattributes 15 Bytes f4fb2029 about 7 years Jack Leigh Autotoolize build system Set PLUGINDIR and CON...
.gitignore 688 Bytes 6c173b76 over 5 years Lorenzo Miniero Event handler plugins, first draft
CONTRIBUTING.md 1.4 KB 9355a077 over 6 years Lorenzo Miniero Documentation on how to effectively debug Janus
COPYING 34.3 KB d3c229a7 over 7 years meetecho Changed license from AGPLv3 to GPLv3
Makefile.am 10.9 KB 6c173b76 over 5 years Lorenzo Miniero Event handler plugins, first draft
README.md 14.2 KB 33cf57b6 over 5 years Lorenzo Miniero Increase version to 0.1.1, due to recorder changes
apierror.c 1.85 KB 54582a6a about 6 years Lorenzo Miniero Added possibility to limit scope of auth tokens...
apierror.h 3.28 KB 54582a6a about 6 years Lorenzo Miniero Added possibility to limit scope of auth tokens...
auth.c 6.33 KB 54582a6a about 6 years Lorenzo Miniero Added possibility to limit scope of auth tokens...
auth.h 3.37 KB 54582a6a about 6 years Lorenzo Miniero Added possibility to limit scope of auth tokens...
autogen.sh 124 Bytes c5631d7c almost 7 years meetecho Fix to autogen.sh after latest pull request #125
bower.json 987 Bytes 2a4ab6cd almost 6 years Ancor Gonzalez Sosa Use the bundled adapter.js instead of an extern...
config.c 12.4 KB 45b70d73 almost 6 years Pierce Lopez config comment stripping was off-by-one, fix an...
config.h 5.8 KB 2512456f about 6 years Lorenzo Miniero Removed dependency from libini_config, changed ...
configure.ac 15.7 KB 271a4ff9 over 5 years Lorenzo Miniero Increase version to 0.1.1, due to recorder changes
debug.h 2.87 KB 950786bd about 6 years Jay Ridgeway remove timed wait, reduce locking, tabs
dtls-bio.c 4.07 KB a470441d over 6 years Lorenzo Miniero Fixed issue in janus_dtls_bio_filter_ctrl (issu...
dtls-bio.h 1.18 KB cb50c46d over 6 years meetecho Made starting MTU value for the BIO filter conf...
dtls.c 30.1 KB 6cc64456 over 5 years Lorenzo Miniero Fixed typo
dtls.h 7.45 KB 8b8d2ccd about 6 years Lorenzo Miniero Added some timing related details to the handle...
emacs.el 574 Bytes 392491a8 over 5 years Andreas Girgensohn emacs.el to set the Janus coding style in Emacs
events.c 5.52 KB d97e0296 over 5 years Lorenzo Miniero Added queue and thread for actually broadcastin...
events.h 1.46 KB d97e0296 over 5 years Lorenzo Miniero Added queue and thread for actually broadcastin...
ice.c 147 KB 4d8c7356 over 5 years Lorenzo Miniero More events, in particular from other plugins t...
ice.h 30.6 KB c67d7b43 over 5 years Lorenzo Miniero Autodetect media from payload type if SSRC wasn...
janus-valgrind.supp 1.88 KB f82162cf almost 6 years Lorenzo Miniero Renamed valgrind suppression file (see #429)
janus.c 175 KB d97e0296 over 5 years Lorenzo Miniero Added queue and thread for actually broadcastin...
janus.ggo 3.01 KB d936d277 over 5 years Lorenzo Miniero Allow configuration of a name for the server in...
janus.h 11.2 KB 6c173b76 over 5 years Lorenzo Miniero Event handler plugins, first draft
log.c 5.51 KB cda1586e almost 6 years Lorenzo Miniero Don't close standard file descriptors, let freo...
log.h 1.83 KB 365b8c95 almost 6 years Lorenzo Miniero Redirect stdin/stdout/stderr to /dev/null (#407...
mach_gettime.h 2 KB b1c60d34 almost 7 years Yulius Tjahjadi Janus build fixes for OSX
mainpage.dox 122 KB 8a3ac742 over 5 years Lorenzo Miniero Fixed typo in docs
mutex.h 2.34 KB 632d740c about 6 years Lorenzo Miniero Removed frequent sleeps in HTTP transport module
package.json 620 Bytes 487c006b over 5 years Ferdinand Full Add janus.nojquery.js to files array at the pac...
record.c 6.46 KB b29447b1 over 5 years Lorenzo Miniero Support for other codecs and formats in recorde...
record.h 3.14 KB b29447b1 over 5 years Lorenzo Miniero Support for other codecs and formats in recorde...
rtcp.c 27.9 KB fec5a551 over 5 years Lorenzo Miniero Better management of incoming RR
rtcp.h 13.1 KB fec5a551 over 5 years Lorenzo Miniero Better management of incoming RR
rtp.h 1.41 KB 277f08a0 over 5 years Lorenzo Miniero Max number queue in seconds instead of packets,...
sctp.c 44.6 KB 2171d495 about 6 years Lorenzo Miniero Make sure we don't free the static exit message
sctp.h 7.03 KB 5dc9a256 about 6 years Lorenzo Miniero Use single GAsyncQueue for incoming/outgoing da...
sdp.c 50.1 KB c67d7b43 over 5 years Lorenzo Miniero Autodetect media from payload type if SSRC wasn...
sdp.h 4.54 KB 6dd1c12c about 7 years meetecho Several fixes Improved DTLS timer and retransmi...
turnrest.c 8.86 KB e3ec3404 over 5 years Lorenzo Miniero Allow configuration of HTTP method to use to co...
turnrest.h 2.57 KB e3ec3404 over 5 years Lorenzo Miniero Allow configuration of HTTP method to use to co...
utils.c 12.9 KB ea6da8ee over 5 years jswirl Include fcntl.h to fix build error on Alpine Linux
utils.h 10.6 KB 806f4d41 over 5 years Pierce Lopez consolidate JANUS_CHECK_PIN() into JANUS_CHECK_...

Latest revisions

# Date Author Comment
d97e0296 06/06/2016 04:02 PM Lorenzo Miniero

Added queue and thread for actually broadcasting events to handler plugins

09fe69ec 06/06/2016 03:41 PM Lorenzo Miniero

Merge branch 'master' into event-handlers

f9bc3076 06/06/2016 03:37 PM Lorenzo Miniero

Make naming of new attributes in Admin API less ambiguous

fec5a551 06/06/2016 03:34 PM Lorenzo Miniero

Better management of incoming RR

fee76880 06/04/2016 04:05 PM Lorenzo Miniero

Added outgoing SIP messages to events (to improve/fix)

4b02e179 06/04/2016 01:37 PM Lorenzo Miniero

Remove AudioBridge rooms lazily in the watchdog, to avoid race conditions after a destroy

a1557c3f 06/01/2016 02:52 PM Lorenzo Miniero

Added incoming SIP messages to the events (still missing outgoing)

9674d116 06/01/2016 02:33 PM Lorenzo Miniero

Merge branch 'master' into event-handlers

4d8c7356 06/01/2016 02:30 PM Lorenzo Miniero

More events, in particular from other plugins than the EchoTest, and added examples to the sample handler plugin

0e0f399d 06/01/2016 08:22 AM Lorenzo Miniero

Merge pull request #538 from andreasg123/janus-validation

Validate request parameters in janus.c with new macro

View all revisions | View revisions

README


Janus WebRTC Gateway

Janus is an open source, general purpose, WebRTC gateway designed and developed by Meetecho. This version of the gateway can only be installed on Linux systems: next versions will take into account cross compilation on different environments.

For some online demos and documentations, make sure you pay the project website a visit!

To discuss Janus with us and other users, there's a Google Group called meetecho-janus that you can use. If you encounter issues, though, please submit an issue on github instead.

Dependencies

To install it, you'll need to satisfy the following dependencies:

  • Jansson
  • libnice
  • OpenSSL (at least v1.0.1e)
  • libsrtp (at least v1.5 suggested)
  • Sofia-SIP
  • usrsctp (only needed if you are interested in Data Channels)
  • libmicrohttpd (only needed if you are interested in REST support for the Janus API)
  • libwebsockets (only needed if you are interested in WebSockets support for the Janus API)
  • cmake (only needed if you are interested in WebSockets and/or BoringSSL support, as they make use of it)
  • rabbitmq-c (only needed if you are interested in RabbitMQ support for the Janus API)

A couple of plugins depend on a few more libraries:

  • libopus (only needed for the bridge plugin)
  • libogg (only needed for the voicemail plugin)

Additionally, you'll need the following libraries and tools:

All of those libraries are usually available on most of the most common distributions. Installing these libraries on a recent Fedora, for instance, is very simple:

yum install libmicrohttpd-devel jansson-devel libnice-devel \
   openssl-devel libsrtp-devel sofia-sip-devel glib-devel \
   opus-devel libogg-devel pkgconfig gengetopt libtool autoconf automake

Notice that you may have to yum install epel-release as well if you're attempting an installation on a CentOS machine instead.

On Ubuntu or Debian, it would require something like this:

aptitude install libmicrohttpd-dev libjansson-dev libnice-dev \
    libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev \
    libopus-dev libogg-dev pkg-config gengetopt libtool automake
  • Note: please notice that libopus may not be available out of the box on Ubuntu or Debian, unless you're using a recent version (e.g., Ubuntu 14.04 LTS). In that case, you'll have to install it manually.

If your distro ships a pre-1.5 version of libsrtp, it may be better to uninstall that version and install 1.5 manually. In fact, 1.4.x is known to cause several issues with WebRTC. Installation is quite straightforward:

wget https://github.com/cisco/libsrtp/archive/v1.5.0.tar.gz
tar xfv v1.5.0.tar.gz
cd libsrtp-1.5.0
./configure --prefix=/usr --enable-openssl
make libsrtp.so && sudo make install
  • Note: you may need to pass --libdir=/usr/lib64 to the configure script if you're installing on a x86_64 distribution.

If you want to make use of BoringSSL instead of OpenSSL for any reason (read here for some background on this), you'll have to manually install a specific version of the library to a specific location. Use the following steps:

git clone https://boringssl.googlesource.com/boringssl
cd boringssl
# We need a specific revision
git checkout 12fe1b25ead258858309d22ffa9e1f9a316358d7
# Don't barf on errors
sed -i s/" -Werror"//g CMakeLists.txt
# Build
mkdir -p build
cd build
cmake -DCMAKE_CXX_FLAGS="-lrt" ..
make
cd ..
# Install
sudo mkdir -p /opt/boringssl
sudo cp -R include /opt/boringssl/
sudo mkdir -p /opt/boringssl/lib
sudo cp build/ssl/libssl.a /opt/boringssl/lib/
sudo cp build/crypto/libcrypto.a /opt/boringssl/lib/

Once the library is installed, you'll have to pass an additional --enable-boringssl flag to the configure script, as by default Janus will be build assuming OpenSSL will be used. If you were using OpenSSL and want to switch to BoringSSL, make sure you also do a make clean in the Janus folder before compiling with the new BoringSSL support.

For what concerns usrsctp, which is needed for Data Channels support, it is usually not available in repositories, so if you're interested in them (support is optional) you'll have to install it manually. It is a pretty easy and standard process:

git clone https://github.com/sctplab/usrsctp
cd usrsctp
./bootstrap
./configure --prefix=/usr && make && sudo make install
  • Note: you may need to pass --libdir=/usr/lib64 to the configure script if you're installing on a x86_64 distribution.

The same applies for libwebsockets, which is needed for the optional WebSockets support. If you're interested in supporting WebSockets to control Janus, as an alternative (or replacement) to the default plain HTTP REST API, you'll have to install it manually:

git clone git://git.libwebsockets.org/libwebsockets
cd libwebsockets
# If you want the stable version of libwebsockets, uncomment the next line
# git checkout v1.5-chrome47-firefox41
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS="-fpic" ..
make && sudo make install
  • Note: if libwebsockets.org is unreachable for any reason, replace the first line with this:

    git clone https://github.com/warmcat/libwebsockets.git

Finally, the same can be said for rabbitmq-c as well, which is needed for the optional RabbitMQ support. In fact, several different versions of the library can be found, and the versions usually available in most distribution repositories are not up-do-date with respect to the current state of the development. As such, if you're interested in integrating RabbitMQ queues as an alternative (or replacement) to HTTP and/or WebSockets to control Janus, you can install the latest version with the following steps:

git clone https://github.com/alanxz/rabbitmq-c
cd rabbitmq-c
git submodule init
git submodule update
autoreconf -i
./configure --prefix=/usr && make && sudo make install
  • Note: you may need to pass --libdir=/usr/lib64 to the configure script if you're installing on a x86_64 distribution.

To conclude, should you be interested in building the gateway documentation as well, you'll need some additional tools too:

On Fedora:

yum install doxygen graphviz

On Ubuntu/Debian:

aptitude install doxygen graphviz

Compile

Once you have installed all the dependencies, get the code:

git clone https://github.com/meetecho/janus-gateway.git
cd janus-gateway

Then just use:

sh autogen.sh

to generate the configure file. After that, configure and compile as usual to start the whole compilation process:

./configure --prefix=/opt/janus
make
make install

Since Janus requires configuration files for both the core and its modules in order to work, you'll probably also want to install the default configuration files to use, which you can do this way:

make configs

Remember to only do this once, or otherwise a subsequent make configs will overwrite any configuration file you may have modified in the meanwhile.

If you're not interested in Data Channels, WebSockets and/or RabbitMQ (or you don't care about either of them) you can disable them when configuring:

./configure --disable-websockets --disable-data-channels --disable-rabbitmq

If Doxygen and graphviz are available, the process can also build the documentation for you. By default the compilation process will not try to build the documentation, so if you instead prefer to build it, use the --enable-docs configuration option:

./configure --enable-docs

You can also selectively enable/disable other features (e.g., specific plugins you don't care about). Use the --help option when configuring for more info.

Configure and start

To start the gateway, you can use the janus executable. There are several things you can configure, either in a configuration file:

<installdir>/etc/janus/janus.cfg

or on the command line:

<installdir>/bin/janus --help

janus 0.1.1

Usage: janus [OPTIONS]...

-h, --help                    Print help and exit
-V, --version                 Print version and exit
-b, --daemon                  Launch Janus in background as a daemon
                              (default=off)
-N, --disable-stdout          Disable stdout based logging  (default=off)
-L, --log-file=path           Log to the specified file (default=stdout only)
-i, --interface=ipaddress     Interface to use (will be the public IP)
-P, --plugins-folder=path     Plugins folder (default=./plugins)
-C, --config=filename         Configuration file to use
-F, --configs-folder=path     Configuration files folder (default=./conf)
-c, --cert-pem=filename       HTTPS/DTLS certificate
-k, --cert-key=filename       HTTPS/DTLS certificate key
-S, --stun-server=filename    STUN server(:port) to use, if needed (e.g., 
                              gateway behind NAT, default=none)
-1, --nat-1-1=ip              Public IP to put in all host candidates,
                              assuming a 1:1 NAT is in place (e.g., Amazon
                              EC2 instances, default=none)
-E, --ice-enforce-list=list   Comma-separated list of the only interfaces to
                              use for ICE gathering; partial strings are
                              supported (e.g., eth0 or eno1,wlan0,
                              default=none)
-X, --ice-ignore-list=list    Comma-separated list of interfaces or IP 
                              addresses to ignore for ICE gathering; 
                              partial strings are supported (e.g., 
                              vmnet8,192.168.0.1,10.0.0.1 or 
                              vmnet,192.168., default=vmnet)
-6, --ipv6-candidates         Whether to enable IPv6 candidates or not 
                              (experimental)  (default=off)
-l, --libnice-debug           Whether to enable libnice debugging or not  
                              (default=off)
-I, --ice-lite                Whether to enable the ICE Lite mode or not  
                              (default=off)
-T, --ice-tcp                 Whether to enable ICE-TCP or not (warning: only
                              works with ICE Lite)
                              (default=off)
-U, --bundle                  Whether to force BUNDLE or not (whether audio, 
                              video and data will always be bundled)  
                              (default=off)
-u, --rtcp-mux                Whether to force rtcp-mux or not (whether RTP 
                              and RTCP will always be muxed)  (default=off)
-q, --max-nack-queue=number   Maximum size of the NACK queue per user for 
                              retransmissions
-r, --rtp-port-range=min-max  Port range to use for RTP/RTCP (only available
                              if the installed libnice supports it)
-d, --debug-level=1-7         Debug/logging level (0=disable debugging, 
                              7=maximum debug level; default=4)
-D, --debug-timestamps        Enable debug/logging timestamps  (default=off)
-o, --disable-colors          Disable color in the logging  (default=off)
-a, --apisecret=randomstring  API secret all requests need to pass in order 
                              to be accepted by Janus (useful when wrapping 
                              Janus API requests in a server, none by 
                              default)
-A, --token-auth              Enable token-based authentication for all
                              requests  (default=off)

Options passed through the command line have the precedence on those specified in the configuration file. To start the gateway, simply run:

<installdir>/bin/janus

This will start the gateway, and have it look at the configuration file.

As far as transports are concerned (that is, with respect to how you can interact with your Janus instance), using the default configuration files provided after issuing a make configs will result in Janus only enabling an HTTP webserver (port 8088) and a plain WebSocket server (8188), assuming the related transport modules have been compiled, of course. To enable HTTPS or Secure WebSockets support, edit the related transport configuration file accordingly. You can also change the base path that the webserver uses: by default this is /janus, but you can change it to anything you want and with any nesting you want (e.g., /mypath, /my/path, or /my/really/nested/path). This is done to allow you to more easily customize rules in any frontend you may have (e.g., Apache in front of your services). Please notice that the path configuration is not provided for WebSockets, instead, as it is not needed there. The RabbitMQ module, if compiled, is disabled by default, so you'll have to enable it manually if interested in it.

To test whether it's working correctly, you can use the demos provided with this package in the html folder: these are exactly the same demos available online on the project website. Just copy the file it contains in a webserver, or use a userspace webserver to serve the files in the html folder (e.g., with php or python), and open the index.html page in either Chrome or Firefox. A list of demo pages exploiting the different plugins will be available. Remember to edit the transport/port details in the demo JavaScript files if you changed any transport-related configuration from its defaults.

Help us!

Any thought, feedback or (hopefully not!) insult is welcome!

Developed by @meetecho

Also available in: Atom