# WebSockets stuff: whether they should be enabled, which ports they
# should use, and so on.
general: {
	#events = true					# Whether to notify event handlers about transport events (default=true)
	json = "indented"				# Whether the JSON messages should be indented (default),
									# plain (no indentation) or compact (no indentation and no spaces)
	pingpong_trigger = 30			# After how many seconds of idle, a PING should be sent
	pingpong_timeout = 10			# After how many seconds of not getting a PONG, a timeout should be detected

	ws = false						# Whether to enable the WebSockets API
	#ws_port = 8188					# WebSockets server port
	#ws_interface = "eth0"			# Whether we should bind this server to a specific interface only
	#ws_ip = "192.168.0.1"			# Whether we should bind this server to a specific IP address only
	wss = {%if api_wss and ssl_enabled %}true{% else %}false{% endif %}				# Whether to enable secure WebSockets
	wss_port = {{ api_wss_port }}	# WebSockets server secure port, if enabled
	#wss_interface = "eth0"			# Whether we should bind this server to a specific interface only
	#wss_ip = "192.168.0.1"			# Whether we should bind this server to a specific IP address only
	#ws_logging = "err,warn"		# libwebsockets debugging level as a comma separated list of things
									# to debug, supported values: err, warn, notice, info, debug, parser,
									# header, ext, client, latency, user, count (plus 'none' and 'all')
	#ws_acl = "127.,192.168.0."		# Only allow requests coming from this comma separated list of addresses
}

# If you want to expose the Admin API via WebSockets as well, you need to
# specify a different server instance, as you cannot mix Janus API and
# Admin API messaging. Notice that by default the Admin API support via
# WebSockets is disabled.
admin: {
	admin_ws = false					# Whether to enable the Admin API WebSockets API
	admin_ws_port = 7188				# Admin API WebSockets server port, if enabled
	#admin_ws_interface = "eth0"		# Whether we should bind this server to a specific interface only
	#admin_ws_ip = "192.168.0.1"		# Whether we should bind this server to a specific IP address only
	admin_wss = false					# Whether to enable the Admin API secure WebSockets
	admin_wss_port = 7989				# Admin API WebSockets server secure port, if enabled
	#admin_wss_interface = "eth0"		# Whether we should bind this server to a specific interface only
	#admin_wss_ip = "192.168.0.1"		# Whether we should bind this server to a specific IP address only
	#admin_ws_acl = "127.,192.168.0."	# Only allow requests coming from this comma separated list of addresses
}

# Certificate and key to use for any secure WebSocket server, if enabled (and passphrase if needed).
certificates: {
{% if ssl_enabled %}
    cert_pem = "/etc/letsencrypt/live/{{ hostname }}/fullchain.pem"
	cert_key = "/etc/letsencrypt/live/{{ hostname }}/privkey.pem"
{% endif %}
	#cert_pwd = "secretpassphrase"
}
