Statistics
| Branch: | Revision:

janus-gateway @ 11b11a8e

Name Size Revision Age Author Comment
  certs be35facb almost 8 years meetecho First commit
  conf b4359229 almost 7 years meetecho Added option to enable ICE Lite, only way to ge...
  docs 1281ca86 almost 7 years meetecho Version 0.0.8 of Janus Plugins now need to init...
  html 67341089 almost 7 years meetecho Added a local mute button to the videoroom demo
  plugins 4a02688f almost 7 years meetecho Per-participant encoding thread in AudioBridge ...
  postprocessing bf24339c about 7 years meetecho Ad-hoc thread for outgoing media/data Improved ...
.gitattributes 15 Bytes f4fb2029 about 7 years Jack Leigh Autotoolize build system Set PLUGINDIR and CON...
.gitignore 456 Bytes b1c60d34 almost 7 years Yulius Tjahjadi Janus build fixes for OSX
COPYING 34.3 KB d3c229a7 over 7 years meetecho Changed license from AGPLv3 to GPLv3
Makefile.am 7.52 KB 1281ca86 almost 7 years meetecho Version 0.0.8 of Janus Plugins now need to init...
README.md 13.3 KB 11b11a8e almost 7 years meetecho Command line option description updated
apierror.c 1.69 KB 5fa9a305 about 7 years meetecho Experimental IPv6 support and new Recorder/Play...
apierror.h 3.16 KB 5fa9a305 about 7 years meetecho Experimental IPv6 support and new Recorder/Play...
autogen.sh 124 Bytes c5631d7c almost 7 years meetecho Fix to autogen.sh after latest pull request #125
bower.json 1000 Bytes 42aa31fd almost 7 years Scott Added bower.json file so we can register the fr...
config.c 10.8 KB e4adcb76 about 7 years meetecho Added support for escaped semicolons in configu...
config.h 4.59 KB 9d11ac50 over 7 years meetecho Added a basic recording functionality plugins c...
configure.ac 10.2 KB 1281ca86 almost 7 years meetecho Version 0.0.8 of Janus Plugins now need to init...
debug.h 2.29 KB c95f775b about 7 years meetecho Admin API to change debugging and fixed deadloc...
dtls.c 25.4 KB 19126117 almost 7 years meetecho Added reason to hangup event (and improved it)
dtls.h 7.28 KB 6dd1c12c about 7 years meetecho Several fixes Improved DTLS timer and retransmi...
ice.c 97.6 KB b4359229 almost 7 years meetecho Added option to enable ICE Lite, only way to ge...
ice.h 22.5 KB b4359229 almost 7 years meetecho Added option to enable ICE Lite, only way to ge...
janus.c 192 KB b4359229 almost 7 years meetecho Added option to enable ICE Lite, only way to ge...
janus.ggo 3.82 KB 11b11a8e almost 7 years meetecho Command line option description updated
janus.h 20 KB ce97b4a5 almost 7 years meetecho Some cleanups and fixes, especially on session ...
janus.supp 2.85 KB a82a2dd6 about 7 years Philip Withnall build: Add a Valgrind suppressions file This c...
mach_gettime.h 2 KB b1c60d34 almost 7 years Yulius Tjahjadi Janus build fixes for OSX
mainpage.dox 88.4 KB 1a0b5bea almost 7 years meetecho Added 16:9 options to the JavaScript library vi...
mutex.h 1.61 KB 6dd1c12c about 7 years meetecho Several fixes Improved DTLS timer and retransmi...
record.c 4.77 KB 22d47323 about 7 years Pierce Lopez make some janus_recorder_create() args const, r...
record.h 2.8 KB 22d47323 about 7 years Pierce Lopez make some janus_recorder_create() args const, r...
rtcp.c 20.7 KB 516f34fa almost 7 years meetecho Better management of NACKS as per issue #150 Do...
rtcp.h 9.23 KB 516f34fa almost 7 years meetecho Better management of NACKS as per issue #150 Do...
rtp.h 1.25 KB b1c60d34 almost 7 years Yulius Tjahjadi Janus build fixes for OSX
sctp.c 44.3 KB 1ce09c4b almost 7 years Lorenzo Miniero Fixed padding (added in #124 related commit)
sctp.h 6.74 KB f20cf7a5 almost 7 years meetecho Fixed issue #124 (label size for data channels)
sdp.c 43.4 KB b4359229 almost 7 years meetecho Added option to enable ICE Lite, only way to ge...
sdp.h 4.54 KB 6dd1c12c about 7 years meetecho Several fixes Improved DTLS timer and retransmi...
utils.c 5.14 KB b1c60d34 almost 7 years Yulius Tjahjadi Janus build fixes for OSX
utils.h 2.92 KB 5fa9a305 about 7 years meetecho Experimental IPv6 support and new Recorder/Play...

Latest revisions

# Date Author Comment
11b11a8e 02/24/2015 10:48 AM meetecho

Command line option description updated

b4359229 02/24/2015 10:29 AM meetecho

Added option to enable ICE Lite, only way to get ICE-TCP working if it's needed

4a02688f 02/23/2015 01:41 PM meetecho

Per-participant encoding thread in AudioBridge for better performances

cc6f0e73 02/23/2015 11:37 AM meetecho

Limited size of queue for incoming packets (AudioBridge)
Hidden unprotect errors when they're caused by a retransmission

53ded1b6 02/20/2015 04:13 PM meetecho

Fixed typo in admin API

54614e72 02/20/2015 01:03 PM meetecho

Converted the streaming plugin to use poll instead of select, and negotiating NACK for RTP streaming too now

6b8e54c5 02/20/2015 11:05 AM Lorenzo Miniero

Merge pull request #157 from davibe/master

recordplay: allow client to specify filename (optional)

1b1dd5fe 02/19/2015 02:32 PM meetecho

Fixed very delayed audio in AudioBridge after a destroy and a different join

1e533d93 02/19/2015 01:48 PM Lorenzo Miniero

Merge pull request #158 from uxmaster/master

Fixed GLib-CRITICAL after session timeout

f7d8c6cd 02/19/2015 01:41 PM uxmaster

Fixed GLib-CRITICAL after session timeout

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:

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 libini_config-devel pkg-config gengetopt \
   libtool autoconf automake

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 libini-config-dev libcollection-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.

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:

svn co http://sctp-refimpl.googlecode.com/svn/trunk/KERN/usrsctp 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 libwebsock, 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 the version 1.0.4 manually:

git clone git://github.com/payden/libwebsock.git
cd libwebsock
git checkout tags/v1.0.4
autoreconf -i
./autogen.sh
./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.

  • Note: as anticipated you'll need to install libevent-dev (or libevent-devel) before installing libwebsock (see here for more info).

Please notice that you have to install version 1.0.4 and not any later version. In fact, recent versions of libwebsock added support for threading in the library, but it is currently experimental and doesn't work as expected in Janus.

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

To also automatically install the default configuration files to use, also do a:

make configs

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 will also build the documentation for you. If you prefer not to build it, use the --disable-docs configuration option:

./configure --disable-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.0.8

Usage: janus [OPTIONS]...

-h, --help                    Print help and exit
-V, --version                 Print version and exit
-i, --interface=ipaddress     Interface to use (will be the public IP)
-p, --port=portnumber         Web server HTTP port (default=8088)
-s, --secure-port=portnumber  Web server HTTPS port (default=no HTTPS)
-n, --no-http                 Disable insecure HTTP web server  (default=off)
-b, --base-path=basepath      Base path to bind to in the web server 
                              (default=/janus) 
-w, --ws-port=portnumber      WebSockets server port (default=no WebSockets)
-W, --ws-secure-port=portnumber
                              Secure WebSockets server port (default=no 
                              secure WebSockets)
-N, --no-websockets           Disable insecure WebSockets server  
                              (default=off)
-m, --admin-port=portnumber   Admin/monitor web server HTTP port 
                              (default=7088)
-M, --admin-secure-port=portnumber
                              Admin/monitor web server HTTPS port (default=no 
                              HTTPS)
-O, --no-admin                Disable insecure HTTP admin/monitor web server  
                              (default=off)
-B, --admin-base-path=basepath
                              Base path to bind to in the HTTP/HTTPS 
                              admin/monitor web server (default=/admin) 
-Q, --admin-secret=randomstring
                              Admin/monitor secret all requests need to pass 
                              in order to be accepted by Janus (useful a 
                              crude form of authentication, none by 
                              default)
-L, --admin-acl=list          Comma-separated list of IP addresses allowed to 
                              use the Admin/monitor; partial strings are 
                              supported (e.g., 192.168.0.1,10.0.0.1 or 
                              192.168., default=no restriction)
-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)
-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)
-e, --public-ip=ipaddress     Public address of the machine, to use in SDP
-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)
-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)
-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)
-R, --enable-rabbitmq         Enable RabbitMQ support  (default=off)
-H, --rabbitmq-host=string    Address (host:port) of the RabbitMQ server to 
                              use (default=localhost:5672)
-t, --rabbitmq-in-queue=string
                              Name of the RabbitMQ queue for incoming 
                              messages (no default)
-f, --rabbitmq-out-queue=string
                              Name of the RabbitMQ queue for outgoing 
                              messages (no default)

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. By default, only an HTTP webserver is started. To enable HTTPS support, edit the configuration file accordingly or use the command line. The webserver will make use of the same certificates provided for DTLS. 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 has no effect on the WebSockets usage of the API, instead, as it is not needed there.

In the absence of a configuration file, the only mandatory options to specify in the command line are the ones related to the DTLS certificate. A default certificate is provided with this package in the certs folder, which you can use launching the executable with these parameters:

<installdir>/bin/janus -c /path/to/mycert.pem -k /path/to/mycert.key

At this point, the gateway will be listening on the 8088 port (or whatever you changed that to) of your machine. 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, and open the index.html page in either Chrome or Firefox. A list of demo pages exploiting the different plugins will be available.

Help us!

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

Developed by @meetecho

Also available in: Atom