Statistics
| Branch: | Revision:

janus-gateway / README @ 5e9e29e0

History | View | Annotate | Download (5.83 KB)

1 5e9e29e0 meetecho
Janus WebRTC Gateway
2
====================
3
4
Janus is an open source, general purpose, WebRTC gateway. This version
5
of the gateway can only be installed on Linux systems: next versions
6
will take into account cross compilation on different environments.
7
8
For some online demos and documentations, make sure you pay the
9
[project website](http://janus.conf.meetecho.com/) a visit!
10
11
##Dependencies
12
To install it, you'll need to satisfy the following dependencies:
13
14
* [libmicrohttpd](http://www.gnu.org/software/libmicrohttpd/)
15
* [libini-config](https://fedorahosted.org/sssd/) (INI configurations)
16
* [Jansson](http://www.digip.org/jansson/)
17
* [libnice](http://nice.freedesktop.org/wiki/)
18
* [OpenSSL](http://www.openssl.org/) (at least v1.0.1e)
19
* [libsrtp](http://srtp.sourceforge.net/srtp.html)
20
* [Sofia-SIP](http://sofia-sip.sourceforge.net/)
21
22
A couple of plugins depend on a few more libraries:
23
24
* [libopus](http://opus-codec.org/) (only needed for the bridge plugin)
25
* [libogg](http://xiph.org/ogg/) (only needed for the voicemail plugin)
26
27
Additionally, you'll need the following libraries and tools:
28
29
* [GLib](http://library.gnome.org/devel/glib/)
30
* [pkg-config](http://www.freedesktop.org/wiki/Software/pkg-config/)
31
* [gengetopt](http://www.gnu.org/software/gengetopt/)
32
33
All of those libraries are usually available on most of the most common
34
distributions. Installing these libraries on a recent Fedora, for
35
instance, is very simple:
36
37
    yum install libmicrohttpd-devel jansson-devel libnice-devel \
38
       openssl-devel libsrtp-devel sofia-sip-devel glib-devel \
39
       opus-devel libogg-devel libini_config-devel pkg-config gengetopt
40
41
On Ubuntu or Debian, it would require something like this:
42
43
	aptitude install libmicrohttpd-dev libjansson-dev libnice-dev \
44
		libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev \
45
		libogg-dev libini-config-dev libcollection-dev pkg-config gengetopt
46
47
* *Note:* apparently libopus is not available on Ubuntu: you'll have to
48
install it manually.
49
50
Should you be interested in building the gateway documentation as well,
51
you'll need an additional component installed too:
52
53
* [Doxygen](http://www.doxygen.org)
54
* [Graphviz](http://www.graphviz.org/)
55
56
On Fedora:
57
58
	yum install doxygen graphviz
59
60
On Ubuntu/Debian:
61
62
	aptitude install doxygen graphviz
63
64
65
##Compile
66
Once you have installed all the dependencies, just use:
67
68
	sh install.sh
69
70
to start the whole compilation process. The script will try to check
71
whether you have all the dependencies installed, and then issue a 'make'
72
for you to start compiling. If Doxygen and graphviz are available, it
73
will also build the documentation for you as well.
74
75
If you prefer doing this manually, a simple
76
77
	make
78
79
will start compiling the gateway. To build the documentation as well:
80
81
	make docs
82
83
will create the documentation in the docs/html subfolder.
84
85
86
##Configure and start
87
To start the gateway, you can use the janus executable. There are several
88
things you can configure, either in a configuration file:
89
90
	./conf/janus.cfg
91
92
or on the command line:
93
94
	./janus --help
95
	
96
	janus 0.0.1
97
98
	Usage: janus [OPTIONS]...
99
100
	-h, --help                    Print help and exit
101
	-V, --version                 Print version and exit
102
	-i, --interface=ipaddress     Interface to use (will be the public IP)
103
	-p, --port=portnumber         Web server HTTP port (default=8088)
104
	-s, --secure-port=portnumber  Web server HTTPS port (default=no HTTPS)
105
	-n, --no-http                 Disable insecure HTTP web server  (default=off)
106
	-b, --base-path=basepath      Base path to bind to in the web server 
107
								  (default=/janus) 
108
	-P, --plugins-folder=path     Plugins folder (default=./plugins)
109
	-C, --config=path             Configuration file to use
110
	-F, --configs-folder=path     Configuration files folder (default=./conf)
111
	-c, --cert-pem=filename       HTTPS/DTLS certificate
112
	-k, --cert-key=filename       HTTPS/DTLS certificate key
113
	-S, --stun-server=filename    STUN server(:port) to use, if needed (e.g., 
114
								  gateway behind NAT, default=none)
115
	-e, --public-ip=ipaddress     Public address of the machine, to use in SDP
116
	-r, --rtp-port-range=min-max  Port range to use for RTP/RTCP (only available
117
								  if the installed libnice supports it)
118
119
Options passed through the command line have the precedence on those
120
specified in the configuration file. To start the gateway, simply run:
121
122
	./janus
123
124
This will start the gateway, and have it look at the configuration file.
125
By default, only an HTTP webserver is started. To enable HTTPS support,
126
edit the configuration file accordingly or use the command line. The
127
webserver will make use of the same certificates provided for DTLS. You
128
can also change the base path that the webserver uses: by default this
129
is /janus, but you can change it to anything you want and with any nesting
130
you want (e.g., /mypath, /my/path, or /my/really/nested/path). This is
131
done to allow you to more easily customize rules in any frontend you
132
may have (e.g., Apache in front of your services).
133
 
134
In the absence of a configuration file, the only mandatory options to
135
specify in the command line are the ones related to the DTLS certificate.
136
A default certificate is provided with this package in the certs folder,
137
which you can use launching the executable with these parameters:
138
139
	./janus -c certs/mycert.pem -k certs/mycert.key
140
141
At this point, the gateway will be listening on the 8088 port (or whatever
142
you changed that to) of your machine. To test whether it's working
143
correctly, you can use the demos provided with this package in the html
144
folder: these are exactly the same demos available online on the
145
[project website](http://janus.conf.meetecho.com/). Just copy the file
146
it contains in a webserver, and open the index.html page in either
147
Chrome or Firefox. A list of demo pages exploiting the different plugins
148
will be available.
149
150
151
##Help us!
152
Any thought, feedback or (hopefully not!) insult is welcome!
153
154
Developed by [@meetecho](https://github.com/meetecho)