· 6 years ago · Nov 13, 2019, 03:22 PM
1# General configuration: folders where the configuration and the plugins
2# can be found, how output should be logged, whether Janus should run as
3# a daemon or in foreground, default interface to use, debug/logging level
4# and, if needed, shared apisecret and/or token authentication mechanism
5# between application(s) and Janus.
6general: {
7 configs_folder = "/etc/janus" # Configuration files folder
8 plugins_folder = "/usr/lib/x86_64-linux-gnu/janus/plugins" # Plugins folder
9 transports_folder = "/usr/lib/x86_64-linux-gnu/janus/transports" # Transports folder
10 events_folder = "/usr/lib/x86_64-linux-gnu/janus/events" # Event handlers folder
11
12 # The next settings configure logging
13 #log_to_stdout = false # Whether the Janus output should be written
14 # to stdout or not (default=true)
15 log_to_file = "/var/log/janus.log" # Whether to use a log file or not
16 debug_level = 4 # Debug/logging level, valid values are 0-7
17 #debug_timestamps = true # Whether to show a timestamp for each log line
18 #debug_colors = true # Whether colors should be disabled in the log
19 #debug_locks = true # Whether to enable debugging of locks (very verbose!)
20
21 # This is what you configure if you want to launch Janus as a daemon
22 #daemonize = true # Whether Janus should run as a daemon
23 # or not (default=run in foreground)
24 #pid_file = "/path/to/janus.pid" # PID file to create when Janus has been
25 # started, and to destroy at shutdown
26
27 # There are different ways you can authenticate the Janus and Admin APIs
28 api_secret = <myapisecret> # String that all Janus requests must contain
29 # to be accepted/authorized by the Janus core.
30 # Useful if you're wrapping all Janus API requests
31 # in your servers (that is, not in the browser,
32 # where you do the things your way) and you
33 # don't want other application to mess with
34 # this Janus instance.
35 #token_auth = true # Enable a token based authentication
36 # mechanism to force users to always provide
37 # a valid token in all requests. Useful if
38 # you want to authenticate requests from web
39 # users.
40 #token_auth_secret = "tokenAuth" # Use HMAC-SHA1 signed tokens (with token_auth). Note that
41 # without this, the Admin API MUST
42 # be enabled, as tokens are added and removed
43 # through messages sent there.
44 admin_secret = <myAdminSecret> # String that all Janus requests must contain
45 # to be accepted/authorized by the admin/monitor.
46 # only needed if you enabled the admin API
47 # in any of the available transports.
48
49 # Generic settings
50 #interface = "1.2.3.4" # Interface to use (will be used in SDP)
51 server_name = <myServerName> # Public name of this Janus instance
52 # as it will appear in an info request
53 #session_timeout = 60 # How long (in seconds) we should wait before
54 # deciding a Janus session has timed out. A
55 # session times out when no request is received
56 # for session_timeout seconds (default=60s).
57 # Setting this to 0 will disable the timeout
58 # mechanism, which is NOT suggested as it may
59 # risk having orphaned sessions (sessions not
60 # controlled by any transport and never freed).
61 # To avoid timeouts, keep-alives can be used.
62 #candidates_timeout = 45 # How long (in seconds) we should keep hold of
63 # pending (trickle) candidates before discarding
64 # them (default=45s). Notice that setting this
65 # to 0 will NOT disable the timeout, but will
66 # be considered an invalid value and ignored.
67 #reclaim_session_timeout = 20 # How long (in seconds) we should wait for a
68 # janus session to be reclaimed after the transport
69 # is gone. After the transport is gone, a session
70 # times out when no request is received for
71 # reclaim_session_timeout seconds (default=0s).
72 # Setting this to 0 will disable the timeout
73 # mechanism, and sessions will be destroyed immediately
74 # if the transport is gone.
75 #recordings_tmp_ext = "tmp" # The extension for recordings, in Janus, is
76 # .mjr, a custom format we devised ourselves.
77 # By default, we save to .mjr directly. If you'd
78 # rather the recording filename have a temporary
79 # extension while it's being saved, and only
80 # have the .mjr extension when the recording
81 # is over (e.g., to automatically trigger some
82 # external scripts), then uncomment and set the
83 # recordings_tmp_ext property to the extension
84 # to add to the base (e.g., tmp --> .mjr.tmp).
85 #event_loops = 8 # By default, Janus handles each have their own
86 # event loop and related thread for all the media
87 # routing and management. If for some reason you'd
88 # rather limit the number of loop/threads, and
89 # you want handles to share those, you can do that
90 # configuring the event_loops property: this will
91 # spawn the specified amount of threads at startup,
92 # run a separate event loop on each of them, and
93 # add new handles to one of them when attaching.
94 # Notice that, while cutting the number of threads
95 # and possibly reducing context switching, this
96 # might have an impact on the media delivery,
97 # especially if the available loops can't take
98 # care of all the handles and their media in time.
99 # As such, if you want to use this you should
100 # provision the correct value according to the
101 # available resources (e.g., CPUs available).
102}
103
104# Certificate and key to use for DTLS (and passphrase if needed).
105certificates: {
106 cert_pem = "/etc/ssl/certs/ssl-cert-snakeoil.pem"
107 cert_key = "/etc/ssl/private/ssl-cert-snakeoil.key"
108 #cert_pwd = "secretpassphrase"
109}
110
111# Media-related stuff: you can configure whether if you want
112# to enable IPv6 support (still WIP, so handle with care), if RFC4588
113# support should be negotiated or not (off by default), the maximum size
114# of the NACK queue (in milliseconds, defaults to 500ms) for retransmissions, the
115# range of ports to use for RTP and RTCP (by default, no range is envisaged), the
116# starting MTU for DTLS (1200 by default, it adapts automatically), and
117# finally how much time, in seconds, should pass with no media (audio or
118# video) being received before Janus notifies you about this (default=1s,
119# 0 disables these events entirely). Finally, if you're using BoringSSL
120# you can customize the frequency of retransmissions: OpenSSL has a fixed
121# value of 1 second (the default), while BoringSSL can override that. Notice
122# that lower values (e.g., 100ms) will typically get you faster connection
123# times, but may not work in case the RTT of the user is high: as such,
124# you should pick a reasonable trade-off (usually 2*max expected RTT).
125media: {
126 ipv6 = true
127 max_nack_queue = 500
128 rfc_4588 = true
129 rtp_port_range = "35000-40000"
130 dtls_mtu = 1200
131 no_media_timer = 1
132 dtls_timeout = 500
133}
134
135# NAT-related stuff: specifically, you can configure the STUN/TURN
136# servers to use to gather candidates if the gateway is behind a NAT,
137# and srflx/relay candidates are needed. In case STUN is not enough and
138# this is needed (it shouldn't), you can also configure Janus to use a
139# TURN server# please notice that this does NOT refer to TURN usage in
140# browsers, but in the gathering of relay candidates by Janus itself,
141# e.g., if you want to limit the ports used by a Janus instance on a
142# private machine. Furthermore, you can choose whether Janus should be
143# configured to do full-trickle (Janus also trickles its candidates to
144# users) rather than the default half-trickle (Janus supports trickle
145# candidates from users, but sends its own within the SDP), and whether
146# it should work in ICE-Lite mode (by default it doesn't). Finally,
147# you can also enable ICE-TCP support (beware that it currently *only*
148# works if you enable ICE Lite as well), choose which interfaces should
149# be used for gathering candidates, and enable or disable the
150# internal libnice debugging, if needed.
151nat: {
152 stun_server = "stun4.l.google.com"
153 stun_port = 19302
154 #nice_debug = false
155 #full_trickle = true
156 #ice_lite = false
157 #ice_tcp = false
158
159 # In case you're deploying Janus on a server which is configured with
160 # a 1:1 NAT (e.g., Amazon EC2), you might want to also specify the public
161 # address of the machine using the setting below. This will result in
162 # all host candidates (which normally have a private IP address) to
163 # be rewritten with the public address provided in the settings. As
164 # such, use the option with caution and only if you know what you're doing.
165 # Make sure you keep ICE Lite disabled, though, as it's not strictly
166 # speaking a publicly reachable server, and a NAT is still involved.
167 #nat_1_1_mapping = "1.2.3.4"
168
169 # You can configure a TURN server in two different ways: specifying a
170 # statically configured TURN server, and thus provide the address of the
171 # TURN server, the transport (udp/tcp/tls) to use, and a set of valid
172 # credentials to authenticate...
173 #turn_server = ""
174 #turn_port = 3478
175 #turn_type = "udp"
176 #turn_user = ""
177 #turn_pwd = ""
178
179 # ... or you can make use of the TURN REST API to get info on one or more
180 # TURN services dynamically. This makes use of the proposed standard of
181 # such an API (https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00)
182 # which is currently available in both rfc5766-turn-server and coturn.
183 # You enable this by specifying the address of your TURN REST API backend,
184 # the HTTP method to use (GET or POST) and, if required, the API key Janus
185 # must provide.
186 #turn_rest_api = "http://yourbackend.com/path/to/api"
187 #turn_rest_api_key = "anyapikeyyoumayhaveset"
188 #turn_rest_api_method = "GET"
189
190 # You can also choose which interfaces should be explicitly used by the
191 # gateway for the purpose of ICE candidates gathering, thus excluding
192 # others that may be available. To do so, use the 'ice_enforce_list'
193 # setting and pass it a comma-separated list of interfaces or IP addresses
194 # to enforce. This is especially useful if the server hosting the gateway
195 # has several interfaces, and you only want a subset to be used. Any of
196 # the following examples are valid:
197 # ice_enforce_list = "eth0"
198 # ice_enforce_list = "eth0,eth1"
199 # ice_enforce_list = "eth0,192.168."
200 # ice_enforce_list = "eth0,192.168.0.1"
201 # By default, no interface is enforced, meaning Janus will try to use them all.
202 #ice_enforce_list = "eth0"
203
204 # In case you don't want to specify specific interfaces to use, but would
205 # rather tell Janus to use all the available interfaces except some that
206 # you don't want to involve, you can also choose which interfaces or IP
207 # addresses should be excluded and ignored by the gateway for the purpose
208 # of ICE candidates gathering. To do so, use the 'ice_ignore_list' setting
209 # and pass it a comma-separated list of interfaces or IP addresses to
210 # ignore. This is especially useful if the server hosting the gateway
211 # has several interfaces you already know will not be used or will simply
212 # always slow down ICE (e.g., virtual interfaces created by VMware).
213 # Partial strings are supported, which means that any of the following
214 # examples are valid:
215 # ice_ignore_list = "vmnet8,192.168.0.1,10.0.0.1"
216 # ice_ignore_list = "vmnet,192.168."
217 # Just beware that the ICE ignore list is not used if an enforce list
218 # has been configured. By default, Janus ignores all interfaces whose
219 # name starts with 'vmnet', to skip VMware interfaces:
220 #ice_ignore_list = "vmnet"
221}
222
223# You can choose which of the available plugins should be
224# enabled or not. Use the 'disable' directive to prevent Janus from
225# loading one or more plugins: use a comma separated list of plugin file
226# names to identify the plugins to disable. By default all available
227# plugins are enabled and loaded at startup.
228plugins: {
229 disable = "libjanus_duktape.so,libjanus_echotest.so,libjanus_recordplay.so,libjanus_textroom.so,libjanus_videocall.so,libjanus_videoroom.so,libjanus_voicemail.so"
230}
231
232# You can choose which of the available transports should be enabled or
233# not. Use the 'disable' directive to prevent Janus from loading one
234# or more transport: use a comma separated list of transport file names
235# to identify the transports to disable. By default all available
236# transports are enabled and loaded at startup.
237transports: {
238 disable = "libjanus_rabbitmq.so,libjanus_nanomsg.so,libjanus_pfunix.so,libjanus_websockets.so"
239}
240
241# Event handlers allow you to receive live events from Janus happening
242# in core and/or plugins. Since this can require some more resources,
243# the feature is disabled by default. Setting broadcast to yes will
244# enable them. You can then choose which of the available event handlers
245# should be loaded or not. Use the 'disable' directive to prevent Janus
246# from loading one or more event handlers: use a comma separated list of
247# file names to identify the event handlers to disable. By default, if
248# broadcast is set to yes all available event handlers are enabled and
249# loaded at startup. Finally, you can choose how often media statistics
250# (packets sent/received, losses, etc.) should be sent: by default it's
251# once per second (audio and video statistics sent separately), but may
252# considered too verbose, or you may want to limit the number of events,
253# especially if you have many PeerConnections active. To change this,
254# just set 'stats_period' to the number of seconds that should pass in
255# between statistics for each handle. Setting it to 0 disables them (but
256# not other media-related events).
257events: {
258 #broadcast = true
259 #disable = "libjanus_sampleevh.so"
260 #stats_period = 5
261}