· 7 years ago · Dec 10, 2018, 08:18 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 = "/opt/janus/etc/janus" # Configuration files folder
8 plugins_folder = "/opt/janus/lib/janus/plugins" # Plugins folder
9 transports_folder = "/opt/janus/lib/janus/transports" # Transports folder
10 events_folder = "/opt/janus/lib/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 = "/path/to/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 = false # 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 = "janusrocks" # 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 = "janus" # 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 = "janusoverlord" # 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 = "MyJanusInstance"# 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 = 0 # 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 = "/opt/janus/share/janus/certs/mycert.pem"
107 cert_key = "/opt/janus/share/janus/certs/mycert.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 = "20000-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 = stun1.l.google.com
153 stun_port = 19302
154 nice_debug = false
155 #full_trickle = true
156 #ice_lite = true
157 #ice_tcp = true
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 = "myturnserver.com"
174 #turn_port = 3478
175 #turn_type = "udp"
176 #turn_user = "myuser"
177 #turn_pwd = "mypassword"
178
179turn_server = numb.viagenie.ca
180turn_port = 3478
181turn_type = udp
182turn_user = *******@gmail.com
183turn_pwd = *******
184
185
186 # ... or you can make use of the TURN REST API to get info on one or more
187 # TURN services dynamically. This makes use of the proposed standard of
188 # such an API (https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00)
189 # which is currently available in both rfc5766-turn-server and coturn.
190 # You enable this by specifying the address of your TURN REST API backend,
191 # the HTTP method to use (GET or POST) and, if required, the API key Janus
192 # must provide.
193 #turn_rest_api = "http://yourbackend.com/path/to/api"
194 #turn_rest_api_key = "anyapikeyyoumayhaveset"
195 #turn_rest_api_method = "GET"
196
197 # You can also choose which interfaces should be explicitly used by the
198 # gateway for the purpose of ICE candidates gathering, thus excluding
199 # others that may be available. To do so, use the 'ice_enforce_list'
200 # setting and pass it a comma-separated list of interfaces or IP addresses
201 # to enforce. This is especially useful if the server hosting the gateway
202 # has several interfaces, and you only want a subset to be used. Any of
203 # the following examples are valid:
204 # ice_enforce_list = "eth0"
205 # ice_enforce_list = "eth0,eth1"
206 # ice_enforce_list = "eth0,192.168."
207 # ice_enforce_list = "eth0,192.168.0.1"
208 # By default, no interface is enforced, meaning Janus will try to use them all.
209 #ice_enforce_list = "eth0"
210
211 # In case you don't want to specify specific interfaces to use, but would
212 # rather tell Janus to use all the available interfaces except some that
213 # you don't want to involve, you can also choose which interfaces or IP
214 # addresses should be excluded and ignored by the gateway for the purpose
215 # of ICE candidates gathering. To do so, use the 'ice_ignore_list' setting
216 # and pass it a comma-separated list of interfaces or IP addresses to
217 # ignore. This is especially useful if the server hosting the gateway
218 # has several interfaces you already know will not be used or will simply
219 # always slow down ICE (e.g., virtual interfaces created by VMware).
220 # Partial strings are supported, which means that any of the following
221 # examples are valid:
222 # ice_ignore_list = "vmnet8,192.168.0.1,10.0.0.1"
223 # ice_ignore_list = "vmnet,192.168."
224 # Just beware that the ICE ignore list is not used if an enforce list
225 # has been configured. By default, Janus ignores all interfaces whose
226 # name starts with 'vmnet', to skip VMware interfaces:
227 ice_ignore_list = "vmnet"
228}
229
230# You can choose which of the available plugins should be
231# enabled or not. Use the 'disable' directive to prevent Janus from
232# loading one or more plugins: use a comma separated list of plugin file
233# names to identify the plugins to disable. By default all available
234# plugins are enabled and loaded at startup.
235plugins: {
236 #disable = "libjanus_voicemail.so,libjanus_recordplay.so"
237}
238
239# You can choose which of the available transports should be enabled or
240# not. Use the 'disable' directive to prevent Janus from loading one
241# or more transport: use a comma separated list of transport file names
242# to identify the transports to disable. By default all available
243# transports are enabled and loaded at startup.
244transports: {
245 #disable = "libjanus_rabbitmq.so"
246}
247
248# Event handlers allow you to receive live events from Janus happening
249# in core and/or plugins. Since this can require some more resources,
250# the feature is disabled by default. Setting broadcast to yes will
251# enable them. You can then choose which of the available event handlers
252# should be loaded or not. Use the 'disable' directive to prevent Janus
253# from loading one or more event handlers: use a comma separated list of
254# file names to identify the event handlers to disable. By default, if
255# broadcast is set to yes all available event handlers are enabled and
256# loaded at startup. Finally, you can choose how often media statistics
257# (packets sent/received, losses, etc.) should be sent: by default it's
258# once per second (audio and video statistics sent separately), but may
259# considered too verbose, or you may want to limit the number of events,
260# especially if you have many PeerConnections active. To change this,
261# just set 'stats_period' to the number of seconds that should pass in
262# between statistics for each handle. Setting it to 0 disables them (but
263# not other media-related events).
264events: {
265 #broadcast = true
266 #disable = "libjanus_sampleevh.so"
267 #stats_period = 5
268}