diff --git a/.gitignore b/.gitignore index b26a04b95c..1433854833 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ version.c docs/html/ /janus +/janus-cfgconv /janus-pp-rec /plugins/*.so /transports/*.so @@ -53,6 +54,14 @@ Makefile.in /conf/janus.plugin.voicemail.cfg.sample /conf/janus.transport.http.cfg.sample /conf/janus.transport.websockets.cfg.sample +/conf/janus.jcfg.sample +/conf/janus.plugin.duktape.jcfg.sample +/conf/janus.plugin.lua.jcfg.sample +/conf/janus.plugin.recordplay.jcfg.sample +/conf/janus.plugin.streaming.jcfg.sample +/conf/janus.plugin.voicemail.jcfg.sample +/conf/janus.transport.http.jcfg.sample +/conf/janus.transport.websockets.jcfg.sample .deps .dirstamp diff --git a/Makefile.am b/Makefile.am index 061f2d8594..8cd75e698e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,7 +41,7 @@ eventsheaderdir = $(includedir)/janus/events eventsheader_HEADERS = events/eventhandler.h confdir = $(sysconfdir)/janus -conf_DATA = conf/janus.cfg.sample +conf_DATA = conf/janus.jcfg.sample certdir = $(datadir)/janus/certs dist_cert_DATA = certs/mycert.key certs/mycert.pem @@ -91,8 +91,8 @@ jsmodules_DATA = html/janus.js s|[@]duktapedir[@]|$(duktapedir)|" \ $< > $@ || rm $@ -EXTRA_DIST += conf/janus.cfg.sample.in -CLEANFILES += conf/janus.cfg.sample +EXTRA_DIST += conf/janus.jcfg.sample.in +CLEANFILES += conf/janus.jcfg.sample ## # Janus @@ -170,6 +170,28 @@ janus_LDADD = \ dist_man1_MANS = janus.1 +bin_PROGRAMS += janus-cfgconv + +janus_cfgconv_SOURCES = \ + janus-cfgconv.c \ + config.c \ + log.c \ + utils.c \ + version.c \ + $(NULL) + +janus_cfgconv_CFLAGS = \ + $(AM_CFLAGS) \ + $(JANUS_CFLAGS) \ + $(NULL) + +janus_cfgconv_LDADD = \ + $(JANUS_LIBS) \ + $(JANUS_MANUAL_LIBS) \ + $(NULL) + +dist_man1_MANS += janus-cfgconv.1 + BUILT_SOURCES = cmdline.c cmdline.h version.c cmdline.h: cmdline.c @@ -224,9 +246,9 @@ transports_libjanus_http_la_SOURCES = transports/janus_http.c transports_libjanus_http_la_CFLAGS = $(transports_cflags) $(MHD_CFLAGS) transports_libjanus_http_la_LDFLAGS = $(transports_ldflags) $(MHD_LDFLAGS) $(MHD_LIBS) transports_libjanus_http_la_LIBADD = $(transports_libadd) $(MHD_LDFLAGS) -conf_DATA += conf/janus.transport.http.cfg.sample -EXTRA_DIST += conf/janus.transport.http.cfg.sample.in -CLEANFILES += conf/janus.transport.http.cfg.sample +conf_DATA += conf/janus.transport.http.jcfg.sample +EXTRA_DIST += conf/janus.transport.http.jcfg.sample.in +CLEANFILES += conf/janus.transport.http.jcfg.sample endif if ENABLE_WEBSOCKETS @@ -235,9 +257,9 @@ transports_libjanus_websockets_la_SOURCES = transports/janus_websockets.c transports_libjanus_websockets_la_CFLAGS = $(transports_cflags) transports_libjanus_websockets_la_LDFLAGS = $(transports_ldflags) $(WS_MANUAL_LIBS) transports_libjanus_websockets_la_LIBADD = $(transports_libadd) -conf_DATA += conf/janus.transport.websockets.cfg.sample -EXTRA_DIST += conf/janus.transport.websockets.cfg.sample.in -CLEANFILES += conf/janus.transport.websockets.cfg.sample +conf_DATA += conf/janus.transport.websockets.jcfg.sample +EXTRA_DIST += conf/janus.transport.websockets.jcfg.sample.in +CLEANFILES += conf/janus.transport.websockets.jcfg.sample endif if ENABLE_RABBITMQ @@ -246,8 +268,8 @@ transports_libjanus_rabbitmq_la_SOURCES = transports/janus_rabbitmq.c transports_libjanus_rabbitmq_la_CFLAGS = $(transports_cflags) transports_libjanus_rabbitmq_la_LDFLAGS = $(transports_ldflags) -lrabbitmq transports_libjanus_rabbitmq_la_LIBADD = $(transports_libadd) -conf_DATA += conf/janus.transport.rabbitmq.cfg.sample -EXTRA_DIST += conf/janus.transport.rabbitmq.cfg.sample +conf_DATA += conf/janus.transport.rabbitmq.jcfg.sample +EXTRA_DIST += conf/janus.transport.rabbitmq.jcfg.sample endif if ENABLE_MQTT @@ -256,8 +278,8 @@ transports_libjanus_mqtt_la_SOURCES = transports/janus_mqtt.c transports_libjanus_mqtt_la_CFLAGS = $(transports_cflags) transports_libjanus_mqtt_la_LDFLAGS = $(transports_ldflags) -lpaho-mqtt3as transports_libjanus_mqtt_la_LIBADD = $(transports_libadd) -conf_DATA += conf/janus.transport.mqtt.cfg.sample -EXTRA_DIST += conf/janus.transport.mqtt.cfg.sample +conf_DATA += conf/janus.transport.mqtt.jcfg.sample +EXTRA_DIST += conf/janus.transport.mqtt.jcfg.sample endif if ENABLE_PFUNIX @@ -266,8 +288,8 @@ transports_libjanus_pfunix_la_SOURCES = transports/janus_pfunix.c transports_libjanus_pfunix_la_CFLAGS = $(transports_cflags) transports_libjanus_pfunix_la_LDFLAGS = $(transports_ldflags) $(LIBSYSTEMD_LIBS) transports_libjanus_pfunix_la_LIBADD = $(transports_libadd) -conf_DATA += conf/janus.transport.pfunix.cfg.sample -EXTRA_DIST += conf/janus.transport.pfunix.cfg.sample +conf_DATA += conf/janus.transport.pfunix.jcfg.sample +EXTRA_DIST += conf/janus.transport.pfunix.jcfg.sample endif if ENABLE_NANOMSG @@ -276,8 +298,8 @@ transports_libjanus_nanomsg_la_SOURCES = transports/janus_nanomsg.c transports_libjanus_nanomsg_la_CFLAGS = $(transports_cflags) transports_libjanus_nanomsg_la_LDFLAGS = $(transports_ldflags) -lnanomsg transports_libjanus_nanomsg_la_LIBADD = $(transports_libadd) -conf_DATA += conf/janus.transport.nanomsg.cfg.sample -EXTRA_DIST += conf/janus.transport.nanomsg.cfg.sample +conf_DATA += conf/janus.transport.nanomsg.jcfg.sample +EXTRA_DIST += conf/janus.transport.nanomsg.jcfg.sample endif ## @@ -299,8 +321,8 @@ events_libjanus_sampleevh_la_SOURCES = events/janus_sampleevh.c events_libjanus_sampleevh_la_CFLAGS = $(events_cflags) events_libjanus_sampleevh_la_LDFLAGS = $(events_ldflags) -lcurl events_libjanus_sampleevh_la_LIBADD = $(events_libadd) -conf_DATA += conf/janus.eventhandler.sampleevh.cfg.sample -EXTRA_DIST += conf/janus.eventhandler.sampleevh.cfg.sample +conf_DATA += conf/janus.eventhandler.sampleevh.jcfg.sample +EXTRA_DIST += conf/janus.eventhandler.sampleevh.jcfg.sample endif if ENABLE_RABBITMQEVH @@ -309,8 +331,8 @@ events_libjanus_rabbitmqevh_la_SOURCES = events/janus_rabbitmqevh.c events_libjanus_rabbitmqevh_la_CFLAGS = $(events_cflags) events_libjanus_rabbitmqevh_la_LDFLAGS = $(events_ldflags) -lrabbitmq events_libjanus_rabbitmqevh_la_LIBADD = $(events_libadd) -conf_DATA += conf/janus.eventhandler.rabbitmqevh.cfg.sample -EXTRA_DIST += conf/janus.eventhandler.rabbitmqevh.cfg.sample +conf_DATA += conf/janus.eventhandler.rabbitmqevh.jcfg.sample +EXTRA_DIST += conf/janus.eventhandler.rabbitmqevh.jcfg.sample endif if ENABLE_MQTTEVH @@ -342,8 +364,8 @@ plugins_libjanus_audiobridge_la_SOURCES = plugins/janus_audiobridge.c plugins_libjanus_audiobridge_la_CFLAGS = $(plugins_cflags) $(OPUS_CFLAGS) plugins_libjanus_audiobridge_la_LDFLAGS = $(plugins_ldflags) $(OPUS_LDFLAGS) $(OPUS_LIBS) plugins_libjanus_audiobridge_la_LIBADD = $(plugins_libadd) $(OPUS_LIBADD) -conf_DATA += conf/janus.plugin.audiobridge.cfg.sample -EXTRA_DIST += conf/janus.plugin.audiobridge.cfg.sample +conf_DATA += conf/janus.plugin.audiobridge.jcfg.sample +EXTRA_DIST += conf/janus.plugin.audiobridge.jcfg.sample endif if ENABLE_PLUGIN_ECHOTEST @@ -352,8 +374,8 @@ plugins_libjanus_echotest_la_SOURCES = plugins/janus_echotest.c plugins_libjanus_echotest_la_CFLAGS = $(plugins_cflags) plugins_libjanus_echotest_la_LDFLAGS = $(plugins_ldflags) plugins_libjanus_echotest_la_LIBADD = $(plugins_libadd) -conf_DATA += conf/janus.plugin.echotest.cfg.sample -EXTRA_DIST += conf/janus.plugin.echotest.cfg.sample +conf_DATA += conf/janus.plugin.echotest.jcfg.sample +EXTRA_DIST += conf/janus.plugin.echotest.jcfg.sample endif if ENABLE_PLUGIN_RECORDPLAY @@ -362,15 +384,15 @@ plugins_libjanus_recordplay_la_SOURCES = plugins/janus_recordplay.c plugins_libjanus_recordplay_la_CFLAGS = $(plugins_cflags) plugins_libjanus_recordplay_la_LDFLAGS = $(plugins_ldflags) plugins_libjanus_recordplay_la_LIBADD = $(plugins_libadd) -conf_DATA += conf/janus.plugin.recordplay.cfg.sample +conf_DATA += conf/janus.plugin.recordplay.jcfg.sample recordings_DATA += \ plugins/recordings/1234.nfo \ plugins/recordings/rec-sample-audio.mjr \ plugins/recordings/rec-sample-video.mjr EXTRA_DIST += \ - conf/janus.plugin.recordplay.cfg.sample.in \ + conf/janus.plugin.recordplay.jcfg.sample.in \ $(recordings_DATA) -CLEANFILES += conf/janus.plugin.recordplay.cfg.sample +CLEANFILES += conf/janus.plugin.recordplay.jcfg.sample endif if ENABLE_PLUGIN_SIP @@ -379,8 +401,8 @@ plugins_libjanus_sip_la_SOURCES = plugins/janus_sip.c plugins_libjanus_sip_la_CFLAGS = $(plugins_cflags) $(SOFIA_CFLAGS) plugins_libjanus_sip_la_LDFLAGS = $(plugins_ldflags) $(SOFIA_LDFLAGS) $(SOFIA_LIBS) plugins_libjanus_sip_la_LIBADD = $(plugins_libadd) $(SOFIA_LIBADD) -conf_DATA += conf/janus.plugin.sip.cfg.sample -EXTRA_DIST += conf/janus.plugin.sip.cfg.sample +conf_DATA += conf/janus.plugin.sip.jcfg.sample +EXTRA_DIST += conf/janus.plugin.sip.jcfg.sample endif if ENABLE_PLUGIN_SIPRE @@ -389,8 +411,8 @@ plugins_libjanus_sipre_la_SOURCES = plugins/janus_sipre.c plugins_libjanus_sipre_la_CFLAGS = $(plugins_cflags) $(LIBRE_CFLAGS) plugins_libjanus_sipre_la_LDFLAGS = $(plugins_ldflags) $(LIBRE_LDFLAGS) $(LIBRE_LIBS) plugins_libjanus_sipre_la_LIBADD = $(plugins_libadd) $(LIBRE_LIBADD) -conf_DATA += conf/janus.plugin.sipre.cfg.sample -EXTRA_DIST += conf/janus.plugin.sipre.cfg.sample +conf_DATA += conf/janus.plugin.sipre.jcfg.sample +EXTRA_DIST += conf/janus.plugin.sipre.jcfg.sample endif if ENABLE_PLUGIN_NOSIP @@ -399,8 +421,8 @@ plugins_libjanus_nosip_la_SOURCES = plugins/janus_nosip.c plugins_libjanus_nosip_la_CFLAGS = $(plugins_cflags) plugins_libjanus_nosip_la_LDFLAGS = $(plugins_ldflags) plugins_libjanus_nosip_la_LIBADD = $(plugins_libadd) -conf_DATA += conf/janus.plugin.nosip.cfg.sample -EXTRA_DIST += conf/janus.plugin.nosip.cfg.sample +conf_DATA += conf/janus.plugin.nosip.jcfg.sample +EXTRA_DIST += conf/janus.plugin.nosip.jcfg.sample endif if ENABLE_PLUGIN_STREAMING @@ -409,16 +431,16 @@ plugins_libjanus_streaming_la_SOURCES = plugins/janus_streaming.c plugins_libjanus_streaming_la_CFLAGS = $(plugins_cflags) plugins_libjanus_streaming_la_LDFLAGS = $(plugins_ldflags) plugins_libjanus_streaming_la_LIBADD = $(plugins_libadd) -conf_DATA += conf/janus.plugin.streaming.cfg.sample +conf_DATA += conf/janus.plugin.streaming.jcfg.sample stream_DATA += \ plugins/streams/music.mulaw \ plugins/streams/radio.alaw \ plugins/streams/test_gstreamer.sh \ plugins/streams/test_gstreamer_1.sh EXTRA_DIST += \ - conf/janus.plugin.streaming.cfg.sample.in \ + conf/janus.plugin.streaming.jcfg.sample.in \ $(stream_DATA) -CLEANFILES += conf/janus.plugin.streaming.cfg.sample +CLEANFILES += conf/janus.plugin.streaming.jcfg.sample endif if ENABLE_PLUGIN_VIDEOCALL @@ -427,8 +449,8 @@ plugins_libjanus_videocall_la_SOURCES = plugins/janus_videocall.c plugins_libjanus_videocall_la_CFLAGS = $(plugins_cflags) plugins_libjanus_videocall_la_LDFLAGS = $(plugins_ldflags) plugins_libjanus_videocall_la_LIBADD = $(plugins_libadd) -conf_DATA += conf/janus.plugin.videocall.cfg.sample -EXTRA_DIST += conf/janus.plugin.videocall.cfg.sample +conf_DATA += conf/janus.plugin.videocall.jcfg.sample +EXTRA_DIST += conf/janus.plugin.videocall.jcfg.sample endif if ENABLE_PLUGIN_VIDEOROOM @@ -437,8 +459,8 @@ plugins_libjanus_videoroom_la_SOURCES = plugins/janus_videoroom.c plugins_libjanus_videoroom_la_CFLAGS = $(plugins_cflags) plugins_libjanus_videoroom_la_LDFLAGS = $(plugins_ldflags) plugins_libjanus_videoroom_la_LIBADD = $(plugins_libadd) -conf_DATA += conf/janus.plugin.videoroom.cfg.sample -EXTRA_DIST += conf/janus.plugin.videoroom.cfg.sample +conf_DATA += conf/janus.plugin.videoroom.jcfg.sample +EXTRA_DIST += conf/janus.plugin.videoroom.jcfg.sample endif if ENABLE_PLUGIN_VOICEMAIL @@ -447,9 +469,9 @@ plugins_libjanus_voicemail_la_SOURCES = plugins/janus_voicemail.c plugins_libjanus_voicemail_la_CFLAGS = $(plugins_cflags) plugins_libjanus_voicemail_la_LDFLAGS = $(plugins_ldflags) -logg plugins_libjanus_voicemail_la_LIBADD = $(plugins_libadd) -conf_DATA += conf/janus.plugin.voicemail.cfg.sample -EXTRA_DIST += conf/janus.plugin.voicemail.cfg.sample.in -CLEANFILES += conf/janus.plugin.voicemail.cfg.sample +conf_DATA += conf/janus.plugin.voicemail.jcfg.sample +EXTRA_DIST += conf/janus.plugin.voicemail.jcfg.sample.in +CLEANFILES += conf/janus.plugin.voicemail.jcfg.sample endif if ENABLE_PLUGIN_TEXTROOM @@ -458,8 +480,8 @@ plugins_libjanus_textroom_la_SOURCES = plugins/janus_textroom.c plugins_libjanus_textroom_la_CFLAGS = $(plugins_cflags) plugins_libjanus_textroom_la_LDFLAGS = $(plugins_ldflags) plugins_libjanus_textroom_la_LIBADD = $(plugins_libadd) -conf_DATA += conf/janus.plugin.textroom.cfg.sample -EXTRA_DIST += conf/janus.plugin.textroom.cfg.sample +conf_DATA += conf/janus.plugin.textroom.jcfg.sample +EXTRA_DIST += conf/janus.plugin.textroom.jcfg.sample endif if ENABLE_PLUGIN_LUA @@ -468,13 +490,13 @@ plugins_libjanus_lua_la_SOURCES = plugins/janus_lua.c plugins/janus_lua_data.h p plugins_libjanus_lua_la_CFLAGS = $(plugins_cflags) $(LUA_CFLAGS) plugins_libjanus_lua_la_LDFLAGS = $(plugins_ldflags) $(LUA_LDFLAGS) $(LUA_LIBS) plugins_libjanus_lua_la_LIBADD = $(plugins_libadd) $(LUA_LIBADD) -conf_DATA += conf/janus.plugin.lua.cfg.sample +conf_DATA += conf/janus.plugin.lua.jcfg.sample lua_DATA += \ plugins/lua/echotest.lua \ plugins/lua/videoroom.lua \ plugins/lua/janus-logger.lua \ plugins/lua/janus-sdp.lua -EXTRA_DIST += conf/janus.plugin.lua.cfg.sample.in +EXTRA_DIST += conf/janus.plugin.lua.jcfg.sample.in endif if ENABLE_PLUGIN_DUKTAPE @@ -487,11 +509,11 @@ plugins_libjanus_duktape_la_SOURCES = plugins/janus_duktape.c \ plugins_libjanus_duktape_la_CFLAGS = $(plugins_cflags) $(DUKTAPE_CFLAGS) plugins_libjanus_duktape_la_LDFLAGS = $(plugins_ldflags) $(DUKTAPE_LDFLAGS) $(DUKTAPE_LIBS) plugins_libjanus_duktape_la_LIBADD = $(plugins_libadd) $(DUKTAPE_LIBADD) -conf_DATA += conf/janus.plugin.duktape.cfg.sample +conf_DATA += conf/janus.plugin.duktape.jcfg.sample duktape_DATA += \ plugins/duktape/echotest.js \ plugins/duktape/janus-sdp.js -EXTRA_DIST += conf/janus.plugin.duktape.cfg.sample.in +EXTRA_DIST += conf/janus.plugin.duktape.jcfg.sample.in endif diff --git a/README.md b/README.md index e2f58a16a3..a45dbb7b87 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ To discuss Janus with us and other users, there's a Google Group called [meetech To install it, you'll need to satisfy the following dependencies: * [Jansson](http://www.digip.org/jansson/) +* [libconfig](https://hyperrealm.github.io/libconfig/) * [libnice](http://nice.freedesktop.org/wiki/) (at least v0.1.13 suggested, master recommended) * [OpenSSL](http://www.openssl.org/) (at least v1.0.1e) * [libsrtp](https://github.com/cisco/libsrtp) (at least v1.5 suggested) @@ -42,8 +43,8 @@ All of those libraries are usually available on most of the most common distribu yum install libmicrohttpd-devel jansson-devel \ openssl-devel libsrtp-devel sofia-sip-devel glib-devel \ - opus-devel libogg-devel libcurl-devel lua-devel \ - pkgconfig gengetopt libtool autoconf automake + opus-devel libogg-devel libcurl-devel pkgconfig gengetopt \ + libconfig-devel libtool autoconf automake Notice that you may have to `yum install epel-release` as well if you're attempting an installation on a CentOS machine instead. @@ -52,7 +53,7 @@ On Ubuntu or Debian, it would require something like this: aptitude install libmicrohttpd-dev libjansson-dev \ libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev \ libopus-dev libogg-dev libcurl4-openssl-dev liblua5.3-dev \ - pkg-config gengetopt libtool automake + libconfig-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](http://www.opus-codec.org). @@ -213,8 +214,8 @@ While most of the above instructions will work when compiling Janus on MacOS as First of all, you can use `brew` to install most of the dependencies: brew install jansson libnice openssl srtp libusrsctp libmicrohttpd \ - libwebsockets cmake rabbitmq-c sofia-sip opus libogg curl \ - glib pkg-config gengetopt autoconf automake libtool + libwebsockets cmake rabbitmq-c sofia-sip opus libogg curl glib \ + libconfig pkg-config gengetopt autoconf automake libtool For what concerns libwebsockets, though, make sure that the installed version is higher than `2.4.1`, or you might encounter the problems described in [this post](https://groups.google.com/forum/#!topic/meetecho-janus/HsFaEXBz4Cg). If `brew` doesn't provide a more recent version, you'll have to install the library manually. diff --git a/conf/janus.cfg.sample.in b/conf/janus.cfg.sample.in deleted file mode 100644 index bc1c974ac7..0000000000 --- a/conf/janus.cfg.sample.in +++ /dev/null @@ -1,252 +0,0 @@ -; General configuration: folders where the configuration and the plugins -; can be found, how output should be logged, whether Janus should run as -; a daemon or in foreground, default interface to use, debug/logging level -; and, if needed, shared apisecret and/or token authentication mechanism -; between application(s) and Janus. -[general] -configs_folder = @confdir@ ; Configuration files folder -plugins_folder = @plugindir@ ; Plugins folder -transports_folder = @transportdir@ ; Transports folder -events_folder = @eventdir@ ; Event handlers folder -;log_to_stdout = false ; Whether the Janus output should be written - ; to stdout or not (default=true) -;log_to_file = /path/to/janus.log ; Whether to use a log file or not -;daemonize = true ; Whether Janus should run as a daemon - ; or not (default=run in foreground) -;pid_file = /path/to/janus.pid ; PID file to create when Janus has been - ; started, and to destroy at shutdown -;interface = 1.2.3.4 ; Interface to use (will be used in SDP) -debug_level = 4 ; Debug/logging level, valid values are 0-7 -;debug_timestamps = yes ; Whether to show a timestamp for each log line -;debug_colors = no ; Whether colors should be disabled in the log -;debug_locks = yes ; Whether to enable debugging of locks (very verbose!) -;api_secret = janusrocks ; String that all Janus requests must contain -; to be accepted/authorized by the Janus core. -; Useful if you're wrapping all Janus API requests -; in your servers (that is, not in the browser, -; where you do the things your way) and you -; don't want other application to mess with -; this Janus instance. -;token_auth = yes ; Enable a token based authentication -; mechanism to force users to always provide -; a valid token in all requests. Useful if -; you want to authenticate requests from web -; users. -;token_auth_secret = janus ; Use HMAC-SHA1 signed tokens (with token_auth). Note that -; without this, the Admin API MUST -; be enabled, as tokens are added and removed -; through messages sent there. -admin_secret = janusoverlord ; String that all Janus requests must contain -; to be accepted/authorized by the admin/monitor. -; only needed if you enabled the admin API -; in any of the available transports. -;server_name = MyJanusInstance ; Public name of this Janus instance -; as it will appear in an info request -;session_timeout = 60 ; How long (in seconds) we should wait before -; deciding a Janus session has timed out. A -; session times out when no request is received -; for session_timeout seconds (default=60s). -; Setting this to 0 will disable the timeout -; mechanism, which is NOT suggested as it may -; risk having orphaned sessions (sessions not -; controlled by any transport and never freed). -; To avoid timeouts, keep-alives can be used. -; -;reclaim_session_timeout = 0 ; How long (in seconds) we should wait for a -; janus session to be reclaimed after the transport -; is gone. After the transport is gone, a session -; times out when no request is received for -; reclaim_session_timeout seconds (default=0s). -; Setting this to 0 will disable the timeout -; mechanism, and sessions will be destroyed immediately -; if the transport is gone. -; -;candidates_timeout = 45 ; How long (in seconds) we should keep hold of -; pending (trickle) candidates before discarding -; them (default=45s). Notice that setting this -; to 0 will NOT disable the timeout, but will -; be considered an invalid value and ignored. -; -;recordings_tmp_ext = tmp ; The extension for recordings, in Janus, is -; .mjr, a custom format we devised ourselves. -; By default, we save to .mjr directly. If you'd -; rather the recording filename have a temporary -; extension while it's being saved, and only -; have the .mjr extension when the recording -; is over (e.g., to automatically trigger some -; external scripts), then uncomment and set the -; recordings_tmp_ext property to the extension -; to add to the base (e.g., tmp --> .mjr.tmp). - -;event_loops = 8 ; By default, Janus handles each have their own -; event loop and related thread for all the media -; routing and management. If for some reason you'd -; rather limit the number of loop/threads, and -; you want handles to share those, you can do that -; configuring the event_loops property: this will -; spawn the specified amount of threads at startup, -; run a separate event loop on each of them, and -; add new handles to one of them when attaching. -; Notice that, while cutting the number of threads -; and possibly reducing context switching, this -; might have an impact on the media delivery, -; especially if the available loops can't take -; care of all the handles and their media in time. -; As such, if you want to use this you should -; provision the correct value according to the -; available resources (e.g., CPUs available). - -; Certificate and key to use for DTLS (and passphrase if needed). -[certificates] -cert_pem = @certdir@/mycert.pem -cert_key = @certdir@/mycert.key -;cert_pwd = secretpassphrase - - -; Media-related stuff: you can configure whether if you want -; to enable IPv6 support (still WIP, so handle with care), if RFC4588 -; support should be negotiated or not (off by default), the maximum size -; of the NACK queue (in milliseconds, defaults to 500ms) for retransmissions, the -; range of ports to use for RTP and RTCP (by default, no range is envisaged), the -; starting MTU for DTLS (1200 by default, it adapts automatically), and -; finally how much time, in seconds, should pass with no media (audio or -; video) being received before Janus notifies you about this (default=1s, -; 0 disables these events entirely). Finally, if you're using BoringSSL -; you can customize the frequency of retransmissions: OpenSSL has a fixed -; value of 1 second (the default), while BoringSSL can override that. Notice -; that lower values (e.g., 100ms) will typically get you faster connection -; times, but may not work in case the RTT of the user is high: as such, -; you should pick a reasonable trade-off (usually 2*max expected RTT). -[media] -;ipv6 = true -;max_nack_queue = 500 -;rfc_4588 = yes -;rtp_port_range = 20000-40000 -;dtls_mtu = 1200 -;no_media_timer = 1 -;dtls_timeout = 500 - - -; NAT-related stuff: specifically, you can configure the STUN/TURN -; servers to use to gather candidates if the gateway is behind a NAT, -; and srflx/relay candidates are needed. In case STUN is not enough and -; this is needed (it shouldn't), you can also configure Janus to use a -; TURN server; please notice that this does NOT refer to TURN usage in -; browsers, but in the gathering of relay candidates by Janus itself, -; e.g., if you want to limit the ports used by a Janus instance on a -; private machine. Furthermore, you can choose whether Janus should be -; configured to do full-trickle (Janus also trickles its candidates to -; users) rather than the default half-trickle (Janus supports trickle -; candidates from users, but sends its own within the SDP), and whether -; it should work in ICE-Lite mode (by default it doesn't). Finally, -; you can also enable ICE-TCP support (beware that it currently *only* -; works if you enable ICE Lite as well), choose which interfaces should -; be used for gathering candidates, and enable or disable the -; internal libnice debugging, if needed. -[nat] -;stun_server = stun.voip.eutelia.it -;stun_port = 3478 -nice_debug = false -;full_trickle = true -;ice_lite = true -;ice_tcp = true - -; In case you're deploying Janus on a server which is configured with -; a 1:1 NAT (e.g., Amazon EC2), you might want to also specify the public -; address of the machine using the setting below. This will result in -; all host candidates (which normally have a private IP address) to -; be rewritten with the public address provided in the settings. As -; such, use the option with caution and only if you know what you're doing. -; Make sure you keep ICE Lite disabled, though, as it's not strictly -; speaking a publicly reachable server, and a NAT is still involved. -;nat_1_1_mapping = 1.2.3.4 - -; You can configure a TURN server in two different ways: specifying a -; statically configured TURN server, and thus provide the address of the -; TURN server, the transport (udp/tcp/tls) to use, and a set of valid -; credentials to authenticate... -;turn_server = myturnserver.com -;turn_port = 3478 -;turn_type = udp -;turn_user = myuser -;turn_pwd = mypassword - -; ... or you can make use of the TURN REST API to get info on one or more -; TURN services dynamically. This makes use of the proposed standard of -; such an API (https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00) -; which is currently available in both rfc5766-turn-server and coturn. -; You enable this by specifying the address of your TURN REST API backend, -; the HTTP method to use (GET or POST) and, if required, the API key Janus -; must provide. -;turn_rest_api = http://yourbackend.com/path/to/api -;turn_rest_api_key = anyapikeyyoumayhaveset -;turn_rest_api_method = GET - -; You can also choose which interfaces should be explicitly used by the -; gateway for the purpose of ICE candidates gathering, thus excluding -; others that may be available. To do so, use the 'ice_enforce_list' -; setting and pass it a comma-separated list of interfaces or IP addresses -; to enforce. This is especially useful if the server hosting the gateway -; has several interfaces, and you only want a subset to be used. Any of -; the following examples are valid: -; ice_enforce_list = eth0 -; ice_enforce_list = eth0,eth1 -; ice_enforce_list = eth0,192.168. -; ice_enforce_list = eth0,192.168.0.1 -; By default, no interface is enforced, meaning Janus will try to use them all. -;ice_enforce_list = eth0 - -; In case you don't want to specify specific interfaces to use, but would -; rather tell Janus to use all the available interfaces except some that -; you don't want to involve, you can also choose which interfaces or IP -; addresses should be excluded and ignored by the gateway for the purpose -; of ICE candidates gathering. To do so, use the 'ice_ignore_list' setting -; and pass it a comma-separated list of interfaces or IP addresses to -; ignore. This is especially useful if the server hosting the gateway -; has several interfaces you already know will not be used or will simply -; always slow down ICE (e.g., virtual interfaces created by VMware). -; Partial strings are supported, which means that any of the following -; examples are valid: -; ice_ignore_list = vmnet8,192.168.0.1,10.0.0.1 -; ice_ignore_list = vmnet,192.168. -; Just beware that the ICE ignore list is not used if an enforce list -; has been configured. By default, Janus ignores all interfaces whose -; name starts with 'vmnet', to skip VMware interfaces: -ice_ignore_list = vmnet - -; You can choose which of the available plugins should be -; enabled or not. Use the 'disable' directive to prevent Janus from -; loading one or more plugins: use a comma separated list of plugin file -; names to identify the plugins to disable. By default all available -; plugins are enabled and loaded at startup. -[plugins] -; disable = libjanus_voicemail.so,libjanus_recordplay.so - -; You can choose which of the available transports should be enabled or -; not. Use the 'disable' directive to prevent Janus from loading one -; or more transport: use a comma separated list of transport file names -; to identify the transports to disable. By default all available -; transports are enabled and loaded at startup. -[transports] -; disable = libjanus_rabbitmq.so - -; Event handlers allow you to receive live events from Janus happening -; in core and/or plugins. Since this can require some more resources, -; the feature is disabled by default. Setting broadcast to yes will -; enable them. You can then choose which of the available event handlers -; should be loaded or not. Use the 'disable' directive to prevent Janus -; from loading one or more event handlers: use a comma separated list of -; file names to identify the event handlers to disable. By default, if -; broadcast is set to yes all available event handlers are enabled and -; loaded at startup. Finally, you can choose how often media statistics -; (packets sent/received, losses, etc.) should be sent: by default it's -; once per second (audio and video statistics sent separately), but may -; considered too verbose, or you may want to limit the number of events, -; especially if you have many PeerConnections active. To change this, -; just set 'stats_period' to the number of seconds that should pass in -; between statistics for each handle. Setting it to 0 disables them (but -; not other media-related events). -[events] -; broadcast = yes -; disable = libjanus_sampleevh.so -; stats_period = 5 diff --git a/conf/janus.eventhandler.rabbitmqevh.cfg.sample b/conf/janus.eventhandler.rabbitmqevh.cfg.sample deleted file mode 100644 index f24869dad3..0000000000 --- a/conf/janus.eventhandler.rabbitmqevh.cfg.sample +++ /dev/null @@ -1,29 +0,0 @@ -; This configures the RabbitMQ event handler. - -[general] -enabled = no ; By default the module is not enabled -events = all ; Comma separated list of the events mask you're interested - ; in. Valid values are none, sessions, handles, jsep, webrtc, - ; media, plugins, transports, core, external and all. By - ; default we subscribe to everything (all) -grouping = yes ; Whether events should be sent individually , or if it's ok - ; to group them. The default is 'yes' to limit the number of - ; messages -json = indented ; Whether the JSON messages should be indented (default), - ; plain (no indentation) or compact (no indentation and no spaces) - -host = localhost ; The address of the RabbitMQ server -;port = 5672 ; The port of the RabbitMQ server (5672 by default) -;username = guest ; Username to use to authenticate, if needed -;password = guest ; Password to use to authenticate, if needed -;vhost = / ; Virtual host to specify when logging in, if needed -;exchange = janus-exchange -route_key = janus-events ; Name of the queue for event messages - -;ssl_enable = no ; Whether ssl support must be enabled -;ssl_verify_peer = yes ; Whether peer verification must be enabled -;ssl_verify_hostname = yes ; Whether hostname verification must be enabled -; certificates to use when SSL support is enabled, if needed -;ssl_cacert = /path/to/cacert.pem -;ssl_cert = /path/to/cert.pem -;ssl_key = /path/to/key.pem diff --git a/conf/janus.eventhandler.rabbitmqevh.jcfg.sample b/conf/janus.eventhandler.rabbitmqevh.jcfg.sample new file mode 100644 index 0000000000..c8c9d9c28e --- /dev/null +++ b/conf/janus.eventhandler.rabbitmqevh.jcfg.sample @@ -0,0 +1,31 @@ +# This configures the RabbitMQ event handler. + +general: { + enabled = false # By default the module is not enabled + events = "all" # Comma separated list of the events mask you're interested + # in. Valid values are none, sessions, handles, jsep, webrtc, + # media, plugins, transports, core, external and all. By + # default we subscribe to everything (all) + grouping = true # Whether events should be sent individually , or if it's ok + # to group them. The default is 'yes' to limit the number of + # messages + json = "indented" # Whether the JSON messages should be indented (default), + # plain (no indentation) or compact (no indentation and no spaces) + + host = "localhost" # The address of the RabbitMQ server + #port = 5672 # The port of the RabbitMQ server (5672 by default) + #username = "guest" # Username to use to authenticate, if needed + #password = "guest" # Password to use to authenticate, if needed + #vhost = "/" # Virtual host to specify when logging in, if needed + #exchange = "janus-exchange" + route_key = "janus-events" # Name of the queue for event messages + + #ssl_enable = false # Whether ssl support must be enabled + #ssl_verify_peer = true # Whether peer verification must be enabled + #ssl_verify_hostname = true # Whether hostname verification must be enabled + + # Certificates to use when SSL support is enabled, if needed + #ssl_cacert = "/path/to/cacert.pem" + #ssl_cert = "/path/to/cert.pem" + #ssl_key = "/path/to/key.pem" +} diff --git a/conf/janus.eventhandler.sampleevh.cfg.sample b/conf/janus.eventhandler.sampleevh.cfg.sample deleted file mode 100644 index a1955dc1dd..0000000000 --- a/conf/janus.eventhandler.sampleevh.cfg.sample +++ /dev/null @@ -1,38 +0,0 @@ -; This configures the sample event handler. Since this plugin simply -; forwards each event it receives via HTTP POST, you simply need to -; configure (i) which events to subscribe to, and (ii) the address of -; the web server which will receive the requests. - -[general] -enabled = no ; By default the module is not enabled -events = all ; Comma separated list of the events mask you're interested - ; in. Valid values are none, sessions, handles, jsep, webrtc, - ; media, plugins, transports, core, external and all. By - ; default we subscribe to everything (all) -grouping = yes ; Whether events should be sent individually (one per - ; HTTP POST, JSON object), or if it's ok to group them - ; (one or more per HTTP POST, JSON array with objects) - ; The default is 'yes' to limit the number of connections. -json = indented ; Whether the JSON messages should be indented (default), - ; plain (no indentation) or compact (no indentation and no spaces) - -backend = http://your.webserver.here/and/a/path - ; Address the plugin will send all events to as HTTP POST - ; requests with an application/json payload. In case - ; authentication is required to contact the backend, set - ; the credentials as well (basic authentication only). -;backend_user = myuser -;backend_pwd = mypwd - ; You can also configure how retransmissions should - ; happen, after a failed attempt to deliver an event. - ; Specifically, you can specify how many times a - ; retransmission should be attempted (default=5) and - ; which step is used, in milliseconds, for the exponential - ; backoff before retrying (e.g, if step=100ms, then the - ; the first retry will happen after 100ms, the second - ; after 200ms, then 400ms, and so on). If the event cannot - ; be retransmitted after the maximum number of attemps - ; is reached, then it's lost. Beware that retransmissions - ; will also delay pending events and increase the queue. -;max_retransmissions = 5 -;retransmissions_backoff = 100 diff --git a/conf/janus.eventhandler.sampleevh.jcfg.sample b/conf/janus.eventhandler.sampleevh.jcfg.sample new file mode 100644 index 0000000000..31ed3c4b8c --- /dev/null +++ b/conf/janus.eventhandler.sampleevh.jcfg.sample @@ -0,0 +1,41 @@ +# This configures the sample event handler. Since this plugin simply +# forwards each event it receives via HTTP POST, you simply need to +# configure (i) which events to subscribe to, and (ii) the address of +# the web server which will receive the requests. + +general: { + enabled = false # By default the module is not enabled + events = "all" # Comma separated list of the events mask you're interested + # in. Valid values are none, sessions, handles, jsep, webrtc, + # media, plugins, transports, core, external and all. By + # default we subscribe to everything (all) + grouping = true # Whether events should be sent individually (one per + # HTTP POST, JSON object), or if it's ok to group them + # (one or more per HTTP POST, JSON array with objects) + # The default is 'yes' to limit the number of connections. + + # Address the plugin will send all events to as HTTP POST + # requests with an application/json payload. In case + # authentication is required to contact the backend, set + # the credentials as well (basic authentication only). + json = "indented" # Whether the JSON messages should be indented (default), + # plain (no indentation) or compact (no indentation and no spaces) + + backend = "http://your.webserver.here/and/a/path" + #backend_user = "myuser" + #backend_pwd = "mypwd" + + # You can also configure how retransmissions should + # happen, after a failed attempt to deliver an event. + # Specifically, you can specify how many times a + # retransmission should be attempted (default=5) and + # which step is used, in milliseconds, for the exponential + # backoff before retrying (e.g, if step=100ms, then the + # the first retry will happen after 100ms, the second + # after 200ms, then 400ms, and so on). If the event cannot + # be retransmitted after the maximum number of attemps + # is reached, then it's lost. Beware that retransmissions + # will also delay pending events and increase the queue. + #max_retransmissions = 5 + #retransmissions_backoff = 100 +} diff --git a/conf/janus.jcfg.sample.in b/conf/janus.jcfg.sample.in new file mode 100644 index 0000000000..a2b67f32ff --- /dev/null +++ b/conf/janus.jcfg.sample.in @@ -0,0 +1,261 @@ +# General configuration: folders where the configuration and the plugins +# can be found, how output should be logged, whether Janus should run as +# a daemon or in foreground, default interface to use, debug/logging level +# and, if needed, shared apisecret and/or token authentication mechanism +# between application(s) and Janus. +general: { + configs_folder = "@confdir@" # Configuration files folder + plugins_folder = "@plugindir@" # Plugins folder + transports_folder = "@transportdir@" # Transports folder + events_folder = "@eventdir@" # Event handlers folder + + # The next settings configure logging + #log_to_stdout = false # Whether the Janus output should be written + # to stdout or not (default=true) + #log_to_file = "/path/to/janus.log" # Whether to use a log file or not + debug_level = 4 # Debug/logging level, valid values are 0-7 + #debug_timestamps = true # Whether to show a timestamp for each log line + #debug_colors = false # Whether colors should be disabled in the log + #debug_locks = true # Whether to enable debugging of locks (very verbose!) + + # This is what you configure if you want to launch Janus as a daemon + #daemonize = true # Whether Janus should run as a daemon + # or not (default=run in foreground) + #pid_file = "/path/to/janus.pid" # PID file to create when Janus has been + # started, and to destroy at shutdown + + # There are different ways you can authenticate the Janus and Admin APIs + #api_secret = "janusrocks" # String that all Janus requests must contain + # to be accepted/authorized by the Janus core. + # Useful if you're wrapping all Janus API requests + # in your servers (that is, not in the browser, + # where you do the things your way) and you + # don't want other application to mess with + # this Janus instance. + #token_auth = true # Enable a token based authentication + # mechanism to force users to always provide + # a valid token in all requests. Useful if + # you want to authenticate requests from web + # users. + #token_auth_secret = "janus" # Use HMAC-SHA1 signed tokens (with token_auth). Note that + # without this, the Admin API MUST + # be enabled, as tokens are added and removed + # through messages sent there. + admin_secret = "janusoverlord" # String that all Janus requests must contain + # to be accepted/authorized by the admin/monitor. + # only needed if you enabled the admin API + # in any of the available transports. + + # Generic settings + #interface = "1.2.3.4" # Interface to use (will be used in SDP) + #server_name = "MyJanusInstance"# Public name of this Janus instance + # as it will appear in an info request + #session_timeout = 60 # How long (in seconds) we should wait before + # deciding a Janus session has timed out. A + # session times out when no request is received + # for session_timeout seconds (default=60s). + # Setting this to 0 will disable the timeout + # mechanism, which is NOT suggested as it may + # risk having orphaned sessions (sessions not + # controlled by any transport and never freed). + # To avoid timeouts, keep-alives can be used. + #candidates_timeout = 45 # How long (in seconds) we should keep hold of + # pending (trickle) candidates before discarding + # them (default=45s). Notice that setting this + # to 0 will NOT disable the timeout, but will + # be considered an invalid value and ignored. + #reclaim_session_timeout = 0 # How long (in seconds) we should wait for a + # janus session to be reclaimed after the transport + # is gone. After the transport is gone, a session + # times out when no request is received for + # reclaim_session_timeout seconds (default=0s). + # Setting this to 0 will disable the timeout + # mechanism, and sessions will be destroyed immediately + # if the transport is gone. + #recordings_tmp_ext = "tmp" # The extension for recordings, in Janus, is + # .mjr, a custom format we devised ourselves. + # By default, we save to .mjr directly. If you'd + # rather the recording filename have a temporary + # extension while it's being saved, and only + # have the .mjr extension when the recording + # is over (e.g., to automatically trigger some + # external scripts), then uncomment and set the + # recordings_tmp_ext property to the extension + # to add to the base (e.g., tmp --> .mjr.tmp). + #event_loops = 8 # By default, Janus handles each have their own + # event loop and related thread for all the media + # routing and management. If for some reason you'd + # rather limit the number of loop/threads, and + # you want handles to share those, you can do that + # configuring the event_loops property: this will + # spawn the specified amount of threads at startup, + # run a separate event loop on each of them, and + # add new handles to one of them when attaching. + # Notice that, while cutting the number of threads + # and possibly reducing context switching, this + # might have an impact on the media delivery, + # especially if the available loops can't take + # care of all the handles and their media in time. + # As such, if you want to use this you should + # provision the correct value according to the + # available resources (e.g., CPUs available). +} + +# Certificate and key to use for DTLS (and passphrase if needed). +certificates: { + cert_pem = "@certdir@/mycert.pem" + cert_key = "@certdir@/mycert.key" + #cert_pwd = "secretpassphrase" +} + +# Media-related stuff: you can configure whether if you want +# to enable IPv6 support (still WIP, so handle with care), if RFC4588 +# support should be negotiated or not (off by default), the maximum size +# of the NACK queue (in milliseconds, defaults to 500ms) for retransmissions, the +# range of ports to use for RTP and RTCP (by default, no range is envisaged), the +# starting MTU for DTLS (1200 by default, it adapts automatically), and +# finally how much time, in seconds, should pass with no media (audio or +# video) being received before Janus notifies you about this (default=1s, +# 0 disables these events entirely). Finally, if you're using BoringSSL +# you can customize the frequency of retransmissions: OpenSSL has a fixed +# value of 1 second (the default), while BoringSSL can override that. Notice +# that lower values (e.g., 100ms) will typically get you faster connection +# times, but may not work in case the RTT of the user is high: as such, +# you should pick a reasonable trade-off (usually 2*max expected RTT). +media: { + #ipv6 = true + #max_nack_queue = 500 + #rfc_4588 = true + #rtp_port_range = "20000-40000" + #dtls_mtu = 1200 + #no_media_timer = 1 + #dtls_timeout = 500 +} + +# NAT-related stuff: specifically, you can configure the STUN/TURN +# servers to use to gather candidates if the gateway is behind a NAT, +# and srflx/relay candidates are needed. In case STUN is not enough and +# this is needed (it shouldn't), you can also configure Janus to use a +# TURN server# please notice that this does NOT refer to TURN usage in +# browsers, but in the gathering of relay candidates by Janus itself, +# e.g., if you want to limit the ports used by a Janus instance on a +# private machine. Furthermore, you can choose whether Janus should be +# configured to do full-trickle (Janus also trickles its candidates to +# users) rather than the default half-trickle (Janus supports trickle +# candidates from users, but sends its own within the SDP), and whether +# it should work in ICE-Lite mode (by default it doesn't). Finally, +# you can also enable ICE-TCP support (beware that it currently *only* +# works if you enable ICE Lite as well), choose which interfaces should +# be used for gathering candidates, and enable or disable the +# internal libnice debugging, if needed. +nat: { + #stun_server = "stun.voip.eutelia.it" + #stun_port = 3478 + nice_debug = false + #full_trickle = true + #ice_lite = true + #ice_tcp = true + + # In case you're deploying Janus on a server which is configured with + # a 1:1 NAT (e.g., Amazon EC2), you might want to also specify the public + # address of the machine using the setting below. This will result in + # all host candidates (which normally have a private IP address) to + # be rewritten with the public address provided in the settings. As + # such, use the option with caution and only if you know what you're doing. + # Make sure you keep ICE Lite disabled, though, as it's not strictly + # speaking a publicly reachable server, and a NAT is still involved. + #nat_1_1_mapping = "1.2.3.4" + + # You can configure a TURN server in two different ways: specifying a + # statically configured TURN server, and thus provide the address of the + # TURN server, the transport (udp/tcp/tls) to use, and a set of valid + # credentials to authenticate... + #turn_server = "myturnserver.com" + #turn_port = 3478 + #turn_type = "udp" + #turn_user = "myuser" + #turn_pwd = "mypassword" + + # ... or you can make use of the TURN REST API to get info on one or more + # TURN services dynamically. This makes use of the proposed standard of + # such an API (https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00) + # which is currently available in both rfc5766-turn-server and coturn. + # You enable this by specifying the address of your TURN REST API backend, + # the HTTP method to use (GET or POST) and, if required, the API key Janus + # must provide. + #turn_rest_api = "http://yourbackend.com/path/to/api" + #turn_rest_api_key = "anyapikeyyoumayhaveset" + #turn_rest_api_method = "GET" + + # You can also choose which interfaces should be explicitly used by the + # gateway for the purpose of ICE candidates gathering, thus excluding + # others that may be available. To do so, use the 'ice_enforce_list' + # setting and pass it a comma-separated list of interfaces or IP addresses + # to enforce. This is especially useful if the server hosting the gateway + # has several interfaces, and you only want a subset to be used. Any of + # the following examples are valid: + # ice_enforce_list = "eth0" + # ice_enforce_list = "eth0,eth1" + # ice_enforce_list = "eth0,192.168." + # ice_enforce_list = "eth0,192.168.0.1" + # By default, no interface is enforced, meaning Janus will try to use them all. + #ice_enforce_list = "eth0" + + # In case you don't want to specify specific interfaces to use, but would + # rather tell Janus to use all the available interfaces except some that + # you don't want to involve, you can also choose which interfaces or IP + # addresses should be excluded and ignored by the gateway for the purpose + # of ICE candidates gathering. To do so, use the 'ice_ignore_list' setting + # and pass it a comma-separated list of interfaces or IP addresses to + # ignore. This is especially useful if the server hosting the gateway + # has several interfaces you already know will not be used or will simply + # always slow down ICE (e.g., virtual interfaces created by VMware). + # Partial strings are supported, which means that any of the following + # examples are valid: + # ice_ignore_list = "vmnet8,192.168.0.1,10.0.0.1" + # ice_ignore_list = "vmnet,192.168." + # Just beware that the ICE ignore list is not used if an enforce list + # has been configured. By default, Janus ignores all interfaces whose + # name starts with 'vmnet', to skip VMware interfaces: + ice_ignore_list = "vmnet" +} + +# You can choose which of the available plugins should be +# enabled or not. Use the 'disable' directive to prevent Janus from +# loading one or more plugins: use a comma separated list of plugin file +# names to identify the plugins to disable. By default all available +# plugins are enabled and loaded at startup. +plugins: { + #disable = "libjanus_voicemail.so,libjanus_recordplay.so" +} + +# You can choose which of the available transports should be enabled or +# not. Use the 'disable' directive to prevent Janus from loading one +# or more transport: use a comma separated list of transport file names +# to identify the transports to disable. By default all available +# transports are enabled and loaded at startup. +transports: { + #disable = "libjanus_rabbitmq.so" +} + +# Event handlers allow you to receive live events from Janus happening +# in core and/or plugins. Since this can require some more resources, +# the feature is disabled by default. Setting broadcast to yes will +# enable them. You can then choose which of the available event handlers +# should be loaded or not. Use the 'disable' directive to prevent Janus +# from loading one or more event handlers: use a comma separated list of +# file names to identify the event handlers to disable. By default, if +# broadcast is set to yes all available event handlers are enabled and +# loaded at startup. Finally, you can choose how often media statistics +# (packets sent/received, losses, etc.) should be sent: by default it's +# once per second (audio and video statistics sent separately), but may +# considered too verbose, or you may want to limit the number of events, +# especially if you have many PeerConnections active. To change this, +# just set 'stats_period' to the number of seconds that should pass in +# between statistics for each handle. Setting it to 0 disables them (but +# not other media-related events). +events: { + #broadcast = true + #disable = "libjanus_sampleevh.so" + #stats_period = 5 +} diff --git a/conf/janus.plugin.audiobridge.cfg.sample b/conf/janus.plugin.audiobridge.cfg.sample deleted file mode 100644 index b606b0034f..0000000000 --- a/conf/janus.plugin.audiobridge.cfg.sample +++ /dev/null @@ -1,39 +0,0 @@ -; [] -; description = This is my awesome room -; is_private = yes|no (whether this room should be in the public list, default=yes) -; secret = -; pin = -; sampling_rate = (e.g., 16000 for wideband mixing) -; audiolevel_ext = yes|no (whether the ssrc-audio-level RTP extension must -; be negotiated/used or not for new joins, default=yes) -; audiolevel_event = yes|no (whether to emit event to other users or not, default=no) -; audio_active_packets = 100 (number of packets with audio level, default=100, 2 seconds) -; audio_level_average = 25 (average value of audio level, 127=muted, 0='too loud', default=25) -; record = true|false (whether this room should be recorded, default=false) -; record_file = /path/to/recording.wav (where to save the recording) -; -; The following lines are only needed if you want the mixed audio -; to be automatically forwarded via plain RTP to an external component -; (e.g., an ffmpeg script, or a gstreamer pipeline) for processing -; By default plain RTP is used, SRTP must be configured if needed -; rtp_forward_id = numeric RTP forwarder ID for referencing it via API (optional: random ID used if missing) -; rtp_forward_host = host address to forward RTP packets of mixed audio to -; rtp_forward_port = port to forward RTP packets of mixed audio to -; rtp_forward_ssrc = SSRC to use to use when streaming (optional: stream_id used if missing) -; rtp_forward_ptype = payload type to use when streaming (optional: 100 used if missing) -; rtp_forward_srtp_suite = length of authentication tag (32 or 80) -; rtp_forward_srtp_crypto = key to use as crypto (base64 encoded key as in SDES) -; rtp_forward_always_on = true|false, whether silence should be forwarded when the room is empty (optional: false used if missing) - -[general] -;admin_key = supersecret ; If set, rooms can be created via API only - ; if this key is provided in the request -;events = no ; Whether events should be sent to event - ; handlers (default is yes) - -[1234] -description = Demo Room -secret = adminpwd -sampling_rate = 16000 -record = false -;record_file = /path/to/recording.wav diff --git a/conf/janus.plugin.audiobridge.jcfg.sample b/conf/janus.plugin.audiobridge.jcfg.sample new file mode 100644 index 0000000000..76bf13d42c --- /dev/null +++ b/conf/janus.plugin.audiobridge.jcfg.sample @@ -0,0 +1,42 @@ +# room-: { +# description = This is my awesome room +# is_private = yes|no (whether this room should be in the public list, default=yes) +# secret = +# pin = +# sampling_rate = (e.g., 16000 for wideband mixing) +# audiolevel_ext = yes|no (whether the ssrc-audio-level RTP extension must +# be negotiated/used or not for new joins, default=yes) +# audiolevel_event = yes|no (whether to emit event to other users or not, default=no) +# audio_active_packets = 100 (number of packets with audio level, default=100, 2 seconds) +# audio_level_average = 25 (average value of audio level, 127=muted, 0='too loud', default=25) +# record = true|false (whether this room should be recorded, default=false) +# record_file = /path/to/recording.wav (where to save the recording) +# +# The following lines are only needed if you want the mixed audio +# to be automatically forwarded via plain RTP to an external component +# (e.g., an ffmpeg script, or a gstreamer pipeline) for processing +# By default plain RTP is used, SRTP must be configured if needed +# rtp_forward_id = numeric RTP forwarder ID for referencing it via API (optional: random ID used if missing) +# rtp_forward_host = host address to forward RTP packets of mixed audio to +# rtp_forward_port = port to forward RTP packets of mixed audio to +# rtp_forward_ssrc = SSRC to use to use when streaming (optional: stream_id used if missing) +# rtp_forward_ptype = payload type to use when streaming (optional: 100 used if missing) +# rtp_forward_srtp_suite = length of authentication tag (32 or 80) +# rtp_forward_srtp_crypto = key to use as crypto (base64 encoded key as in SDES) +# rtp_forward_always_on = true|false, whether silence should be forwarded when the room is empty (optional: false used if missing) +#} + +general: { + #admin_key = "supersecret" # If set, rooms can be created via API only + # if this key is provided in the request + #events = false # Whether events should be sent to event + # handlers (default is yes) +} + +room-1234: { + description = "Demo Room" + secret = "adminpwd" + sampling_rate = 16000 + record = false + #record_file = "/path/to/recording.wav" +} diff --git a/conf/janus.plugin.duktape.cfg.sample.in b/conf/janus.plugin.duktape.cfg.sample.in deleted file mode 100644 index b11f8d8bb3..0000000000 --- a/conf/janus.plugin.duktape.cfg.sample.in +++ /dev/null @@ -1,19 +0,0 @@ -; The only things you configure in here are which JavaScipt file to load and, -; optionally, the paths to add for searching libraries and a configuration -; file, if the script will need it. For what concerns the libraries path, -; by default this configuration file adds a path to where the JS samples -; have been installed, as it contains a couple of helper libraries the -; samples use; should you be interested in adding more, just add other -; paths separated by a semicolon. Due to the syntax of the configuration -; file, make sure you escape all semicolons with a trailing slash, in case. -; The 'config' property is entirely script specific, instead: if your -; script will need to rely on an XML configuration file in its initialization, -; for instance, then set the 'config' property as the path to the file; -; it will be passed, as is, to your script in the init() call. None of -; the samples use this property, which is why it's commented out. - -[general] -path = @duktapedir@ -script = @duktapedir@/echotest.js -;script = @duktapedir@/videoroom.js -;config = /path/to/configfile diff --git a/conf/janus.plugin.duktape.jcfg.sample.in b/conf/janus.plugin.duktape.jcfg.sample.in new file mode 100644 index 0000000000..a2c1b1b425 --- /dev/null +++ b/conf/janus.plugin.duktape.jcfg.sample.in @@ -0,0 +1,20 @@ +# The only things you configure in here are which JavaScipt file to load and, +# optionally, the paths to add for searching libraries and a configuration +# file, if the script will need it. For what concerns the libraries path, +# by default this configuration file adds a path to where the JS samples +# have been installed, as it contains a couple of helper libraries the +# samples use; should you be interested in adding more, just add other +# paths separated by a semicolon. Due to the syntax of the configuration +# file, make sure you escape all semicolons with a trailing slash, in case. +# The 'config' property is entirely script specific, instead: if your +# script will need to rely on an XML configuration file in its initialization, +# for instance, then set the 'config' property as the path to the file; +# it will be passed, as is, to your script in the init() call. None of +# the samples use this property, which is why it's commented out. + +general: { + path = "@duktapedir@" + script = "@duktapedir@/echotest.js" + #script = "@duktapedir@/videoroom.js" + #config = "/path/to/configfile" +} diff --git a/conf/janus.plugin.echotest.cfg.sample b/conf/janus.plugin.echotest.cfg.sample deleted file mode 100644 index 7c978e85e6..0000000000 --- a/conf/janus.plugin.echotest.cfg.sample +++ /dev/null @@ -1,4 +0,0 @@ -; events = yes|no, whether events should be sent to event handlers - -[general] -;events = no diff --git a/conf/janus.plugin.echotest.jcfg.sample b/conf/janus.plugin.echotest.jcfg.sample new file mode 100644 index 0000000000..3f9e9ab8f9 --- /dev/null +++ b/conf/janus.plugin.echotest.jcfg.sample @@ -0,0 +1,5 @@ +# events = yes|no, whether events should be sent to event handlers + +general: { + #events = false +} diff --git a/conf/janus.plugin.lua.cfg.sample.in b/conf/janus.plugin.lua.cfg.sample.in deleted file mode 100644 index 0972ce0ff2..0000000000 --- a/conf/janus.plugin.lua.cfg.sample.in +++ /dev/null @@ -1,19 +0,0 @@ -; The only things you configure in here are which lua script to load and, -; optionally, the paths to add for searching libraries and a configuration -; file, if the script will need it. For what concerns the libraries path, -; by default this configuration file adds a path to where the Lua samples -; have been installed, as it contains a couple of helper libraries the -; samples use; should you be interested in adding more, just add other -; paths separated by a semicolon. Due to the syntax of the configuration -; file, make sure you escape all semicolons with a trailing slash, in case. -; The 'config' property is entirely script specific, instead: if your -; script will need to rely on an XML configuration file in its initialization, -; for instance, then set the 'config' property as the path to the file; -; it will be passed, as is, to your script in the init() call. None of -; the samples use this property, which is why it's commented out. - -[general] -path = @luadir@ -script = @luadir@/echotest.lua -;script = @luadir@/videoroom.lua -;config = /path/to/configfile diff --git a/conf/janus.plugin.lua.jcfg.sample.in b/conf/janus.plugin.lua.jcfg.sample.in new file mode 100644 index 0000000000..a50927b8fb --- /dev/null +++ b/conf/janus.plugin.lua.jcfg.sample.in @@ -0,0 +1,20 @@ +# The only things you configure in here are which lua script to load and, +# optionally, the paths to add for searching libraries and a configuration +# file, if the script will need it. For what concerns the libraries path, +# by default this configuration file adds a path to where the Lua samples +# have been installed, as it contains a couple of helper libraries the +# samples use; should you be interested in adding more, just add other +# paths separated by a semicolon. Due to the syntax of the configuration +# file, make sure you escape all semicolons with a trailing slash, in case. +# The 'config' property is entirely script specific, instead: if your +# script will need to rely on an XML configuration file in its initialization, +# for instance, then set the 'config' property as the path to the file; +# it will be passed, as is, to your script in the init() call. None of +# the samples use this property, which is why it's commented out. + +general: { + path = "@luadir@" + script = "@luadir@/echotest.lua" + #script = "@luadir@/videoroom.lua" + #config = "/path/to/configfile" +} diff --git a/conf/janus.plugin.nosip.cfg.sample b/conf/janus.plugin.nosip.cfg.sample deleted file mode 100644 index ff0efe50b4..0000000000 --- a/conf/janus.plugin.nosip.cfg.sample +++ /dev/null @@ -1,10 +0,0 @@ -[general] -; Specify which local IP address to use. If not set it will be automatically -; guessed from the system -;local_ip = 1.2.3.4 - -; Range of ports to use for RTP/RTCP (default=10000-60000) -rtp_port_range = 20000-40000 - -; Whether events should be sent to event handlers (default is yes) -;events = no diff --git a/conf/janus.plugin.nosip.jcfg.sample b/conf/janus.plugin.nosip.jcfg.sample new file mode 100644 index 0000000000..814f0d9f63 --- /dev/null +++ b/conf/janus.plugin.nosip.jcfg.sample @@ -0,0 +1,11 @@ +general: { + # Specify which local IP address to use. If not set it will be automatically + # guessed from the system + #local_ip = "1.2.3.4" + + # Range of ports to use for RTP/RTCP (default=10000-60000) + rtp_port_range = "20000-40000" + + # Whether events should be sent to event handlers (default is yes) + #events = false +} diff --git a/conf/janus.plugin.recordplay.cfg.sample.in b/conf/janus.plugin.recordplay.cfg.sample.in deleted file mode 100644 index 601b0829b1..0000000000 --- a/conf/janus.plugin.recordplay.cfg.sample.in +++ /dev/null @@ -1,6 +0,0 @@ -; path = where to place recordings in the file system -; events = yes|no, whether events should be sent to event handlers - -[general] -path = @recordingsdir@ -;events = no diff --git a/conf/janus.plugin.recordplay.jcfg.sample.in b/conf/janus.plugin.recordplay.jcfg.sample.in new file mode 100644 index 0000000000..6d8ed2682c --- /dev/null +++ b/conf/janus.plugin.recordplay.jcfg.sample.in @@ -0,0 +1,7 @@ +# path = where to place recordings in the file system +# events = yes|no, whether events should be sent to event handlers + +general: { + path = "@recordingsdir@" + #events = false +} diff --git a/conf/janus.plugin.sip.cfg.sample b/conf/janus.plugin.sip.cfg.sample deleted file mode 100644 index 4b90be8915..0000000000 --- a/conf/janus.plugin.sip.cfg.sample +++ /dev/null @@ -1,26 +0,0 @@ -[general] -; Specify which local IP address to use. If not set it will be automatically -; guessed from the system -;local_ip = 1.2.3.4 - -; Enable local keep-alives to keep the registration open. Keep-alives are -; sent in the form of OPTIONS requests, at the given interval inseconds. -; (0 to disable) -keepalive_interval = 120 - -; Indicate if the server is behind NAT. If so, the server will use STUN -; to guess its own public IP address and use it in the Contact header of -; outgoing requests -behind_nat = no - -; User-Agent string to be used -; user_agent = Cool WebRTC Gateway - -; Expiration time for registrations -register_ttl = 3600 - -; Range of ports to use for RTP/RTCP (default=10000-60000) -rtp_port_range = 20000-40000 - -; Whether events should be sent to event handlers (default is yes) -;events = no diff --git a/conf/janus.plugin.sip.jcfg.sample b/conf/janus.plugin.sip.jcfg.sample new file mode 100644 index 0000000000..3bd0cebcc8 --- /dev/null +++ b/conf/janus.plugin.sip.jcfg.sample @@ -0,0 +1,27 @@ +general: { + # Specify which local IP address to use. If not set it will be automatically + # guessed from the system + #local_ip = "1.2.3.4" + + # Enable local keep-alives to keep the registration open. Keep-alives are + # sent in the form of OPTIONS requests, at the given interval inseconds. + # (0 to disable) + keepalive_interval = 120 + + # Indicate if the server is behind NAT. If so, the server will use STUN + # to guess its own public IP address and use it in the Contact header of + # outgoing requests + behind_nat = false + + # User-Agent string to be used + # user_agent = "Cool WebRTC Gateway" + + # Expiration time for registrations + register_ttl = 3600 + + # Range of ports to use for RTP/RTCP (default=10000-60000) + rtp_port_range = "20000-40000" + + # Whether events should be sent to event handlers (default is yes) + #events = false +} diff --git a/conf/janus.plugin.sipre.cfg.sample b/conf/janus.plugin.sipre.cfg.sample deleted file mode 100644 index f13e75317a..0000000000 --- a/conf/janus.plugin.sipre.cfg.sample +++ /dev/null @@ -1,16 +0,0 @@ -[general] -; Specify which local IP address to use. If not set it will be automatically -; guessed from the system -;local_ip = 1.2.3.4 - -; User-Agent string to be used -; user_agent = Cool WebRTC Gateway - -; Expiration time for registrations -register_ttl = 3600 - -; Range of ports to use for RTP/RTCP (default=10000-60000) -rtp_port_range = 20000-40000 - -; Whether events should be sent to event handlers (default is yes) -;events = no diff --git a/conf/janus.plugin.sipre.jcfg.sample b/conf/janus.plugin.sipre.jcfg.sample new file mode 100644 index 0000000000..911c96b7c5 --- /dev/null +++ b/conf/janus.plugin.sipre.jcfg.sample @@ -0,0 +1,17 @@ +general: { + # Specify which local IP address to use. If not set it will be automatically + # guessed from the system + #local_ip = "1.2.3.4" + + # User-Agent string to be used + # user_agent = "Cool WebRTC Gateway" + + # Expiration time for registrations + register_ttl = 3600 + + # Range of ports to use for RTP/RTCP (default=10000-60000) + rtp_port_range = "20000-40000" + + # Whether events should be sent to event handlers (default is yes) + #events = false +} diff --git a/conf/janus.plugin.streaming.cfg.sample.in b/conf/janus.plugin.streaming.cfg.sample.in deleted file mode 100644 index 2f108eaf4f..0000000000 --- a/conf/janus.plugin.streaming.cfg.sample.in +++ /dev/null @@ -1,194 +0,0 @@ -; [stream-name] -; type = rtp|live|ondemand|rtsp -; rtp = stream originated by an external tool (e.g., gstreamer or -; ffmpeg) and sent to the plugin via RTP -; live = local file streamed live to multiple listeners -; (multiple listeners = same streaming context) -; ondemand = local file streamed on-demand to a single listener -; (multiple listeners = different streaming contexts) -; rtsp = stream originated by an external RTSP feed (only -; available if libcurl support was compiled) -; id = (if missing, a random one will be generated) -; description = This is my awesome stream -; is_private = yes|no (private streams don't appear when you do a 'list' -; request) -; secret = -; pin = -; filename = path to the local file to stream (only for live/ondemand) -; audio = yes|no (do/don't stream audio) -; video = yes|no (do/don't stream video) -; The following options are only valid for the 'rtp' type: -; data = yes|no (do/don't stream text via datachannels) -; audioport = local port for receiving audio frames -; audiortcpport = local port, if any, for receiving and sending audio RTCP feedback -; audiomcast = multicast group for receiving audio frames, if any -; audioiface = network interface or IP address to bind to, if any (binds to all otherwise) -; audiopt =