pax_global_header00006660000000000000000000000064142014222750014511gustar00rootroot0000000000000052 comment=21a5fc91d2c508481b9173e474a8688d615fd580 janus-gateway-0.11.8/000077500000000000000000000000001420142227500143575ustar00rootroot00000000000000janus-gateway-0.11.8/.editorconfig000066400000000000000000000001251420142227500170320ustar00rootroot00000000000000root = true [*] end_of_line = lf indent_style = tab trim_trailing_whitespace = true janus-gateway-0.11.8/.eslintrc.js000066400000000000000000000005001420142227500166110ustar00rootroot00000000000000module.exports = { "env": { "browser": true, "es6": true, "jquery": true }, "extends": "eslint:recommended", "rules": { "no-console": "off", "no-empty": "off", }, "globals": { "adapter": "readonly", "RTCRtpTransceiver": "readonly" } }; janus-gateway-0.11.8/.gitattributes000066400000000000000000000000171420142227500172500ustar00rootroot00000000000000*.mulaw binary janus-gateway-0.11.8/.github/000077500000000000000000000000001420142227500157175ustar00rootroot00000000000000janus-gateway-0.11.8/.github/CONTRIBUTING.md000066400000000000000000000026321420142227500201530ustar00rootroot00000000000000Contributing to Janus ===================== If you really want to help, then first of all, thank you! Janus is a project we firmly believe in, and so any contribution is more than welcome to make it better. If you want to open an issue, please make sure that: 1. you actually found a bug: for generic questions, use the [meetecho-janus](http://groups.google.com/d/forum/meetecho-janus) group instead; 2. nobody opened the same bug already (do a search); 3. the issue wasn't already solved; 4. you don't paste a huge amount of text in the issue or comments: use a service like [pastebin](http://pastebin.com/) or similar; 5. you provide a GDB stacktrace if Janus crashed on you, and/or output from AddressSanitizer or Valgrind (more details available [here](http://janus.conf.meetecho.com/docs/debug.html)). If you want to contribute to the project by providing fixes, enhancements, new features or other materials, then just clone the repo, make your changes, push to your fork (good commit messages that explain what changed are welcome!) and submit a pull request. Please make sure that, especially if you're modifying the C code, you follow the same coding style we're using and that you properly comment the code as we usually do ourselves. That said, please beware that we do require all contributors to sign the Contributor License Agreement before we can accept any code. janus-gateway-0.11.8/.github/ISSUE_TEMPLATE/000077500000000000000000000000001420142227500201025ustar00rootroot00000000000000janus-gateway-0.11.8/.github/ISSUE_TEMPLATE/config.yml000066400000000000000000000003351420142227500220730ustar00rootroot00000000000000blank_issues_enabled: false contact_links: - name: 💬 Janus Community (Google Group) url: https://groups.google.com/g/meetecho-janus about: Please ask questions or discuss runtime problems on the group, not GitHub janus-gateway-0.11.8/.github/ISSUE_TEMPLATE/janus-0-x-issue--legacy-.md000066400000000000000000000020531420142227500246700ustar00rootroot00000000000000--- name: Janus 0.x issue (legacy) about: Open an issue related to Janus 0.x (legacy) title: "[0.x]" labels: legacy assignees: '' --- **What version of Janus is this happening on?** Put the version and the commit identifier (available in `version.c` or from an `info` request) here **Have you tested a more recent version of Janus too?** Yes/no. If yes, which one. If not, why. **Was this working before?** If you have information on a version/commit where the issue wasn't there (e.g., the result of a `git bisect`), please provide it here. **Is there a gdb or libasan trace of the issue?** If you have a trace related to the issue (e.g., after a segfault), provide it as a gist/pastebin/other link here, or as a [collapsible section](https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab). Do **NOT** paste logs inline. For more information on the kind of traces we may find useful, please refer to the [documentation](https://janus-legacy.conf.meetecho.com/docs/debug). **Additional context** Add any other context about the problem here. janus-gateway-0.11.8/.github/ISSUE_TEMPLATE/janus-1-x-issue--multistream-.md000066400000000000000000000020631420142227500257740ustar00rootroot00000000000000--- name: Janus 1.x issue (multistream) about: Open an issue related to Janus 1.x (multistream) title: "[1.x]" labels: multistream assignees: '' --- **What version of Janus is this happening on?** Put the version and the commit identifier (available in `version.c` or from an `info` request) here **Have you tested a more recent version of Janus too?** Yes/no. If yes, which one. If not, why. **Was this working before?** If you have information on a version/commit where the issue wasn't there (e.g., the result of a `git bisect`), please provide it here. **Is there a gdb or libasan trace of the issue?** If you have a trace related to the issue (e.g., after a segfault), provide it as a gist/pastebin/other link here, or as a [collapsible section](https://gist.github.com/pierrejoubert73/902cc94d79424356a8d20be2b382e1ab). Do **NOT** paste logs inline. For more information on the kind of traces we may find useful, please refer to the [documentation](https://janus.conf.meetecho.com/docs/debug). **Additional context** Add any other context about the problem here. janus-gateway-0.11.8/.github/workflows/000077500000000000000000000000001420142227500177545ustar00rootroot00000000000000janus-gateway-0.11.8/.github/workflows/janus-ci.yml000066400000000000000000000134221420142227500222120ustar00rootroot00000000000000name: janus-ci on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ubuntu-20.04 strategy: matrix: compiler: [gcc, clang] datachannels: ["yes", "no"] libcurl: ["yes", "no"] include: - datachannels: "yes" libcurl: "yes" deps_from_src: "yes" janus_config_opts: "" - datachannels: "yes" libcurl: "no" deps_from_src: "no" janus_config_opts: "--disable-aes-gcm -disable-mqtt --disable-mqtt-event-handler --disable-turn-rest-api --disable-sample-event-handler" - datachannels: "no" libcurl: "yes" deps_from_src: "no" janus_config_opts: "--disable-aes-gcm -disable-mqtt --disable-mqtt-event-handler --disable-data-channels" exclude: - datachannels: "no" libcurl: "no" env: CC: ${{ matrix.compiler }} steps: - name: install janus apt dependencies run: > sudo apt-get update && sudo apt-get --no-install-recommends -y install autoconf cmake gengetopt gtk-doc-tools libavcodec-dev libavformat-dev libavutil-dev libcollection-dev libconfig-dev libevent-dev libglib2.0-dev libgnutls28-dev libini-config-dev liblua5.3-dev libjansson-dev libmicrohttpd-dev libmount-dev libnanomsg-dev libogg-dev libopus-dev librabbitmq-dev libsofia-sip-ua-dev libssl-dev libvorbis-dev ninja-build openssl - name: setup additional dependencies from apt if: ${{ matrix.deps_from_src == 'no' }} run: > sudo apt-get --no-install-recommends -y install libnice-dev libsrtp2-dev libusrsctp-dev libwebsockets-dev - name: install libcurl from apt if: ${{ matrix.libcurl == 'yes' }} run: sudo apt-get --no-install-recommends -y install libcurl4-openssl-dev - name: setup python if: ${{ matrix.deps_from_src == 'yes' }} uses: actions/setup-python@v2 with: python-version: '3.8.5' architecture: 'x64' - name: install python packages if: ${{ matrix.deps_from_src == 'yes' }} run: pip3 install -Iv wheel meson==0.54.3 - name: setup libnice from sources if: ${{ matrix.deps_from_src == 'yes' }} run: | git clone --depth 1 --quiet -b master https://gitlab.freedesktop.org/libnice/libnice.git libnice pushd libnice if [ $CC = clang ]; then LNICE_CFLAGS="-Wno-cast-align"; fi; meson setup -Dprefix=/usr -Dlibdir=lib -Dc_args="$LNICE_CFLAGS" -Ddebug=false -Doptimization=0 -Dexamples=disabled -Dgtk_doc=disabled -Dgupnp=disabled -Dgstreamer=disabled -Dtests=disabled build ninja -C build sudo ninja -C build install - name: checkout libsrtp source if: ${{ matrix.deps_from_src == 'yes' }} uses: actions/checkout@v2 with: repository: cisco/libsrtp ref: v2.3.0 - name: setup libsrtp from sources if: ${{ matrix.deps_from_src == 'yes' }} run: | ./configure --prefix=/usr --enable-openssl make -j$(nproc) shared_library sudo make install - name: checkout usrsctp source if: ${{ matrix.datachannels == 'yes' && matrix.deps_from_src == 'yes' }} uses: actions/checkout@v2 with: repository: sctplab/usrsctp ref: master - name: setup usrsctp from sources if: ${{ matrix.datachannels == 'yes' && matrix.deps_from_src == 'yes' }} run: | ./bootstrap ./configure --prefix=/usr --disable-static --disable-debug --disable-programs --disable-inet --disable-inet6 make -j$(nproc) sudo make install - name: checkout lws source if: ${{ matrix.deps_from_src == 'yes' }} uses: actions/checkout@v2 with: repository: warmcat/libwebsockets ref: v4.1-stable - name: setup lws from sources if: ${{ matrix.deps_from_src == 'yes' }} run: | mkdir -p build pushd build cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLWS_WITH_STATIC=OFF -DLWS_WITHOUT_CLIENT=ON -DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITHOUT_TEST_SERVER=ON -DLWS_WITH_HTTP2=OFF .. make -j$(nproc) sudo make install - name: checkout paho-mqtt source if: ${{ matrix.deps_from_src == 'yes' }} uses: actions/checkout@v2 with: repository: eclipse/paho.mqtt.c ref: v1.3.1 - name: setup paho-mqtt from sources if: ${{ matrix.deps_from_src == 'yes' }} run: | cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_SAMPLES=FALSE -DPAHO_BUILD_DOCUMENTATION=FALSE make -j$(nproc) sudo make install - name: checkout janus source uses: actions/checkout@v2 - name: build janus from sources env: JANUS_CONFIG_COMMON: "--disable-docs --enable-post-processing --enable-plugin-lua --enable-plugin-duktape --enable-json-logger" JANUS_CONFIG_OPTS: ${{ matrix.janus_config_opts }} run: | ./autogen.sh ./configure $JANUS_CONFIG_COMMON $JANUS_CONFIG_OPTS make -j$(nproc) make check-fuzzers javascript-lint: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Install modules run: npm install --only=dev - name: Run ESLint run: node_modules/.bin/eslint html/janus.js javascript-rollup: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Rollup run: | cd npm npm install npm run rollup -- --o janus.cjs.js --f cjs - uses: actions/upload-artifact@v2 with: name: janus.cjs.js path: npm/janus.cjs.js janus-gateway-0.11.8/.gitignore000066400000000000000000000025571420142227500163600ustar00rootroot00000000000000cmdline.c cmdline.h version.c docs/html/ /janus /janus-cfgconv /janus-pp-rec /mjr2pcap /pcap2mjr /plugins/*.so /transports/*.so /events/*.so /loggers/*.so Makefile Makefile.in /build /configure /autom4te.cache /aclocal.m4 /m4 /missing /libtool /depcomp /compile /install-sh /ltmain.sh /config.log /config.guess /config.status /config.sub /*.o /plugins/*.o /plugins/*.lo /plugins/*.la /plugins/.libs /plugins/duktape-deps/*.lo /plugins/duktape-deps/.libs /transports/*.o /transports/*.lo /transports/*.la /transports/.libs /events/*.o /events/*.lo /events/*.la /events/.libs /loggers/*.o /loggers/*.lo /loggers/*.la /loggers/.libs /postprocessing/*.o /postprocessing/pp-cmdline.c /postprocessing/pp-cmdline.h /postprocessing/p2m-cmdline.c /postprocessing/p2m-cmdline.h /fuzzers/*.a /fuzzers/*.o /fuzzers/out /conf/janus.cfg.sample /conf/janus.plugin.duktape.cfg.sample /conf/janus.plugin.lua.cfg.sample /conf/janus.plugin.recordplay.cfg.sample /conf/janus.plugin.streaming.cfg.sample /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 .deps .dirstamp # OS X .DS_Store # CLion .idea .vscode janus-gateway-0.11.8/CHANGELOG.md000066400000000000000000002056051420142227500162000ustar00rootroot00000000000000# Changelog All notable changes to this project will be documented in this file. ## [v0.11.8] - 2022-02-11 - Added initial (and limited) integration of RED audio [[PR-2685](#2685)] - Added support for Two-Byte header RTP extensions (RFC8285) and, partially, for the new Depencency Descriptor RTP extension (needed for AV1-SVC) [[PR-2741](#2741)] - Fixed rare race conditions between sending a packet and closing a connection [[PR-2869](#2869)] - Fix last stats before closing PeerConnection not being sent to handlers (thanks @zodiak83!) [[PR-2874](#2874)] - Changed automatic allocation on static loops from round robin to least used [[PR-2878](#2878)] - Added new API to bulk start/stop MJR-based recordings in AudioBridge [[PR-2862](#2862)] - Fixed broken duration in spatial AudioBridge recordings - Fixed broken G.711 RTP forwarding in AudioBridge (thanks @AlexYaremchuk!) [[PR-2875](#2875)] - Fixed broken recordings in NoSIP plugin - Fixed warnings when postprocessing Opus recordings with DTX packets - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.11.7] - 2022-01-24 - Added faster strlcat variant that uses memccpy for writing SDPs [[PR-2835](https://github.com/meetecho/janus-gateway/pull/2835)] - Fixed occasional crash when updating WebRTC sessions [[Issue-2840](https://github.com/meetecho/janus-gateway/issues/2840)] - Changed SDP syntax for AV1 from "AV1X" to "AV1" [[Issue-2844](https://github.com/meetecho/janus-gateway/issues/2844)] - Fixed signed_tokens property not being saved to permanent rooms in VideoRoom (thanks @timsolov!) [[PR-2843](https://github.com/meetecho/janus-gateway/pull/2843)] - Made record directory changeable via "edit" in both AudioBridge and VideoRoom - Added configurable expected loss to AudioBridge to actually send FEC [[PR-2802](https://github.com/meetecho/janus-gateway/pull/2802)] - Fixed SIP plugin not working when using Sofia SIP >= 1.13 [[Issue-2683](https://github.com/meetecho/janus-gateway/issues/2683)] - Fixed occasional crashes in SIP plugin [[Issue-2853](https://github.com/meetecho/janus-gateway/issues/2853)] - Take note of video orientation extension when recording video in SIP plugin (thanks @adnanel!) [[PR-2836](https://github.com/meetecho/janus-gateway/pull/2836)] - Allow 180 besides 183 to have SDP as well (thanks @lejlasolak!) [[PR-2849](https://github.com/meetecho/janus-gateway/pull/2849)] - Fixed post-processor compilation issue with newer versions of FFmpeg [[Issue-2833](https://github.com/meetecho/janus-gateway/issues/2833)] - Added option to print extended info on MJR file as JSON in postprocessor (thanks @adnanel!) [[PR-2858](https://github.com/meetecho/janus-gateway/pull/2858)] - Allow pcap2mjr to autodetect SSRC - Fixed problems compiling post-processor with older versions of FFmpeg - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.11.6] - 2021-12-13 - Added strlcat helper to detect and report truncations [[PR-2792](https://github.com/meetecho/janus-gateway/pull/2792)] - Grow buffer as needed when generating SDPs [[PR-2797](https://github.com/meetecho/janus-gateway/pull/2797)] - Added DTX support to some plugins [[PR-2789](https://github.com/meetecho/janus-gateway/pull/2789)] - Added option to forcibly quit Janus when getting dlopen errors (thanks @tmatth!) [[PR-2828](https://github.com/meetecho/janus-gateway/pull/2828)] - Fixed broken signed tokens in VideoRoom when using UUIDs (thanks @timsolov!) [[PR-2812](https://github.com/meetecho/janus-gateway/pull/2812)] - Added option to choose whether signed tokens should be used in the VideoRoom when enabled in the core [[PR-2825](https://github.com/meetecho/janus-gateway/pull/2825)] - Added MESSAGE authentication and out-of-dialog MESSAGE support to SIP plugin (thanks thetechpanda!) [[PR-2786](https://github.com/meetecho/janus-gateway/pull/2786)] - Fixed potential race conditions in SIP plugin [[PR-2823](https://github.com/meetecho/janus-gateway/pull/2823)] - Added basic history support to TextRoom plugin [[PR-2814](https://github.com/meetecho/janus-gateway/pull/2814)] - Fixed Cross-site Scripting (XSS) vulnerability in some of the demos (thanks @SoufElhabti!) [[PR-2817](https://github.com/meetecho/janus-gateway/pull/2817)] - Added support for custom datachannel options in janus.js (thanks @sqxieshuai!) [[PR-2806](https://github.com/meetecho/janus-gateway/pull/2806)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.11.5] - 2021-10-18 - Add API to optionally force Janus to use TURN [[PR-2774](https://github.com/meetecho/janus-gateway/pull/2774)] - Fixed slow path on SDP parsing [[PR-2776](https://github.com/meetecho/janus-gateway/pull/2776)] - Added event handlers option to send stats for a PeerConnection in a single event, rather than per-media (thanks @JanFellner!) [[PR-2785](https://github.com/meetecho/janus-gateway/pull/2785)] - Fixed occasional deadlocks on malformed requests in VideoRoom [[Issue-2780](https://github.com/meetecho/janus-gateway/issues/2780)] - Fixed AudioBridge plain RTP thread sometimes exiting prematurely - Fixed broken upsampling when using G.711 in AudioBridge - Add pause/resume recording functionality to Record&Play and SIP plugins (thanks @isnumanagic!) [[PR-2724](https://github.com/meetecho/janus-gateway/pull/2724)] - Fixed broken support for Unix Sockets in WebSockets Admin API (thanks @thatsmydoing!) [[PR-2787](https://github.com/meetecho/janus-gateway/pull/2787)] - Added timing info for video rotation when post-processing recordings - Added linter checks to janus.js (thanks @davel!) [[PR-2272](https://github.com/meetecho/janus-gateway/pull/2272)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.11.4] - 2021-09-06 - Fixed ICE restart issues with recent versions of libnice [[PR-2729](https://github.com/meetecho/janus-gateway/pull/2729)] - Changed randon number generators to use crypto-safe functions (thanks @jmfotokite!) [[PR-2738](https://github.com/meetecho/janus-gateway/pull/2738)] - Added support for abs-send-time RTP extension [[PR-2721](https://github.com/meetecho/janus-gateway/pull/2721)] - Added configurable mechanism for manually setting static event loop to use for new handles [[PR-2684](https://github.com/meetecho/janus-gateway/pull/2684)] - Fixed datachannel protocol not being sent to plugins for incoming messages [[Issue-2753](https://github.com/meetecho/janus-gateway/issues/2753)] - Added ability to specify recordings folder in AudioBridge [[PR-2707](https://github.com/meetecho/janus-gateway/pull/2707)] - Added support for forwarding groups in AudioBridge [[PR-2653](https://github.com/meetecho/janus-gateway/pull/2653)] - Fixed missing Contact header in SIP plugin when using Sofia >= 1.13 [[PR-2708](https://github.com/meetecho/janus-gateway/pull/2708)] - Better SDES-SRTP negotiation in SIP and NoSIP plugins [[PR-2727](https://github.com/meetecho/janus-gateway/pull/2727)] - Fixed WebSocket transport and event handler lagging 25/30s when shutting down or reconnecting (thanks @JanFellner!) [[Issue-2734](https://github.com/meetecho/janus-gateway/issues/2734)] - Fixed incoming_header_prefixes not working for helper sessions in SIP plugin - Fix partial/broken ACL support in TextRoom plugin [[PR-2763](https://github.com/meetecho/janus-gateway/pull/2763)] - Fixed potential race condition when reclaiming sessions in HTTP transport plugin - Fixed WebSocket event handler reconnect mechanism (thanks @JanFellner!) [[PR-2736](https://github.com/meetecho/janus-gateway/pull/2736)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.11.3] - 2021-06-15 - Fixed rare crash when detaching handles [[Issue-2464](https://github.com/meetecho/janus-gateway/issues/2464)] - Added option to offer IPv6 link-local candidates as well [[PR-2689](https://github.com/meetecho/janus-gateway/pull/2689)] - Added spatial audio support to AudioBridge via stereo mixing [[PR-2446](https://github.com/meetecho/janus-gateway/pull/2446)] - Added support for plain RTP participants to AudioBridge [[PR-2464](https://github.com/meetecho/janus-gateway/pull/2464)] - Added API to start/stop AudioBridge recordings dynamically (thanks @rajneeshksoni!) [[PR-2674](https://github.com/meetecho/janus-gateway/pull/2674)] - Fixed broken mountpoint switching when using different payload types in Streaming plugin [[PR-2692](https://github.com/meetecho/janus-gateway/pull/2692)] - Fixed occasional deadlock on Streaming plugin mountpoint destroy during RTSP reconnects (thanks @lionelnicolas!) [[PR-2700](https://github.com/meetecho/janus-gateway/pull/2700)] - Added "Expires" support to SUBSCRIBE in SIP plugin (thanks @nicolasduteil!) [[PR-2661](https://github.com/meetecho/janus-gateway/pull/2661)] - Added option to specify Call-ID for SUBSCRIBE dialogs in SIP plugin (thanks @nicolasduteil!) [[PR-2664](https://github.com/meetecho/janus-gateway/pull/2664)] - Fixed broken simulcast support in VideoCall plugin (thanks @lucily-star!) [[PR-2671](https://github.com/meetecho/janus-gateway/pull/2671)] - Implemented RabbitMQ reconnection logic, in both transport and event handler (thanks @chriswiggins!) [[PR-2651](https://github.com/meetecho/janus-gateway/pull/2651)] - Added support for renegotiation of external streams in janus.js (thanks @kmeyerhofer!) [[PR-2604](https://github.com/meetecho/janus-gateway/pull/2604)] - Added support for HEVC/H.265 aggregation packets (AP) to janus-pp-rec (thanks @nu774!) [[PR-2662](https://github.com/meetecho/janus-gateway/pull/2662)] - Refactored janus-pp-rec to cleanup the code, and use libavformat for Opus as well (thanks @lu-zero!) [[PR-2665](https://github.com/meetecho/janus-gateway/pull/2665)] - Added additional target formats for some recorded codecs [[PR-2680](https://github.com/meetecho/janus-gateway/pull/2680)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.11.2] - 2021-05-03 - Added support for relative paths in config files, currently only in MQTT event handler (thanks @RSATom!) [[PR-2623](https://github.com/meetecho/janus-gateway/pull/2623)] - Removed support for now deprecated frame-marking RTP extension [[PR-2640](https://github.com/meetecho/janus-gateway/pull/2640)] - Fixed rare race condition between VideoRoom publisher leaving and subscriber hanging up [[PR-2637](https://github.com/meetecho/janus-gateway/pull/2637)] - Fixed occasional crash when using announcements in AudioBridge - Fixed rare crash in Streaming plugin when reconnecting RTSP streams (thanks @lucylu-star!) [[PR-2542](https://github.com/meetecho/janus-gateway/pull/2542)] - Fixed broken switch in Streaming plugin when using helper threads - Fixed rare race conditions on socket close in SIP and NoSIP plugins [[PR-2599](https://github.com/meetecho/janus-gateway/pull/2599)] - Added support for out-of-dialog SIP MESSAGE requests (thanks @ihusejnovic!) [[PR-2616](https://github.com/meetecho/janus-gateway/pull/2616)] - Fixed memory leak when using helper threads in Streaming plugin - Added support for datachannel label/protocol to Lua and Duktape plugins [[PR-2641](https://github.com/meetecho/janus-gateway/pull/2641)] - Added ability to use WebSockets transport over Unix sockets (thanks @mdevaev!) [[PR-2620](https://github.com/meetecho/janus-gateway/pull/2620)] - Added janus-pp-rec mechanism to correct wrong RTP timestamps in MJR recordings (thanks @tbence94!) [[PR-2573](https://github.com/meetecho/janus-gateway/pull/2573)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.11.1] - 2021-04-06 - Add new option to configure ICE nomination mode, if libnice is recent enough [[PR-2541](https://github.com/meetecho/janus-gateway/pull/2541)] - Added support for per-session timeout values (thanks @alg!) [[PR-2577](https://github.com/meetecho/janus-gateway/pull/2577)] - Added support for compilation on FreeBSD (thanks @jsm222!) [[PR-2508](https://github.com/meetecho/janus-gateway/pull/2508)] - Fixed occasional auth errors when using both API secret and stored tokens (thanks @deep9!) [[PR-2581](https://github.com/meetecho/janus-gateway/pull/2581)] - Added support for stdout logging to daemon-mode as well (thanks @mtorromeo!) [[PR-2591](https://github.com/meetecho/janus-gateway/pull/2591)] - Fixed odr-violation issue between Lua and Duktape plugins [[PR-2540](https://github.com/meetecho/janus-gateway/pull/2540)] - Fixed missing simulcast stats in Admin API and Event Handlers when using rid [[Issue-2610](https://github.com/meetecho/janus-gateway/issues/2610)] - Fixed VideoRoom recording not stopped for participants entering after global recording was started [[PR-2550](https://github.com/meetecho/janus-gateway/pull/2550)] - Fixed 'audiocodec'/'videocodec' being ignored when joining a VideoRoom via 'joinandconfigure' - Added content type support to MESSAGE in SIP plugin (thanks @tijmenNL!) [[PR-2567](https://github.com/meetecho/janus-gateway/pull/2567)] - Made RTSP timeouts configurable in Streaming plugin (thanks @pontscho!) [[PR-2598](https://github.com/meetecho/janus-gateway/pull/2598)] - Fixed incorrect parsing of backend URL in WebSockets event handler [[Issue-2603](https://github.com/meetecho/janus-gateway/issues/2603)] - Added support for secure connections and lws debugging to WebSockets event handler - Fixed occasionally broken AV1 recordings post-processing - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.10.10] - 2021-02-06 - Reduced verbosity of a few LOG_WARN messages at startup - Close libnice agent resources asynchronously when hanging up PeerConnections (thanks @fbellet!) [[PR-2492](https://github.com/meetecho/janus-gateway/pull/2492)] - Fixed broken parsing of SDP when trying to match specific codec profiles [[PR-2549](https://github.com/meetecho/janus-gateway/pull/2549)] - Added muting/moderation API to the VideoRoom plugin [[PR-2513](https://github.com/meetecho/janus-gateway/pull/2513)] - Fixed a few race conditions in VideoRoom plugin that could lead to crashes [[PR-2539](https://github.com/meetecho/janus-gateway/pull/2539)] - Send 480 instead of BYE when hanging up calls in early dialog in the SIP plugin (thanks @zayim!) [[PR-2521](https://github.com/meetecho/janus-gateway/pull/2521)] - Added configurable media direction when putting calls on-hold in the SIP plugin [[PR-2525](https://github.com/meetecho/janus-gateway/pull/2525)] - Fixed rare race condition in AudioBridge when using "changeroom" (thanks @JeckLabs!) [[PR-2535](https://github.com/meetecho/janus-gateway/pull/2535)] - Fixed broken API secret management in HTTP long polls (thanks @remvst!) [[PR-2524](https://github.com/meetecho/janus-gateway/pull/2524)] - Report failure if binding to a socket fails in WebSockets transport plugin (thanks @Symbiatch!) [[PR-2534](https://github.com/meetecho/janus-gateway/pull/2534)] - Updated RabbitMQ logic in both transport and event handler (thanks @chriswiggins!) [[PR-2430](https://github.com/meetecho/janus-gateway/pull/2430)] - Fixed segfault in WebSocket event handler when backend was unreachable - Added TLS support to MQTT event handler (thanks @RSATom!) [[PR-2517](https://github.com/meetecho/janus-gateway/pull/2517)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.10.9] - 2020-12-23 - Replaced Travis CI with GitHub Actions [[PR-2486](https://github.com/meetecho/janus-gateway/pull/2486)] - Fixed data channel messages potentially getting stuck in case of burst transfers (thanks @afshin2003!) [[PR-2427](https://github.com/meetecho/janus-gateway/pull/2427)] - Fixed simulcast issues when renegotiating PeerConnections [[Issue-2466](https://github.com/meetecho/janus-gateway/issues/2466)] - Added configurable TURN REST API timeout (thanks @evorw!) [[PR-2470](https://github.com/meetecho/janus-gateway/pull/2470)] - Added support for recording of binary data channels [[PR-2481](https://github.com/meetecho/janus-gateway/pull/2481)] - Fixed occasional SRTP errors when pausing and then resuming Streaming plugin handles after a long time - Fixed occasional SRTP errors when leaving and joining AudioBridge rooms without a new PeerConnection after a long time - Added support for playout of data channels in Record&Play plugin and demo (thanks @ricardo-salgado-tekever!) [[PR-2468](https://github.com/meetecho/janus-gateway/pull/2468)] - Added option to override connections limit in HTTP transport plugin [[PR-2489](https://github.com/meetecho/janus-gateway/pull/2489)] - Added options to enable libmicrohttpd debugging in HTTP transport plugin (thanks @evorw!) [[PR-2471](https://github.com/meetecho/janus-gateway/pull/2471)] - Fixed a few compile and runtime issues in WebSocket event handler - Refactored postprocessing management of timestamps to fix some key issues [[PR-2345](https://github.com/meetecho/janus-gateway/pull/2345)] - Fixed postprocessing of audio recordings containing RTP silence suppression packets [[PR-2467](https://github.com/meetecho/janus-gateway/pull/2467)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.10.8] - 2020-11-23 - Added differentiation between IPv4 and IPv6 NAT-1-1 addresses [[PR-2423](https://github.com/meetecho/janus-gateway/pull/2423)] - Made NACK buffer cleanup on outgoing keyframe disabled by default but configurable [[PR-2402](https://github.com/meetecho/janus-gateway/pull/2402)] - Added support for simulcast and TWCC to Duktape and Lua plugins [[PR-2409](https://github.com/meetecho/janus-gateway/pull/2409)] - Fixed rare crash in AudioBridge plugin when leaving a room [[Issue-2432](https://github.com/meetecho/janus-gateway/issues/2432)] - Fixed codec names not being updated in the SIP plugin after renegotiations (thanks @ihusejnovic!) [[PR-2417](https://github.com/meetecho/janus-gateway/pull/2417)] - Fixed crash in SIP plugin when handling REGISTER challenges without WWW-Authenticate headers [[Issue-2419](https://github.com/meetecho/janus-gateway/issues/2419)] - Added option to SIP plugin to let users CANCEL pending transactions without waiting for a 1xx [[PR-2434](https://github.com/meetecho/janus-gateway/pull/2434)] - Added option to enforce CORS on the server side in both HTTP and WebSocket transport plugins [[PR-2410](https://github.com/meetecho/janus-gateway/pull/2410)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.10.7] - 2020-10-30 - Fixed SDP negotiation when client uses max-bundle [[Issue-2390](https://github.com/meetecho/janus-gateway/issues/2390)] - Added optional JSEP flag to invert processing order of simulcast "rid" in SDP [[PR-2385](https://github.com/meetecho/janus-gateway/pull/2385)] - Fixed broken rid-based simulcast when using less than 3 substreams - Fixed occasional misleading "private IP" warning on startup (thanks @npikimasu!) [[PR-2386](https://github.com/meetecho/janus-gateway/pull/2386)] - Added "plugin-offer mode" to AudioBridge [[PR-2366](https://github.com/meetecho/janus-gateway/pull/2366)] - Fixed occasional deadlock when sending SUBSCRIBE messages via SIP plugin [[PR-2387](https://github.com/meetecho/janus-gateway/pull/2387)] - Fixed occasional SIGABRT in RabbitMQ transport (thanks @david-goncalves!) [[PR-2380](https://github.com/meetecho/janus-gateway/pull/2380)] - Fixed broken RTP parsing in janus-pp-rec when there were too many extensions (thanks @isnumanagic!) [[PR-2411](https://github.com/meetecho/janus-gateway/pull/2411)] - Fixed occasional segfault when post-processing G.722 mjr recordings - Added configurable simulcast encodings to janus.js (thanks @fippo!) [[PR-2393](https://github.com/meetecho/janus-gateway/pull/2392)] - Updated old Insertable Streams APIs in janus.js and e2etest.js - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.10.6] - 2020-10-05 - New mechanism to tweak/query transport plugins via Admin API [[PR-2354](https://github.com/meetecho/janus-gateway/pull/2354)] - Fixed occasional segfault when using event handlers and VideoRoom [[Issue-2352](https://github.com/meetecho/janus-gateway/issues/2352)] - Fixed occasional "Unsupported codec 'none'" log errors (thanks @neilyoung!) [[PR-2357](https://github.com/meetecho/janus-gateway/pull/2357)] - Fixed broken AudioBridge RTP forwarding when using G711 [[Issue-2375](https://github.com/meetecho/janus-gateway/issues/2375)] - Added helper threads support to RTSP mountpoints as well [[PR-2361](https://github.com/meetecho/janus-gateway/pull/2361)] - Fixed data channels not working as expected in Streaming plugin when using helper threads - Fixed simulcast occasionally not working in Streaming plugin until manual PLI trigger - Added proper fragmentation in WebSockets transport plugin [[PR-2355](https://github.com/meetecho/janus-gateway/pull/2355)] - Fixed timing resolution issue in MQTT transport (thanks @feymartynov!)) [[PR-2358](https://github.com/meetecho/janus-gateway/pull/2358)] - Fixed MQTT transport issue when trying to shutdown gracefully (thanks @feymartynov!)) [[PR-2374](https://github.com/meetecho/janus-gateway/pull/2374)] - Fixed broken configuration of Nanomsg Admin API (thanks @sdamodharan!)) [[PR-2372](https://github.com/meetecho/janus-gateway/pull/2372)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.10.5] - 2020-09-08 - Fixed occasional crash in event handlers [[Issue-2312](https://github.com/meetecho/janus-gateway/issues/2312)] - Fixed occasional crash in VideoRoom plugin [[Issue-2318](https://github.com/meetecho/janus-gateway/issues/2318)] - Fixed missing PLI when switching Streaming mountpoint [[Issue-2333](https://github.com/meetecho/janus-gateway/issues/2333)] - Fixed broken recordings in VideoCall plugin (thanks @SamyCookie!) [[PR-2325](https://github.com/meetecho/janus-gateway/pull/2325)] - Fixed "kick" not working in TextRoom plugin (thanks @backface!) [[PR-2332](https://github.com/meetecho/janus-gateway/pull/2332)] - Fixed occasional post-processing issues with incomplete mjr files (thanks @SamyCookie!) [[PR-2356](https://github.com/meetecho/janus-gateway/pull/2356)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.10.4] - 2020-08-07 - Fixed usrsctp vulnerability by using internal hashmap in SCTP code [[PR-2302](https://github.com/meetecho/janus-gateway/pull/2302)] - Fixed some issues when using BoringSSL for DTLS (thanks @fancycode!) [[PR-2278](https://github.com/meetecho/janus-gateway/pull/2278)] - Added support for multiple nat-1-1 addresses (thanks @fancycode!) [[PR-2279](https://github.com/meetecho/janus-gateway/pull/2279)] - Fixed negotiation issue on Firefox when Janus is built without datachannels [[PR-2281](https://github.com/meetecho/janus-gateway/pull/2281)] - Fixed small memory leaks when dealing with local candidates (thanks @fancycode!) [[PR-2288](https://github.com/meetecho/janus-gateway/pull/2288)] - Fixed occasional segfault in VideoRoom when failing to setup a new subscriber [[Issue-2277](https://github.com/meetecho/janus-gateway/issues/2277)] - Fixed potential deadlock in AudioBridge when switching rooms (thanks @JeckLabs!) [[PR-2280](https://github.com/meetecho/janus-gateway/pull/2280)] - Fixed small memory leak in AudioBridge (thanks @JeckLabs!) [[PR-2298](https://github.com/meetecho/janus-gateway/pull/2298)] - Fixed occasional segfault in VideoCall when hanging up calls [[Issue-2300](https://github.com/meetecho/janus-gateway/issues/2300)] - Fixed occasional curl hiccups with RTSP on some cameras - Added reconnect mechanism to RabbitMQ event handler (thanks @david-goncalves!) [[PR-2267](https://github.com/meetecho/janus-gateway/pull/2267)] - Extended MQTT support in transport and event handler to v5 (thanks @feymartynov!) [[PR-2273](https://github.com/meetecho/janus-gateway/pull/2273)] - Added settings to configure MQTT buffers in the transport plugin (thanks @feymartynov!) [[PR-2286](https://github.com/meetecho/janus-gateway/pull/2286)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.10.3] - 2020-07-09 - Fixed occasional crashes in VideoRoom related to subscribers activity [[PR-2236](https://github.com/meetecho/janus-gateway/pull/2236)] [[PR-2253](https://github.com/meetecho/janus-gateway/pull/2253)] - Fixed AudioBridge compilation issues when libogg is missing (thanks @ffontaine!) [[PR-2238](https://github.com/meetecho/janus-gateway/pull/2238)] - Fixed broken SRTP forwarders in AudioBridge [[PR-2258](https://github.com/meetecho/janus-gateway/pull/2258)] - Fixed occasional segfaults due to race conditions in SIP plugin [[PR-2247](https://github.com/meetecho/janus-gateway/pull/2247)] - Fixed occasional recording issues in Janus and Duktape plugins - Added timeout (120s) on idle connections in HTTP transport - Fixed Opus recordings occasionally being way too large than the source file when processed via janus-pp-rec (thanks @neilkinnish!) [[PR-2250](https://github.com/meetecho/janus-gateway/pull/2250)] - Added a new web demo to use canvas elements as a media source for PeerConnections [[PR-2261](https://github.com/meetecho/janus-gateway/pull/2261)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.10.2] - 2020-06-17 - Fixed sscanf-related security issues [[PR-2229](https://github.com/meetecho/janus-gateway/pull/2229)] - Fixed some RTP extensions not working after renegotiations [[Issue-2192](https://github.com/meetecho/janus-gateway/issues/2192)] - Fixed occasionally broken simulcast behaviour [[PR-2231](https://github.com/meetecho/janus-gateway/pull/2231)] - Fixed "switch" request not taking simulcast/SVC into account in VideoRoom and Streaming plugins [[Issue-2219](https://github.com/meetecho/janus-gateway/issues/2219)] - Fixed inability to ask for random ports when creating Streaming plugin mountpoints with simulcast support [[PR-2225](https://github.com/meetecho/janus-gateway/pull/2225)] - Fixed occasional crashes in SIP plugin when using helpers [[PR-2216](https://github.com/meetecho/janus-gateway/pull/2216)] - Updated Duktape dependencies to v2.5, and fixed Duktape plugin relaying text data as binary [[PR-2233](https://github.com/meetecho/janus-gateway/pull/2233)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.10.1] - 2020-06-11 - Added initial support for AV1 and H.265 video codecs [[PR-2120](https://github.com/meetecho/janus-gateway/pull/2120)] - Added initial support for end-to-end encryption via Insertable Streams [[PR-2074](https://github.com/meetecho/janus-gateway/pull/2074)] - Fixed security issues when processing SDPs [[PR-2214](https://github.com/meetecho/janus-gateway/pull/2214)] - Fixed occasional codec profile negotiation issues (thanks @groupboard!) [[PR-2212](https://github.com/meetecho/janus-gateway/pull/2212)] - Fixed occasional segfaults when hanging up VideoRoom subscribers - Fixed RTSP issues when fmtp is missing (thanks @lionelnicolas!) [[PR-2190](https://github.com/meetecho/janus-gateway/pull/2190)] - Fixed RTSP not following redirects, when used (thanks @lionelnicolas!) [[PR-2195](https://github.com/meetecho/janus-gateway/pull/2195)] - Fixed SRTP-SDES and renegotiation issues in NoSIP plugin (thanks @ihusejnovic!) [[PR-2196](https://github.com/meetecho/janus-gateway/pull/2196)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.10.0] - 2020-06-01 - Added support for negotiation of codec profiles (mainly VP9 and H.264) [[PR-2080](https://github.com/meetecho/janus-gateway/pull/2080)] - Added new callback to let plugins know when the datachannel first becomes available, and then any time it's writable (empty buffers) [[PR-2060](https://github.com/meetecho/janus-gateway/pull/2060)] - Added support for data channel subprotocols [[PR-2157](https://github.com/meetecho/janus-gateway/pull/2157)] - Added new event handler for GrayLog using GELF (thanks @mirkobrankovic!) [[PR-1788](https://github.com/meetecho/janus-gateway/pull/1788)] - Added per-user override of global room 'audio_active_packets' and 'audio_level_average' properties to AudioBridge and VideoRoom (thanks @mirkobrankovic!) [[PR-2158](https://github.com/meetecho/janus-gateway/pull/2158)] - Notify speaker that started/stopped talking too, when talking events are triggered in VideoRoom and AudioBridge (thanks @maxboehm!) [[PR-2172](https://github.com/meetecho/janus-gateway/pull/2172)] - Allow listing of private rooms/mountpoints if an admin_key is used (thanks @robby2016!) [[PR-2161](https://github.com/meetecho/janus-gateway/pull/2161)] - Fixed RTCP support not triggering PLIs for new simulcast mountpoint viewers [[Issue-2156](https://github.com/meetecho/janus-gateway/issues/2156)] - Fixed occasional issue binding multicast mountpoints (thanks @PaulKerr!) [[PR-2167](https://github.com/meetecho/janus-gateway/pull/2167)] - Fixed buffering of keyframes not working in Streaming plugin (thanks @TomFFF!) [[PR-2170](https://github.com/meetecho/janus-gateway/pull/2170)] - Added support for buffering of keyframes to RTSP mountpoints too (thanks @lionelnicolas!) [[PR-2180](https://github.com/meetecho/janus-gateway/pull/2180)] - Fixed renegotiation support in SIP plugin when audio/video is added (thanks @ihusejnovic!) [[PR-2164](https://github.com/meetecho/janus-gateway/pull/2164)] [[PR-2173](https://github.com/meetecho/janus-gateway/pull/2173)] - Fixed menus in html documentation when using Doxygen >= 1.8.14 (thanks @i8-pi!) [[PR-2155](https://github.com/meetecho/janus-gateway/pull/2155)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.9.5] - 2020-05-18 - Fixed sessions not being cleaned up when disabling session timeouts and the transport disconnects (thanks @nicolasduteil!) [[PR-2143](https://github.com/meetecho/janus-gateway/pull/2143)] - Added option to keep candidates with private host addresses when using nat-1-1, and advertize them too instead of just replacing them - Added auth token, if available, to 'attached' event (handlers) and to Admin API (handle_info) - Added new API to start/stop recording a VideoRoom as a whole, and a new option to prevent participants from starting/stopping their own recording (thanks @wheresjames!) [[PR-2137](https://github.com/meetecho/janus-gateway/pull/2137)] - Fixed rare deadlock when wrapping up Streaming plugin mountpoints [[PR-2141](https://github.com/meetecho/janus-gateway/pull/2141)] - Fixed rare deadlock when destroying AudioBridge rooms - Added synchronous request to check if an announcement is playing in the AudioBridge - Fixed AudioBridge announcement not waking up sleeping forwarder - Added global room mute/unmute support to AudioBridge - Added configurable DSCP support for outgoing RTP packets to SIP and NoSIP plugins (thanks @GerardM22!) [[PR-2150](https://github.com/meetecho/janus-gateway/pull/2150)] - Added support for RTP extensions (audio-level, video-orientation) to NoSIP plugin [[Issue-2152](https://github.com/meetecho/janus-gateway/issues/2152)] - Added option to configure ciphers suite for secure WebSockets (thanks @agclark81!) [[PR-2135](https://github.com/meetecho/janus-gateway/pull/2135)] - Added timer to janus.js to avoid spamming onmute/onunmute events and flashing videos [[PR-2147](https://github.com/meetecho/janus-gateway/pull/2147)] - Added a new tool to convert .pcap captures to .mjr recordings [[PR-2144](https://github.com/meetecho/janus-gateway/pull/2144)] - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.9.4] - 2020-05-04 - Updated code not to wait forever for local candidates when half-trickling and sending an SDP out - Fixed occasional CPU spiking issues when dealing with ICE failures (thanks @sjkummer!) - Fixed occasional stall when gathering ICE candidates (thanks @wheresjames!) - Fixed the incorrect value being set via DSCP, when configured - Fixed occasional race condition when hanging up VideoRoom subscribers - Fixed Audiobridge and Streaming plugins not playing the last chunk of .opus files (thanks @RSATom!) - Fixed duplicate subscriptions (and SRTP/SRTCP errors) on multiple watch requests in Streaming plugin - Updated Streaming and TextRoom plugins to stop using legacy datachannel negotiation - Fixed occasional crash in HTTP transport when dealing with unknown requests - Fixed occasional disconnect in WebSockets (thanks @tomnotcat!) - Made RabbitMQ exchange type configurable in both transport and event handler (thanks @voicenter!) - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.9.3] - 2020-04-22 - Change libsrtp detection in the configure script to use pkg-config - Fixed compilation error with gcc10 - Fixed RTCP issue that could occasionally lead to broken retransmissions when using rtx - Added option to specify DSCP Type of Service (ToS) for media streams - Fixed a couple of race conditions during renegotiations - Fixed VideoRoom and Streaming "destroy" not working properly when using string IDs - Fix occasional segfault in VideoRoom (thanks @cb22!) - Fixed AudioBridge "create" not working properly when using string IDs - Added support for playing Opus files in AudioBridge rooms - Added support to Opus files for file-based mountpoints in Streaming plugin - Added support for generic metadata to Streaming mountpoints - Streaming plugin now returns mountpoint IP address(es) in "create" and "info", when binding to specific IP/interface - Fixed occasional segfault when using helper threads in Streaming plugin - Fixed occasional race conditions in HTTP transport - Added support for specifying screensharing framerate in janus.js (thanks @agclark81!) - Cleaned up code in janus.js (thanks @alienpavlov!) - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.9.2] - 2020-03-26 - Converted HTTP transport plugin to single thread (now requires libmicrohttpd >= 0.9.59) - Fixed .deb file packaging (thanks @FThrum!) - Added foundation for aiortc-based functional testing (python) - Fixed occasional audio/video desync - Added asynchronous resolution of mDNS candidates, and an option to automatically ignore them entirely - Updated default DTLS ciphers (thanks @fippo!) - Added option to generate ECDSA certificates at startup, instead of RSA (thanks @Sean-Der!) - Fixed rare race condition when claiming sessions - Fixed rare crash in ice.c (thanks @tmatth!) - Fixed dangerous typo in querylogger_parameters (copy/paste error) - Fixed occasional deadlocks in VideoRoom (thanks @mivuDing and @agclark81!) - Added support for RTSP Content-Base header to Streaming plugin - Fixed double unlock when listing private rooms in AudioBridge - Made AudioBridge prebuffering property configurable, both per-room and per-participant - Added G.711 support to AudioBridge (both participants and RTP forwarders) - Added called URI to 'incomingcall' and 'missed_call' events in SIP plugin (in case the registered user is associated with multiple public URIs) - Fixed race conditions and leaks in VideoCall and VoiceMail plugins - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.9.1] - 2020-03-10 - Added configurable global prefix for log lines - Implemented better management of remote candidates with invalid addresses - Added subtype property to differentiate some macro-types in event handlers - Improved detection of H.264 keyframes (thanks @cameronlucas3!) - Added configurable support for strings as unique IDs in AudioBridge, VideoRoom, TextRoom and Streaming plugins - Fixed small memory leak when creating Streaming mountpoints dynamically - Fixed segfault when trying to start a SIP call with a non-existing refer_id (thanks @tmatth!) - Fixed errors negotiating video in SIP plugin when multiple video profiles are provided - Updated SIP plugin transfer code to answer with a 202 right away, instead of sending a 100 first (which won't work with proxies) - Added several features and fixes several nits in SIP demo UI - Fixed janus.js error callback not being invoked when an HTTP error happens trying to attach to a plugin (thanks @hxl-dy!) - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.9.0] - 2020-02-21 - Refactored core-plugin callbacks - Added RTP extensions termination - Removed requirement to enable ICE Lite to use ICE-TCP, even though it may cause issues (thanks @sjkummer!) - Added support for transport-wide CC on outgoing streams (feedback still unused, though) - Dynamically update NACK queue size depending on RTT - Fixed risk of RTP header memory misalignment when dealing with rtx packets - Users muted in AudioBridge by an admin are now notified as well (thanks @klanjabrik!) - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.8.2] - 2020-02-04 - Added Travis CI integration (thanks @fippo for kickstarting it!) - New configuration property to add protected folders not to save recordings and pcap captures to - Fixed rare race condition when joining and destroying a VideoRoom session - Improved parsing of headers in RTSP messages (thanks @kefir266!) - Fixed segfault in AudioBridge when leaving a room before PeerConnection is ready - Fixed '500' errors being sent in response to incoming OPTIONS in the SIP plugin (thanks @ycherniavskyi!) - Fixed helpers not being able to send SUBSCRIBE requests in SIP plugin - Added option to fix audio skew compensation, if present, to janus-pp-rec - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.8.1] - 2020-01-13 - Added binary data support to data channels - Fixed segfault at startup if event handlers or loggers directory couldn't be opened (thanks @kazzmir!) - Fixed potential segfault when closing logging at shutdown - Allowed RTCP ports to be picked randomly using 0, in Streaming plugin - Fixed occasional memory leak when destroying mountpoints in Streaming plugin - Fixed memory leak in SIP plugin - Updated 'referred_by' field to contain the value of SIP referred-by header, and not just the URI (thanks @pawnnail!) - Don't keep TextRoom plugin loaded if data channels were not compiled - Removed SIPre plugin from the repo - Fixed late initialization of janus.js constructor callbacks - Changed janus.js to use sendBeacon instead of XHR when closing/refreshing page - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.8.0] - 2019-12-12 - Added changelog file to the repo and docs (thanks @oscarvadillog!) - Added new category of plugins for modular logging (stdout and file still there, and part of the core) - Removed option to enable rtx (now always supported, when negotiated) - Added gzip compression helper method to the core utils - Fixed RTSP SETUP issues when url contains query string parameters - Added option to gzip events when using the Sample Event Handler - Streamlined janus.js (thanks @oscarvadillog!) - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.7.6] - 2019-11-27 - Split SDP lines when parsing on line feed only, and trim carriage feed instead (\n instead of \r\n) - Reduced default twcc_period (how often to send feedback when using Transport Side BWE) from 1s to 200ms - Added option to skip (and disable) unreachable STUN/TURN server at startup (thanks @sjkummer!) - Fixed video desynchronization when doing G.722/iSac audio - Other generic fixes on A/V desync - Added support for multiple concurrent calls for the same account to the SIP plugin - Added support for blind and attended transfers to the SIP plugin - Added way to inject custom Contact params in REGISTER to the SIP plugin - Added way to intercept non-standard headers in SIP messages to SIP plugin (thanks @ihusejnovic!) - Fixed missing SIP CANCEL when hanging up outgoing unanswered calls in SIP plugin - Added support for domain names (and IPv6) to RTP forwarders in AudioBridge and VideoRoom - Fixed broken b=TIAS SDP attribute support for Firefox in VideoRoom (thanks @MvEerd!) - Fixed and improved VP9 SVC support in VideoRoom and Streaming plugins - Added IPv6 support to Streaming plugin - Fixed potential segfault in Streaming plugin (thanks @garry81!) - Fixed occasional latching issues for RTSP in Streaming plugin - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.7.5] - 2019-10-28 - Added warning at startup if libnice version is outdated (at least 0.1.15 recommended) - Added option to specify CWD when launching Janus as a daemon (thanks @l7s!) - Extended the STUN test via Admin API to support binding to a specific port, and return the public one - Fixed simulcast issue when needing to automatically drop to lower layers - Fixed potential endless loop when binding ports in the Streaming plugin - Made creating Streaming mountpoints more asynchronous (especially for RTSP) - Added support for SIP SUBSCRIBE/NOTIFY to SIP plugin - Added ability to add custom headers to SIP BYE (thanks @mmujic!) - Added option to specify IP to bind to for media in SIP plugin (thanks @razvancrainea!) - Fixed occasional segfault when leaving a VideoRoom - Added audio level dBov average to talk events in VideoRoom plugin (thanks @aconchillo!) - Added new synchronous API to mute other participants in the AudioBridge plugin (thanks @klanjabrik!) - Fixed typo in SDP processing in Duktape/JavaScript plugin, and tied Duktape logging to the one in the Janus core (thanks @l7s!) - Tied Lua logging to the one in the Janus core - Added command line option to janus-pp-rec to specify the output format (thanks @rscreene!) - Added new WebSocket and Nanomsg event handlers - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.7.4] - 2019-09-06 - Fixed duplicate values in config that could result in wrong property being used - Fixed occasional race condition when processing SDPs (thanks @Bug-Fairy!) - Fixed broken SDP when rejecting audio/video m-line - Fixed Admin API not responding after sending messages to unresponsive plugins - Fixed some issues with RTSP support in Streaming plugin - Added option to keep recording Streaming mountpoints even when disabled - Allow SIP plugin to negotiate SRTP separately for audio and video - Fixed autoaccept_reinvites=FALSE not working when accepting calls in SIP plugin, and improved re-INVITEs support in general (thanks @pawnnail!) - Added possibility to have different addresses for remote audio and video in SIP, SIPre and NoSIP plugins (thanks @pawnnail!) - Make sure remote addresses are reset when call ends in SIP, SIPre and NoSIP plugins (thanks @pawnnail!) - Added SIP Reason Header (RFC3326) info to "hangup" event in SIP plugin, if available (thanks @ihusejnovic!) - Added method to list participants in a TextRoom (thanks @mtltechtemp!) - Added method to send a room announcement in TextRoom plugin - Fixed occasional segfault in TextRoom when using Admin API to send requests (thanks @MvEerd!) - Added support for MQTT v5, and fixed reconnection issue (thanks @feymartynov!) - Fixed occasional crashes when using more than one event handler at the same time - Added configurable bitrate values for rid-based simulcast to janus.js (thanks @vivaldi-va!) - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.7.3] - 2019-07-10 - Added Admin API method to make synchronous requests to plugins - Fixed broken media when removing/adding it again in renegotiations - Fixed several issues related to datachannels - Fixed occasional memory leak in the core when ending sessions from plugins (thanks @uxmaster!) - Changed Janus API 'slowlink' event to use lost packets instead of NACKs, and made it configurable with a dynamic threshold - Fixed broken SDES length in compound RTCP packets (thanks @glenn-hpcnt!) - Fixed DTLS window size support in the core (thanks @garry81!) - Added status messages to MQTT transport (thanks @feymartynov!) - Changed default for sender-side bandwidth estimation in VideoRoom to TRUE - Fixed occasional segfaults when using RTP forwarders with RTCP support - Added VideoRoom RTP forwarder events to event handlers notifications - Added a configurable RTP range to the Streaming plugin settings - Fixed broken H.264 simulcast support in Streaming plugin - Refactored janus-pp-rec to support command line options - Fixed occasional segfault when post-processing VP8 recordings - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.7.2] - 2019-06-07 - Removed requirement for both sdpMid and sdpMLineIndex to be in trickle messages - Set ICE remote credentials when receiving remote SDP, instead of later - Fixed occasional segfaults when using WebSocket as a transport - Fixed segfault in WebSocket transport when using ACL - Added new Admin API messages to destroy a session, detach a handle and hangup a PeerConnection (same as Janus API) - Fixed leak when RTP forwarding with RTCP feedback in the VideoRoom plugin - Added support for third spatial layer when using VP9 SVC in VideoRoom (assuming EnabledByFlag_3SL3TL is used) - Fixed segfault when changing rooms in AudioBridge - Made sure the SIP stack doesn't accept new calls until the previous one has freed all resources - Fixed occasional segfault when pushing SIP messages to event handlers - Added option to locally cleanup handles when destroying a session in janus.js - Fixed exception in janus.js when using datachannels - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.7.1] - 2019-05-20 - Added experimental debug mode with disabled WebRTC encryption (to use with the --disable-webrtc-encryption in Chrome unstable) - Added Janus API ping/pong mechanism to Admin API as well - Added Admin API methods to check address resolving capabilities and test a provided STUN server - Added check on ICE gathering process start (fixes issue with exhausted port range) - Added support for temporal layer in H.264 simulcast via frame marking - Made sure a PLI is sent on all layers, when simulcast is used - Fixed a crash when using event handlers in SIP plugin - Fixed some race conditions on hangups in SIP plugin - Added option to lock RTP forwarding functionality via an admin key/secret (VideoRoom and AudioBridge) - Fixed regression in Streaming plugin RTCP support - Added option to override payload type for RTSP mountpoints in Streaming plugin - Fixed a few issues saving permanent mountpoints in Streaming plugin - Separated checks for PeerConnection and getUserMedia support in janus.js (since plain HTTP hides getUserMedia now) - Added sanity checks on createOffer/createAnswer in janus.js - Fixed regression in simulcasting when doing SDP munging in janus.js - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.7.0] - 2019-05-10 - Added support for multiple datachannel streams in the same PeerConnection - Forced DTLS 1.2 on older OpenSSL versions - Added first integration of SDP support in the fuzzers - Fixed several leaks in SDP utils - Explicitly disabled support for encrypted RTP extensions (was causing SDP inconsistencies) - Added count of incoming retransmissions to Admin API and Event Handlers stats - Improved check for H.264 keyframe (thanks bwerther!) - Modified "cap REMB" behavior to "replace REMB" - Fixed missing notification of lurkers when first joining VideoRoom with notify_join=TRUE - Improved support for incoming re-INVITEs in SIP plugin - Fixed check in WebSocket transport that could lead to crashes - Fixed occasional segfaults when postprocessing H.264 recordings - Added new callback to janus.js to intercept the SDP before it is sent, e.g., for munging purposes (thx @carlcc!) - Fixed direction property error in janus.js on Safari (thx @alienpavlov!) - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.6.3] - 2019-03-20 - Removed folder with self-signed certificate (unneeded and confusing) - Added many fixes and improvements to the RTCP code - Fixed typos that caused issues when sending retransmissions using RFC4588 - Fixed typo when sending empty RR coupled with REMB - Made sure the CNAME is always the same for all m-lines in an SDP - Added support for mid RTP extension - Improved support for rid-based simulcasting - Fixed publish errors in MQTT transport and event handler - Fixed issue when switching Streaming mountpoints powered by helper threads - Added info on whether VideoRoom publisher is simulcasting to join events - Added option for new VideoRoom subscribers to specify simulcast substream/layer to subscribe to in join request (before it was configure-only) - Added type definitions for janus.js (thanks Elias!) - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.6.2] - 2019-03-04 - Added RTP/RTCP fuzzing targets and tools - Fixed occasional crash when pushing the local SDP to event handlers, when enabled - Fixed NACK issue when receiving an out of order keyframe - Added option to configure the TWCC feedback period - Added option to include opaqueID in Janus API events - Added option to negotiate Opus inband FEC in the VideoRoom - Added option to specify temporary extension when recording AudioBridge rooms, and event handler notification for when recording is over - Fixed occasional playout issue after recording, using Record&Play demo - Fixed typo in janus.js that affected replacing audio tracks in renegotiations - Changed default maxev (number of events in long poll results) to 10 in janus.js - Updated path of getDisplayMedia in janus.js to reflect current spec (thanks cb22!) - Fixed ambiguous check in Janus.isWebrtcSupported in janus.js - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.6.1] - 2019-02-11 - Added several fixes to RTP/RTCP parsing after fuzzing tests - Added fixes to keyframe detection after fuzzing tests - Fixed some demos not working after update to Chrome 72 - Fixed occasional crashes when saving .jfcg files (e.g., saving permanent Streaming mountpoints) - Added new Admin API command to temporarily stop/resume accepting sessions (e.g., for draining servers) - Fixed recordings sometimes not closed/destroyed/renamed when hanging up SIP sessions - Added option to SIP/SIPre/NoSIP plugin to override c= IP in SDP - Fixed missing RTSP support in Streaming plugin if TURN REST API was disabled in configure - Fixed Streaming plugin not returning complete information on secret-less mountpoints (thanks @Musashi178!) - Fixed missing .jfcg support in Duktape plugin (thanks @fbertone!) - Updated janus.js to use transceivers for Chrome >=72 - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.6.0] - 2019-01-07 - Changed default configuration format to libconfig (INI still supported but deprecated) - Fixed several RTCP parsing issues that could lead to crashes (thanks to Fippo for bringing fuzzying to our attention!) - Added support to clang compiler (needed for fuzzying) - Fixed rtx packets ending up in retransmission buffer (thanks glenn-hpcnt!) - Fixed occasional crash when cleaning NACK buffer (thanks tmatth!) - Fixed loop termination warning when handling event handlers (thanks tmatth!) - Fixed occasional invalid rtx payload type - Fixed local SDP notification to event handlers - Fixed typo in link quality calculation - Fixed occasional crash in SIP plugin - Added option to provide custom headers in SIP 200 OK as well (thanks ihusejnovic!) - Fixed typo in Range header when sending RTSP PLAY in Streaming plugin (thanks Phil1972!) - Made MQTT and RabbitMQ configuration files more consistent with other ones (thanks manifest!) - Added support for Last Will and Testament to MQTT event handler (thanks 0nkery!) - Fixed broken video when post-processing recordings with high-profile H.264 - Fixed missing success callback in sendDtmf JS method (thanks nevcos!) - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.5.0] - 2018-11-20 - Refactored core to have a persistent GMainLoop/thread per handle - Added option to share static number of GMainLoop/thread instances for multiple handles - Better management of incoming RTCP packets before passing them to plugins - Updated TURN REST API to support both "key" and "api" as parameters - Added support for dumping directly to .pcap, rather than text first via text2pcap - Fixed occasional missing notifications of temporal layer changes, when doing simulcast - Fixed occasional crash in TextRoom plugin - Fixed crashes in Duktape plugin after some iterations - Added .mjr metadata to media files when postprocessing the recordings, if supported by the container - Fixed datachannels not working in Streaming demo, when configured - Fixed dangling "Publish" button in VideoRoom demo - Better management of timeout notifications when using websockets in janus.js (thanks @nevcos!) - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.4.5] - 2018-10-16 - Switched to GMutex for locks by default (changeable in configure) - Fixed missing sdpMid in some trickle candidates, which could break full-trickle support - Fixed missing TWCC info when handling rtx duplicates (thanks garry81!) - Fixed H.264 keyframe detection and broken H.264 simulcast code - Fixed bug in skew compensation code - Fixed occasional crashes when closing PeerConnections in AudioBridge - Fixed broken Record-Route usage in SIP plugin (thanks Dan!) - Removed outdated autoack property from SIP plugin - Switched from SET_PARAMETER to OPTIONS as an RTSP keep-alive (thanks cnzjy!) - Fixed missing endianness for RTP packets in postprocessor, which caused problems on MacOS - Fixed crash in postprocessor when handling high(er) H.264 profiles (e.g., Safari 12) - Fixed multiple "First keyframe" log lines when postprocessing video - Added support for parsing a few RTP extensions in the postprocessor - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.4.4] - 2018-09-28 - Added several important fixes to NACK and retransmission code - Fixed connectivity establishment when only available candidates are prflx - Fixed some leaks in TWCC code - Fixed missing information when reporting TWCC reports (thanks Kangsik!) - Made the timeout for trickle candidates configurable - Added support for mDNS candidates (see draft-ietf-rtcweb-mdns-ice-candidates) - Added option to configure the DTLS retransmission timer (BoringSSL only) - Optimized DTLS writes by removing a copy on each send (thanks Joachim!) - Added option to override codecs to negotiate in EchoTest - Added H.264 simulcasting support to plugins that did VP8 simulcast already - Added VP9/SVC support to the Streaming plugin - Improved the way simulcast streams can be recorded and forwarded - Added partial RTCP support to RTP forwarders (thanks Adam!) - Fixed occasional segfaults in the VideoRoom when forcing private IDs (thanks tugtugtug!) - Added option to use helper threads for Streaming plugin mountpoints - Fixed a couple of errors in the RTSP support of the Streaming plugin (thanks nu774!) - Several fixes in the NoSIP plugin (thanks Dmitry!) - Fixed broken SIP MESSAGE support in SIP plugin - Fixed occasional segfaults in SIP and SIPre plugins (thanks mharcar!) - Fixed broken recording support in the VideoCall plugin (thanks codebot!) - Fixed potential deadlock in Lua and Duktape plugins (thanks Gabriel!) - Fixed memory leaks in VideoRoom, AudioBridge and TextRoom - Added new MQTT event handler (thanks Olle!) - Made HTTP REST API optionally more consistent with other transports - Added new flag to postprocessor for just printing the JSON header - Fixed occasional segfaults when processing recordings - Added getDisplayMedia() support to janus.js - Added better support to constraints when screensharing (thanks Sol!) - Added better iOS devices support to janus.js and the demos - Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!) ## [v0.4.3] - 2018-08-27 - Fixed occasional crash when closing PeerConnections - Fixed way of negotiating datachannels in Firefox Nightly - Fixed broken check when enabling TURN REST API - Fixed occasional crash when post-processing H.264 recordings (thanks Thomas!) - Fixed occasional issue when creating PID file - Fixed broken SDES generation (thanks Garry!) - Added new Duktape plugin to write plugin logic in JavaScript - Fixed occasional crash in VideoCall plugin when declining calls - Added basic RTCP support to the Streaming plugin (thanks Adam!) - Added basic RTCP support to RTP forwarders in the VideoRoom plugin - Added new Nanomsg transport - Changed the way libwebsockets logging is configured - Updated janus.js to use promises for WebRTC APIs (thanks Philipp!) - Some more bug fixes and improvements ## [v0.4.2] - 2018-06-18 - Fixed ICE loop not terminating at times, and spiking the CPU - Fixed compilation against older OpenSSL versions (thanks Joachim!) - Added option to statically enable locking debug via command line or configuration file - Fixed occasional crash in VideoRoom when destroying rooms - Fixed VideoRoom not closing subscribers PeerConnections when publisher goes away, if so configured - Fixed SRTP errors when resuming VideoRoom subscribers that were paused for a long time - Added new option to really force a cap on the bitrate in VideoRoom rooms - Fixed recording not being started for VideoRoom publishers media added in a renegotiation - Fixed occasional crash in AudioBridge when closing PeerConnections under load - Added Opus FEC support to AudioBridge (thanks Eric!) - Fixed pipe socket initialization in Streaming plugin (thanks Adam!) - Added systemd support to Unix Sockets transport plugin (thanks Adam!) - WebSocket connection is no longer torn down in case of a Janus session timeout - Added options to configure keep-alive and long-poll timers in janus.js - Some more bug fixes and improvements ## [v0.4.1] - 2018-05-29 - Single thread per PeerConnection, instead of two - Fixed issue with API secret, where sessions would be created anyway - Cleanup of ICE related code (thx Joachim!) - Removed ad-hoc thread for SCTP code - Fixed deadlock in VideoRoom plugin - Fixed segfault in SIPre plugin - Fixed leaks when using event handlers (thx zgjzzhw!) - Fixed some missing events when closing PeerConnections - Fixed broken dependencies mechanism in janus.js (thx Philippe!) - Some more bug fixes and improvements ## [v0.4.0-broken] - 2018-05-22 - Changed memory management to use reference counters - New plugin to write application logic in Lua - Added mechanism to reclaim sessions after a reconnection (thx Geige!) - Fixed broken renegotiations when upgrading from audio-only to audio-video - Fixed typo in evaluation of RTT from RTCP packets - Fixed crash when SRTP profile is missing in DTLS handshake - Improved and streamlined a few events (event handlers), e.g., selected-pair - Added new "external" events (event handlers), for events pushed via Admin API - Fixed deadlock when joining a VideoRoom with notify_join=true - Fixed some info not saved permanently in some plugins when editing - Added media latching to RTSP streams setup in the Streaming plugin - Fixed an issue with simulcast support in the Streaming plugin - Fixed occasional unexpected WebSockets disconnects when using the Streaming plugin - Fixed Streaming plugin not returning bound ports when creating mountpoints with random ones (port=0) - Improved and streamlined documentation for all plugins - Added option to limit ciphers/protocols in HTTP and WebSockets (thx Alexander!) - Added transceivers support to janus.js for proper renegotiations in Firefox - More bug fixing and general cleanup (thx to mtdxc, fancycode and others!) - Added a way to support other screensharing extensions in janus.js in a programmatic way (thx Sol!) ## [v0.3.1] - 2018-04-04 - Changed threading model for processing requests in the core - Added support for SRTP AES-GCM to core and SIP/SIPre/NoSIP plugins - Changed set of ciphers negotiated in DTLS, disabling weaker ones (thanks Chad!) - Added option to specify passphrase when dealing with certificates/keys - Added ability for Admin API requests to tweak Event Handlers - Integrated link quality stats info (thanks Piter!) - Added support for storage-less authentication via Signed Tokens (thanks Sol!) - Added option to force TCP for SIP messages in the SIP plugin - Added option to not fail RTSP mountpoint creation right away if backend is not up - Added SSL/TLS support to the MQTT transport (thanks Andrei!) - Added new request to edit some Streaming mountpoint properties (thanks Rob!) - Fixed management of DTMF in janus.js - Updated management of constraints in janus.js (thanks Igor!) - Bug fixing and general improvements ## [v0.3.0] - 2018-02-23 - Implemented renegotiations and ICE restarts - Bundle and rtcp-mux now are always forced - Added support to Transport Wide CC sender-side BWE (thanks Sergio!) - Added SRTP support to Streaming mountpoints - Implemented a skew compensation algorithm in the Streaming plugin - Added SRTP support to RTP forwarders - Implemented support for RFC4588 (rtx/90000 retransmissions) - Janus can now do full-trickle too - SIP plugin now supports 407 (proxy authentication) - Fixed post-processing of G.711 recordings - Added versioning info to janus-pp-rec - Several fixes and cleanup ## [v0.2.6] - 2017-12-19 - New SIP plugin based on libre, SIPre (janus.plugin.sipre), and related demo - New NoSIP plugin, that can be used with legacy applications (like SIP) without doing any signalling itself - VideoRoom can now support multiple codecs at the same time, instead of being forced to choose just one per media type - Plugins now record streams specifying the actual codec in use, instead of making assumptions (e.g., like Record&Play did with Opus and VP8) - Streaming plugin now allows you to temporarily pause audio and/or video delivery via "configure" requests - Removed RTCP BYE as a trigger to shutdown a PeerConnection (fixes Firefox 52 issues) - Added RTCP support for simulcast SSRCs - Fixed parsing of Firefox simulcast offer when order of attributes was different than expected - Improved RTP headers rewriting in case of SSRC changes (e.g., context switches) - Improved performance of the ICE send threads/loops and computation of transfer rates, by getting rid of all list traversals - Added support for MSG_EOR in SCTP datachannels - Added "exchange" support to RabbitMQ transport - Added new info to Event Handlers (server info in "started" event, and server name in "emitter") - Added RabbitMQ Event Handler - You can now add additional constraints for a PeerConnection when invoking createOffer and createAnswer in janus.js - Fixed occasional problems when postprocessing .mjr recordings, especially long ones, and Opus recordings - Several bug and typo fixes, in both core and janus.js ## [v0.2.5] - 2017-10-23 - VP8 simulcasting supported in a few plugins (you may have experimented with it on the online demos already); - VP9 SVC is also available (VideoRoom only); - VideoRoom and Streaming plugins allow you to subscribe to a subset of the feed's media (e.g., only get audio even though feed is audio/video); - automatic fallback in the VideoRoom to subset of the media in case of unsupported codecs (e.g., Safari joining VP8 room falls back to audio only); - added option to override rtpmap and fmtp SDP attributes for RTSP mountpoints in the Streaming plugin; - added support for other codecs besides opus and VP8 in Record&Play plugin; - added option to have a static RTP forwarder for an AudioBridge room in the configuration file; - added possibility to specify an RTP range to use in the SIP plugin; - implemented text2pcap support to dump incoming and outgoing unencrypted RTP/RTCP traffic for debugging purposes; - added support to G.722 in postprocessor; - made sure that each m-line now has its own a=end-of-candidates attribute; - fixed crash in websockets transport plugin when SSL was enabled on both APIs; - added support to ping/pong mechanism in websockets transport plugin; - switched from addstream to addtrack in janus.js; - decoupled the dependencies in janus.js to allow for dynamic override of some features; - added support to build JavaScript modules out of janus.js. ## [v0.2.4] - 2017-07-28 - binding to some or all interfaces/families has been fixed in the HTTP transport; - the Access-Control-Allow-Origin return value is now configurable in the HTTP transport; - fixed occasional slow WebSocket request management when DNS was involved; - there's a new timer before we return an ICE failed (as due to trickling there may be a success shortly after a temporary failure); - the frequency of media stats notifications (event 32) in event handlers has been made configurable (default is still 1s); - event handlers now notify about each local and remote candidate as well; - the admin.html demo page now prompts you with the password (although you can still hardcode it in the page, as before); - several changes in the SIP plugin: support for offerless INVITEs, early media (183+SDP), outbound proxies, and fixes to some POLLERR messages; - added support for LibreSSL as an alternative to OpenSSL and BoringSSL; - added a=end-of-candidates to all m-lines, since we half-trickle (fixes Edge support); - fixed a race condition in the TextRoom plugin; - fixed the way janus.js used getStats, in particular for Firefox; - fixed device selection demo; - several smaller fixes derived from a static analysis of the code via Coverity. ## [v0.2.3] - 2017-06-12 - A few janus.js fixes (among which a small fix to get it working with Safari, and the possibility to add mic audio when screensharing); - Several RTCP related enhancements in the Streaming plugin; - Support for on-hold in SIP plugin; - Fixed MQTT transport when credentials are needed; - Improved "kick" in VideoRoom (needs forcing of private_id when creating room); - Possibility to create Streaming mountpoints with random ports, instead of specifying them via API; - Optional "talking" events in AudioBridge and VideoRoom; - Possibility to force BUNDLE/rtcp-mux per handle via API (no need to wait for complete negotiation); - Several bug fixes, a couple of them to nasty race conditions that finally got solved. ## [v0.2.2] - 2017-03-08 - ACL/Kick support in VideoRoom/AudioBridge/TextRoom - Man pages for Janus and post-processor - Opaque identifiers for Event handlers + Transport related events - Ability to specify SSRC + payload type when using RTP forwarders - Ability to relay datachannels in Streaming plugin - Ability to send some TextRoom commands (e.g., create/list/etc.) via Janus API instead of only datachannels - Configurable session timeouts - Configurable "no-media" timeouts - Optional temporary extension for recordings until they're done - cleanup and bug fixing ## [v0.2.1] - 2016-12-13 - Missing info ## [v0.2.0] - 2016-10-10 - Missing info ## [v0.1.2] - 2016-09-05 - Missing info ## [v0.1.1] - 2016-06-15 - Missing info ## [v0.1.0] - 2016-05-27 - Missing info ## [v0.0.9] - 2015-11-11 - First release janus-gateway-0.11.8/COPYING000066400000000000000000001055571420142227500154270ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ======================================================================== Exception by Meetecho s.r.l.: If you modify this Program, or any covered work, by linking or combining it with OpenSSL (or a modified version of that library), containing parts covered by the terms of OpenSSL License, the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of OpenSSL used as well as that of the covered work. janus-gateway-0.11.8/Makefile.am000066400000000000000000000542161420142227500164230ustar00rootroot00000000000000ACLOCAL_AMFLAGS = -I m4 # FIXME: These should be enabled once the code is safe for them. That requires # some fairly big refactoring though, which can wait. # AM_CFLAGS += -Wshadow -Wstrict-aliasing=2 # FIXME: make docs work with distcheck DISTCHECK_CONFIGURE_FLAGS = --disable-docs --enable-post-processing EXTRA_DIST = $(NULL) CLEANFILES = $(NULL) bin_PROGRAMS = janus headerdir = $(includedir)/janus header_HEADERS = apierror.h config.h log.h debug.h mutex.h record.h \ rtcp.h rtp.h rtpsrtp.h sdp-utils.h ip-utils.h utils.h refcount.h text2pcap.h pluginsheaderdir = $(includedir)/janus/plugins pluginsheader_HEADERS = plugins/plugin.h transportsheaderdir = $(includedir)/janus/transports transportsheader_HEADERS = transports/transport.h eventsheaderdir = $(includedir)/janus/events eventsheader_HEADERS = events/eventhandler.h loggersheaderdir = $(includedir)/janus/loggers loggersheader_HEADERS = loggers/logger.h confdir = $(sysconfdir)/janus conf_DATA = conf/janus.jcfg.sample plugindir = $(libdir)/janus/plugins plugin_LTLIBRARIES = $(NULL) transportdir = $(libdir)/janus/transports transport_LTLIBRARIES = $(NULL) eventdir = $(libdir)/janus/events event_LTLIBRARIES = $(NULL) loggerdir = $(libdir)/janus/loggers logger_LTLIBRARIES = $(NULL) SUBDIRS = html dist_html_DATA = README.md streamdir = $(datadir)/janus/streams stream_DATA = $(NULL) recordingsdir = $(datadir)/janus/recordings recordings_DATA = $(NULL) luadir = $(datadir)/janus/lua lua_DATA = $(NULL) duktapedir = $(datadir)/janus/duktape duktape_DATA = $(NULL) demosdir = $(datadir)/janus/demos demos_DATA = $(NULL) jsmodulesdir = $(datadir)/janus/javascript jsmodules_DATA = html/janus.js %.sample: %.sample.in $(MKDIR_P) $(@D) $(AM_V_GEN) sed -e "\ s|[@]confdir[@]|$(confdir)|;\ s|[@]plugindir[@]|$(plugindir)|;\ s|[@]transportdir[@]|$(transportdir)|;\ s|[@]eventdir[@]|$(eventdir)|;\ s|[@]loggerdir[@]|$(loggerdir)|;\ s|[@]recordingsdir[@]|$(recordingsdir)|;\ s|[@]demosdir[@]|$(demosdir)|;\ s|[@]streamdir[@]|$(streamdir)|; \ s|[@]luadir[@]|$(luadir)|; \ s|[@]duktapedir[@]|$(duktapedir)|" \ $< > $@ || rm $@ EXTRA_DIST += conf/janus.jcfg.sample.in CLEANFILES += conf/janus.jcfg.sample ## # Janus ## janus_SOURCES = \ apierror.c \ apierror.h \ auth.c \ auth.h \ cmdline.c \ cmdline.h \ config.c \ config.h \ debug.h \ dtls.c \ dtls.h \ dtls-bio.c \ dtls-bio.h \ events.c \ events.h \ ice.c \ ice.h \ janus.c \ janus.h \ log.c \ log.h \ mutex.h \ record.c \ record.h \ refcount.h \ rtcp.c \ rtcp.h \ rtp.c \ rtp.h \ rtpsrtp.h \ sctp.c \ sctp.h \ sdp.c \ sdp.h \ sdp-utils.c \ sdp-utils.h \ ip-utils.c \ ip-utils.h \ turnrest.c \ turnrest.h \ utils.c \ utils.h \ version.c \ version.h \ text2pcap.c \ text2pcap.h \ plugins/plugin.c \ plugins/plugin.h \ transports/transport.h \ transports/transport.c \ events/eventhandler.h \ loggers/logger.h \ $(NULL) janus_CFLAGS = \ $(AM_CFLAGS) \ $(JANUS_CFLAGS) \ $(LIBSRTP_CFLAGS) \ $(LIBCURL_CFLAGS) \ -DPLUGINDIR=\"$(plugindir)\" \ -DTRANSPORTDIR=\"$(transportdir)\" \ -DEVENTDIR=\"$(eventdir)\" \ -DLOGGERDIR=\"$(loggerdir)\" \ -DCONFDIR=\"$(confdir)\" \ $(BORINGSSL_CFLAGS) \ $(NULL) janus_LDADD = \ $(BORINGSSL_LIBS) \ $(JANUS_LIBS) \ $(JANUS_MANUAL_LIBS) \ $(LIBSRTP_LDFLAGS) $(LIBSRTP_LIBS) \ $(LIBCURL_LDFLAGS) $(LIBCURL_LIBS) \ $(NULL) 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 cmdline.c: janus.c gengetopt --set-package="janus" --set-version="$(VERSION)" < $(top_srcdir)/janus.ggo directory = .git dir_target = $(directory)-$(wildcard $(directory)) dir_present = $(directory)-$(directory) dir_absent = $(directory)- if WITH_SOURCE_DATE_EPOCH build_date = $(shell LC_ALL=C date --utc --date="@$(SOURCE_DATE_EPOCH)") else build_date = $(shell date) endif version.c: FORCE | $(dir_target) echo "$(build_date)" | awk 'BEGIN {} {print "const char *janus_build_git_time = \""$$0"\";"} END {} ' >> version.c echo "$(JANUS_VERSION)" | awk 'BEGIN {} {print "int janus_version = "$$0";"} END {} ' >> version.c echo "$(JANUS_VERSION_STRING)" | awk 'BEGIN {} {print "const char *janus_version_string = \""$$0"\";"} END {} ' >> version.c PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" "$(PKG_CONFIG)" --modversion nice | awk 'BEGIN {} {print "const char *libnice_version_string = \""$$0"\";"} END {} ' >> version.c $(dir_present): `which git` rev-parse HEAD | awk 'BEGIN {print "#include \"version.h\""} {print "const char *janus_build_git_sha = \"" $$0"\";"} END {}' > version.c $(dir_absent): echo "not-a-git-repo" | awk 'BEGIN {print "#include \"version.h\""} {print "const char *janus_build_git_sha = \"" $$0"\";"} END {}' > version.c ## # Fuzzers checking ## check-fuzzers: FORCE CC=$(CC) SKIP_JANUS_BUILD=1 LIB_FUZZING_ENGINE=fuzzers/standalone.o ./fuzzers/build.sh ./fuzzers/run.sh rtcp_fuzzer out/rtcp_fuzzer_seed_corpus ./fuzzers/run.sh rtp_fuzzer out/rtp_fuzzer_seed_corpus ./fuzzers/run.sh sdp_fuzzer out/sdp_fuzzer_seed_corpus .PHONY: FORCE FORCE: EXTRA_DIST += janus.ggo CLEANFILES += cmdline.c cmdline.h version.c ## # Transports ## transports_cflags = \ $(AM_CFLAGS) \ $(TRANSPORTS_CFLAGS) \ $(NULL) transports_libadd = \ $(TRANSPORTS_LIBS) \ $(NULL) if ENABLE_REST transport_LTLIBRARIES += transports/libjanus_http.la 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.jcfg.sample EXTRA_DIST += conf/janus.transport.http.jcfg.sample endif if ENABLE_WEBSOCKETS transport_LTLIBRARIES += transports/libjanus_websockets.la 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.jcfg.sample EXTRA_DIST += conf/janus.transport.websockets.jcfg.sample endif if ENABLE_RABBITMQ transport_LTLIBRARIES += transports/libjanus_rabbitmq.la 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.jcfg.sample EXTRA_DIST += conf/janus.transport.rabbitmq.jcfg.sample endif if ENABLE_MQTT transport_LTLIBRARIES += transports/libjanus_mqtt.la 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.jcfg.sample EXTRA_DIST += conf/janus.transport.mqtt.jcfg.sample endif if ENABLE_PFUNIX transport_LTLIBRARIES += transports/libjanus_pfunix.la 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.jcfg.sample EXTRA_DIST += conf/janus.transport.pfunix.jcfg.sample endif if ENABLE_NANOMSG transport_LTLIBRARIES += transports/libjanus_nanomsg.la 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.jcfg.sample EXTRA_DIST += conf/janus.transport.nanomsg.jcfg.sample endif ## # Event handlers ## events_cflags = \ $(AM_CFLAGS) \ $(EVENTS_CFLAGS) \ $(NULL) events_libadd = \ $(EVENTS_LIBS) \ $(NULL) if ENABLE_SAMPLEEVH event_LTLIBRARIES += events/libjanus_sampleevh.la events_libjanus_sampleevh_la_SOURCES = events/janus_sampleevh.c events_libjanus_sampleevh_la_CFLAGS = $(events_cflags) $(LIBCURL_CFLAGS) events_libjanus_sampleevh_la_LDFLAGS = $(events_ldflags) $(LIBCURL_LDFLAGS) $(LIBCURL_LIBS) -lm events_libjanus_sampleevh_la_LIBADD = $(events_libadd) $(LIBCURL_LIBADD) conf_DATA += conf/janus.eventhandler.sampleevh.jcfg.sample EXTRA_DIST += conf/janus.eventhandler.sampleevh.jcfg.sample endif if ENABLE_WSEVH event_LTLIBRARIES += events/libjanus_wsevh.la events_libjanus_wsevh_la_SOURCES = events/janus_wsevh.c events_libjanus_wsevh_la_CFLAGS = $(events_cflags) events_libjanus_wsevh_la_LDFLAGS = $(events_ldflags) $(WS_MANUAL_LIBS) events_libjanus_wsevh_la_LIBADD = $(events_libadd) conf_DATA += conf/janus.eventhandler.wsevh.jcfg.sample EXTRA_DIST += conf/janus.eventhandler.wsevh.jcfg.sample endif if ENABLE_RABBITMQEVH event_LTLIBRARIES += events/libjanus_rabbitmqevh.la 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.jcfg.sample EXTRA_DIST += conf/janus.eventhandler.rabbitmqevh.jcfg.sample endif if ENABLE_MQTTEVH event_LTLIBRARIES += events/libjanus_mqttevh.la events_libjanus_mqttevh_la_SOURCES = events/janus_mqttevh.c events_libjanus_mqttevh_la_CFLAGS = $(events_cflags) events_libjanus_mqttevh_la_LDFLAGS = $(events_ldflags) -lpaho-mqtt3as events_libjanus_mqttevh_la_LIBADD = $(events_libadd) conf_DATA += conf/janus.eventhandler.mqttevh.jcfg.sample EXTRA_DIST += conf/janus.eventhandler.mqttevh.jcfg.sample endif if ENABLE_NANOMSGEVH event_LTLIBRARIES += events/libjanus_nanomsgevh.la events_libjanus_nanomsgevh_la_SOURCES = events/janus_nanomsgevh.c events_libjanus_nanomsgevh_la_CFLAGS = $(events_cflags) events_libjanus_nanomsgevh_la_LDFLAGS = $(events_ldflags) -lnanomsg events_libjanus_nanomsgevh_la_LIBADD = $(events_libadd) conf_DATA += conf/janus.eventhandler.nanomsgevh.jcfg.sample EXTRA_DIST += conf/janus.eventhandler.nanomsgevh.jcfg.sample endif if ENABLE_GELFEVH event_LTLIBRARIES += events/libjanus_gelfevh.la events_libjanus_gelfevh_la_SOURCES = events/janus_gelfevh.c events_libjanus_gelfevh_la_CFLAGS = $(events_cflags) events_libjanus_gelfevh_la_LDFLAGS = $(events_ldflags) events_libjanus_gelfevh_la_LIBADD = $(events_libadd) conf_DATA += conf/janus.eventhandler.gelfevh.jcfg.sample EXTRA_DIST += conf/janus.eventhandler.gelfevh.jcfg.sample endif ## # Loggers ## loggers_cflags = \ $(AM_CFLAGS) \ $(LOGGERS_CFLAGS) \ $(NULL) loggers_libadd = \ $(LOGGERS_LIBS) \ $(NULL) if ENABLE_JSONLOGGER logger_LTLIBRARIES += loggers/libjanus_jsonlog.la loggers_libjanus_jsonlog_la_SOURCES = loggers/janus_jsonlog.c loggers_libjanus_jsonlog_la_CFLAGS = $(loggers_cflags) loggers_libjanus_jsonlog_la_LDFLAGS = $(loggers_ldflags) loggers_libjanus_jsonlog_la_LIBADD = $(loggers_libadd) conf_DATA += conf/janus.logger.jsonlog.jcfg.sample EXTRA_DIST += conf/janus.logger.jsonlog.jcfg.sample endif ## # Plugins ## plugins_cflags = \ $(AM_CFLAGS) \ $(PLUGINS_CFLAGS) \ $(NULL) plugins_libadd = \ $(PLUGINS_LIBS) \ $(NULL) if ENABLE_PLUGIN_AUDIOBRIDGE plugin_LTLIBRARIES += plugins/libjanus_audiobridge.la plugins_libjanus_audiobridge_la_SOURCES = plugins/janus_audiobridge.c plugins_libjanus_audiobridge_la_CFLAGS = $(plugins_cflags) $(OPUS_CFLAGS) $(OGG_CFLAGS) $(LIBSRTP_CFLAGS) plugins_libjanus_audiobridge_la_LDFLAGS = $(plugins_ldflags) $(OPUS_LDFLAGS) $(OPUS_LIBS) $(OGG_LDFLAGS) $(OGG_LIBS) plugins_libjanus_audiobridge_la_LIBADD = $(plugins_libadd) $(OPUS_LIBADD) $(OGG_LIBADD) conf_DATA += conf/janus.plugin.audiobridge.jcfg.sample EXTRA_DIST += conf/janus.plugin.audiobridge.jcfg.sample endif if ENABLE_PLUGIN_ECHOTEST plugin_LTLIBRARIES += plugins/libjanus_echotest.la 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.jcfg.sample EXTRA_DIST += conf/janus.plugin.echotest.jcfg.sample endif if ENABLE_PLUGIN_RECORDPLAY plugin_LTLIBRARIES += plugins/libjanus_recordplay.la 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.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.jcfg.sample.in \ $(recordings_DATA) CLEANFILES += conf/janus.plugin.recordplay.jcfg.sample endif if ENABLE_PLUGIN_SIP plugin_LTLIBRARIES += plugins/libjanus_sip.la plugins_libjanus_sip_la_SOURCES = plugins/janus_sip.c plugins_libjanus_sip_la_CFLAGS = $(plugins_cflags) $(SOFIA_CFLAGS) $(LIBSRTP_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.jcfg.sample EXTRA_DIST += conf/janus.plugin.sip.jcfg.sample endif if ENABLE_PLUGIN_NOSIP plugin_LTLIBRARIES += plugins/libjanus_nosip.la plugins_libjanus_nosip_la_SOURCES = plugins/janus_nosip.c plugins_libjanus_nosip_la_CFLAGS = $(plugins_cflags) $(LIBSRTP_CFLAGS) plugins_libjanus_nosip_la_LDFLAGS = $(plugins_ldflags) plugins_libjanus_nosip_la_LIBADD = $(plugins_libadd) conf_DATA += conf/janus.plugin.nosip.jcfg.sample EXTRA_DIST += conf/janus.plugin.nosip.jcfg.sample endif if ENABLE_PLUGIN_STREAMING plugin_LTLIBRARIES += plugins/libjanus_streaming.la plugins_libjanus_streaming_la_SOURCES = plugins/janus_streaming.c plugins_libjanus_streaming_la_CFLAGS = $(plugins_cflags) $(LIBCURL_CFLAGS) $(OGG_CFLAGS) $(LIBSRTP_CFLAGS) plugins_libjanus_streaming_la_LDFLAGS = $(plugins_ldflags) $(LIBCURL_LDFLAGS) $(LIBCURL_LIBS) $(OGG_LDFLAGS) $(OGG_LIBS) plugins_libjanus_streaming_la_LIBADD = $(plugins_libadd) $(LIBCURL_LIBADD) $(OGG_LIBADD) 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.jcfg.sample.in \ $(stream_DATA) CLEANFILES += conf/janus.plugin.streaming.jcfg.sample endif if ENABLE_PLUGIN_VIDEOCALL plugin_LTLIBRARIES += plugins/libjanus_videocall.la 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.jcfg.sample EXTRA_DIST += conf/janus.plugin.videocall.jcfg.sample endif if ENABLE_PLUGIN_VIDEOROOM plugin_LTLIBRARIES += plugins/libjanus_videoroom.la plugins_libjanus_videoroom_la_SOURCES = plugins/janus_videoroom.c plugins_libjanus_videoroom_la_CFLAGS = $(plugins_cflags) $(LIBSRTP_CFLAGS) plugins_libjanus_videoroom_la_LDFLAGS = $(plugins_ldflags) plugins_libjanus_videoroom_la_LIBADD = $(plugins_libadd) conf_DATA += conf/janus.plugin.videoroom.jcfg.sample EXTRA_DIST += conf/janus.plugin.videoroom.jcfg.sample endif if ENABLE_PLUGIN_VOICEMAIL plugin_LTLIBRARIES += plugins/libjanus_voicemail.la 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.jcfg.sample EXTRA_DIST += conf/janus.plugin.voicemail.jcfg.sample.in CLEANFILES += conf/janus.plugin.voicemail.jcfg.sample endif if ENABLE_PLUGIN_TEXTROOM plugin_LTLIBRARIES += plugins/libjanus_textroom.la 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.jcfg.sample EXTRA_DIST += conf/janus.plugin.textroom.jcfg.sample endif if ENABLE_PLUGIN_LUA plugin_LTLIBRARIES += plugins/libjanus_lua.la plugins_libjanus_lua_la_SOURCES = plugins/janus_lua.c plugins/janus_lua_data.h plugins/janus_lua_extra.c plugins/janus_lua_extra.h 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.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.jcfg.sample.in endif if ENABLE_PLUGIN_DUKTAPE plugin_LTLIBRARIES += plugins/libjanus_duktape.la plugins_libjanus_duktape_la_SOURCES = plugins/janus_duktape.c \ plugins/janus_duktape_data.h plugins/janus_duktape_extra.c plugins/janus_duktape_extra.h \ plugins/duktape-deps/duktape.c plugins/duktape-deps/duk_config.h plugins/duktape-deps/duktape.h \ plugins/duktape-deps/duk_module_duktape.c plugins/duktape-deps/duk_module_duktape.h \ plugins/duktape-deps/duk_console.c plugins/duktape-deps/duk_console.h 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.jcfg.sample duktape_DATA += \ plugins/duktape/echotest.js \ plugins/duktape/janus-sdp.js EXTRA_DIST += conf/janus.plugin.duktape.jcfg.sample.in endif ## # Post-processing ## if ENABLE_POST_PROCESSING bin_PROGRAMS += janus-pp-rec bin_PROGRAMS += mjr2pcap if ENABLE_PCAP2MJR bin_PROGRAMS += pcap2mjr endif janus_pp_rec_SOURCES = \ postprocessing/pp-cmdline.c \ postprocessing/pp-cmdline.h \ postprocessing/pp-g711.c \ postprocessing/pp-g711.h \ postprocessing/pp-g722.c \ postprocessing/pp-g722.h \ postprocessing/pp-h264.c \ postprocessing/pp-h264.h \ postprocessing/pp-av1.c \ postprocessing/pp-av1.h \ postprocessing/pp-avformat.c \ postprocessing/pp-avformat.h \ postprocessing/pp-h265.c \ postprocessing/pp-h265.h \ postprocessing/pp-opus.c \ postprocessing/pp-opus.h \ postprocessing/pp-opus-silence.h \ postprocessing/pp-rtp.h \ postprocessing/pp-srt.c \ postprocessing/pp-srt.h \ postprocessing/pp-binary.c \ postprocessing/pp-binary.h \ postprocessing/pp-webm.c \ postprocessing/pp-webm.h \ postprocessing/janus-pp-rec.c \ log.c \ utils.c \ version.c \ $(NULL) janus_pp_rec_CFLAGS = \ $(AM_CFLAGS) \ -I$(top_builddir)/postprocessing \ $(LIBCURL_CFLAGS) \ $(POST_PROCESSING_CFLAGS) \ $(BORINGSSL_CFLAGS) \ $(NULL) janus_pp_rec_LDADD = \ $(BORINGSSL_LIBS) \ $(POST_PROCESSING_LIBS) \ $(LIBCURL_LDFLAGS) $(LIBCURL_LIBS) \ $(NULL) BUILT_SOURCES += postprocessing/pp-cmdline.c postprocessing/pp-cmdline.h postprocessing/pp-cmdline.h: postprocessing/pp-cmdline.c postprocessing/pp-cmdline.c: postprocessing/janus-pp-rec.c gengetopt --set-package="janus-pp-rec" --set-version="$(VERSION)" -F postprocessing/pp-cmdline < $(top_srcdir)/postprocessing/janus-pp-rec.ggo EXTRA_DIST += postprocessing/janus-pp-rec.ggo CLEANFILES += postprocessing/pp-cmdline.c postprocessing/pp-cmdline.h mjr2pcap_SOURCES = \ postprocessing/pp-rtp.h \ postprocessing/mjr2pcap.c \ log.c \ utils.c \ $(NULL) mjr2pcap_CFLAGS = \ $(AM_CFLAGS) \ $(POST_PROCESSING_CFLAGS) \ $(BORINGSSL_CFLAGS) \ $(NULL) mjr2pcap_LDADD = \ $(BORINGSSL_LIBS) \ $(POST_PROCESSING_LIBS) \ $(POST_PROCESSING_MANUAL_LIBS) \ $(NULL) if ENABLE_PCAP2MJR pcap2mjr_SOURCES = \ postprocessing/p2m-cmdline.c \ postprocessing/p2m-cmdline.h \ postprocessing/pp-rtp.h \ postprocessing/pcap2mjr.c \ log.c \ utils.c \ $(NULL) pcap2mjr_CFLAGS = \ $(AM_CFLAGS) \ -I$(top_builddir)/postprocessing \ $(POST_PROCESSING_CFLAGS) \ $(PCAP_CFLAGS) \ $(BORINGSSL_CFLAGS) \ $(NULL) pcap2mjr_LDADD = \ $(BORINGSSL_LIBS) \ $(POST_PROCESSING_LIBS) \ $(POST_PROCESSING_MANUAL_LIBS) \ $(PCAP_LIBS) \ $(NULL) BUILT_SOURCES += postprocessing/p2m-cmdline.c postprocessing/p2m-cmdline.h postprocessing/p2m-cmdline.h: postprocessing/p2m-cmdline.c postprocessing/p2m-cmdline.c: postprocessing/pcap2mjr.c gengetopt --set-package="pcap2mjr" --set-version="$(VERSION)" -F postprocessing/p2m-cmdline < $(top_srcdir)/postprocessing/pcap2mjr.ggo EXTRA_DIST += postprocessing/pcap2mjr.ggo CLEANFILES += postprocessing/p2m-cmdline.c postprocessing/p2m-cmdline.h endif dist_man1_MANS += postprocessing/janus-pp-rec.1 dist_man1_MANS += postprocessing/mjr2pcap.1 if ENABLE_PCAP2MJR dist_man1_MANS += postprocessing/pcap2mjr.1 endif endif ## # Docs ## if ENABLE_DOCS SUBDIRS += docs endif ## # JavaScript module flavours for janus.js ## if ENABLE_JAVASCRIPT_ES_MODULE jsmodules_DATA += npm/bundles/janus.es.js endif if ENABLE_JAVASCRIPT_UMD_MODULE jsmodules_DATA += npm/bundles/janus.umd.js endif if ENABLE_JAVASCRIPT_IIFE_MODULE jsmodules_DATA += npm/bundles/janus.iife.js endif if ENABLE_JAVASCRIPT_COMMON_JS_MODULE jsmodules_DATA += npm/bundles/janus.cjs.js endif EXTRA_DIST += $(jsmodules_DATA) if ENABLE_JAVASCRIPT_MODULES npm/node_modules/rollup/bin/rollup: npm/package.json cd npm && $(NPM) install && touch node_modules/rollup/bin/rollup npm/bundles/janus.%.js: html/janus.js npm/node_modules/rollup/bin/rollup npm/rollup.config.js npm/module.js cd npm && $(NPM) run rollup -- --o $(patsubst npm/%,%,$@) --f $* endif ## # Configuration ## configs: $(MKDIR_P) $(DESTDIR)$(confdir) $(foreach config,$(conf_DATA),cp "$(CURDIR)/$(config)" "$(DESTDIR)$(confdir)/$(notdir $(basename $(config) .sample))";) ## # Extra cleanup ## clean-local: -rm -f docs/doxygen_sqlite3.db janus-gateway-0.11.8/README.md000066400000000000000000000556751420142227500156600ustar00rootroot00000000000000Janus WebRTC Server =================== [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-brightgreen.svg)](COPYING) ![janus-ci](https://github.com/meetecho/janus-gateway/workflows/janus-ci/badge.svg) [![Coverity Scan Build Status](https://scan.coverity.com/projects/13265/badge.svg)](https://scan.coverity.com/projects/meetecho-janus-gateway) [![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/janus-gateway.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:janus-gateway) Janus is an open source, general purpose, WebRTC server designed and developed by [Meetecho](https://www.meetecho.com). This version of the server is tailored for Linux systems, although it can be compiled for, and installed on, MacOS machines as well. Windows is not supported, but if that's a requirement, Janus is known to work in the "Windows Subsystem for Linux" on Windows 10: do **NOT** trust repos that provide .exe builds of Janus, they are not official and will not be supported. For some online demos and documentations, make sure you pay the [project website](https://janus.conf.meetecho.com/) a visit! If you have questions on Janus, or wish to discuss Janus with us and other users, please join our [meetecho-janus](https://groups.google.com/forum/#!forum/meetecho-janus) Google Group. If you encounter bugs, please submit an issue on [GitHub](https://github.com/meetecho/janus-gateway/issues): make sure you read the [guidelines](.github/ISSUE_TEMPLATE.md) before opening an issue, though. ## Dependencies To install it, you'll need to satisfy the following dependencies: * [Jansson](http://www.digip.org/jansson/) * [libconfig](https://hyperrealm.github.io/libconfig/) * [libnice](https://libnice.freedesktop.org/) (at least v0.1.16 suggested, v0.1.18 recommended) * [OpenSSL](http://www.openssl.org/) (at least v1.0.1e) * [libsrtp](https://github.com/cisco/libsrtp) (at least v2.x suggested) * [usrsctp](https://github.com/sctplab/usrsctp) (only needed if you are interested in Data Channels) * [libmicrohttpd](http://www.gnu.org/software/libmicrohttpd/) (at least v0.9.59; only needed if you are interested in REST support for the Janus API) * [libwebsockets](https://libwebsockets.org/) (only needed if you are interested in WebSockets support for the Janus API) * [cmake](http://www.cmake.org/) (only needed if you are interested in WebSockets and/or BoringSSL support, as they make use of it) * [rabbitmq-c](https://github.com/alanxz/rabbitmq-c) (only needed if you are interested in RabbitMQ support for the Janus API or events) * [paho.mqtt.c](https://eclipse.org/paho/clients/c) (only needed if you are interested in MQTT support for the Janus API or events) * [nanomsg](https://nanomsg.org/) (only needed if you are interested in Nanomsg support for the Janus API) * [libcurl](https://curl.haxx.se/libcurl/) (only needed if you are interested in the TURN REST API support) A couple of plugins depend on a few more libraries: * [Sofia-SIP](http://sofia-sip.sourceforge.net/) (only needed for the SIP plugin) * [libopus](http://opus-codec.org/) (only needed for the AudioBridge plugin) * [libogg](http://xiph.org/ogg/) (needed for the VoiceMail plugin and/or post-processor, and optionally AudioBridge and Streaming plugins) * [libcurl](https://curl.haxx.se/libcurl/) (only needed if you are interested in RTSP support in the Streaming plugin or in the sample Event Handler plugin) * [Lua](https://www.lua.org/download.html) (only needed for the Lua plugin) Additionally, you'll need the following libraries and tools: * [GLib](http://library.gnome.org/devel/glib/) * [zlib](https://zlib.net/) * [pkg-config](http://www.freedesktop.org/wiki/Software/pkg-config/) * [gengetopt](http://www.gnu.org/software/gengetopt/) All of those libraries are usually available on most of the most common distributions. Installing these libraries on a recent Fedora, for instance, is very simple: yum install libmicrohttpd-devel jansson-devel \ openssl-devel libsrtp-devel sofia-sip-devel glib2-devel \ 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. 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 \ libconfig-dev pkg-config gengetopt libtool automake * *Note:* please notice that libopus may not be available out of the box on your distro. In that case, you'll have to [install it manually](http://www.opus-codec.org). While `libnice` is typically available in most distros as a package, the version available out of the box in Ubuntu is known to cause problems. As such, we always recommend manually compiling and installing the master version of libnice. To build libnice, you need Python 3, Meson and Ninja: git clone https://gitlab.freedesktop.org/libnice/libnice cd libnice meson --prefix=/usr build && ninja -C build && sudo ninja -C build install * *Note:* Make sure you remove the distro version first, or you'll cause conflicts between the installations. In case you want to keep both for some reason, for custom installations of libnice you can also run `pkg-config --cflags --libs nice` to make sure Janus can find the right installation. If that fails, you may need to set the `PKG_CONFIG_PATH` environment variable prior to compiling Janus, e.g., `export PKG_CONFIG_PATH=/path/to/libnice/lib/pkgconfig` In case you're interested in compiling the sample Event Handler plugin, you'll need to install the development version of libcurl as well (usually `libcurl-devel` on Fedora/CentOS, `libcurl4-openssl-dev` on Ubuntu/Debian). If your distro ships a pre-1.5 version of libsrtp, you'll have to uninstall that version and [install 1.5.x, 1.6.x or 2.x manually](https://github.com/cisco/libsrtp/releases). In fact, 1.4.x is known to cause several issues with WebRTC. While 1.5.x is supported, we recommend installing 2.x instead Notice that the following steps are for version 2.2.0, but there may be more recent versions available: wget https://github.com/cisco/libsrtp/archive/v2.2.0.tar.gz tar xfv v2.2.0.tar.gz cd libsrtp-2.2.0 ./configure --prefix=/usr --enable-openssl make shared_library && sudo make install Notice that the `--enable-openssl` part is _important_, as it's needed for AES-GCM support. As an alternative, you can also pass `--enable-nss` to have libsrtp use NSS instead of OpenSSL. A failure to configure libsrtp with either might cause undefined references when starting Janus, as we'd be trying to use methods that aren't there. The Janus configure script autodetects which one you have installed and links to the correct library automatically, choosing 2.x if both are installed. If you want 1.5 or 1.6 to be picked (which is NOT recommended), pass `--disable-libsrtp2` when configuring Janus to force it to use the older version instead. * *Note:* when installing libsrtp, no matter which version, you may need to pass `--libdir=/usr/lib64` to the configure script if you're installing on a x86_64 distribution. If you want to make use of BoringSSL instead of OpenSSL (e.g., because you want to take advantage of `--enable-dtls-settimeout`), you'll have to manually install it to a specific location. Use the following steps: git clone https://boringssl.googlesource.com/boringssl cd boringssl # Don't barf on errors sed -i s/" -Werror"//g CMakeLists.txt # Build mkdir -p build cd build cmake -DCMAKE_CXX_FLAGS="-lrt" .. make cd .. # Install sudo mkdir -p /opt/boringssl sudo cp -R include /opt/boringssl/ sudo mkdir -p /opt/boringssl/lib sudo cp build/ssl/libssl.a /opt/boringssl/lib/ sudo cp build/crypto/libcrypto.a /opt/boringssl/lib/ Once the library is installed, you'll have to pass an additional `--enable-boringssl` flag to the configure script, as by default Janus will be built assuming OpenSSL will be used. By default, Janus expects BoringSSL to be installed in `/opt/boringssl` -- if it's installed in another location, pass the path to the configure script as such: `--enable-boringssl=/path/to/boringssl` If you were using OpenSSL and want to switch to BoringSSL, make sure you also do a `make clean` in the Janus folder before compiling with the new BoringSSL support. If you enabled BoringSSL support and also want Janus to detect and react to DTLS timeouts with faster retransmissions, then pass `--enable-dtls-settimeout` to the configure script too. For what concerns usrsctp, which is needed for Data Channels support, it is usually not available in repositories, so if you're interested in them (support is optional) you'll have to install it manually. It is a pretty easy and standard process: git clone https://github.com/sctplab/usrsctp cd usrsctp ./bootstrap ./configure --prefix=/usr --disable-programs --disable-inet --disable-inet6 make && sudo make install * *Note:* you may need to pass `--libdir=/usr/lib64` to the configure script if you're installing on a x86_64 distribution. The same applies for libwebsockets, which is needed for the optional WebSockets support. If you're interested in supporting WebSockets to control Janus, as an alternative (or replacement) to the default plain HTTP REST API, you'll have to install it manually: git clone https://libwebsockets.org/repo/libwebsockets cd libwebsockets # If you want the stable version of libwebsockets, uncomment the next line # git checkout v3.2-stable mkdir build cd build # See https://github.com/meetecho/janus-gateway/issues/732 re: LWS_MAX_SMP # See https://github.com/meetecho/janus-gateway/issues/2476 re: LWS_WITHOUT_EXTENSIONS cmake -DLWS_MAX_SMP=1 -DLWS_WITHOUT_EXTENSIONS=0 -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_C_FLAGS="-fpic" .. make && sudo make install * *Note:* if libwebsockets.org is unreachable for any reason, replace the first line with this: git clone https://github.com/warmcat/libwebsockets.git The same applies for Eclipse Paho MQTT C client library, which is needed for the optional MQTT support. If you're interested in integrating MQTT channels as an alternative (or replacement) to HTTP and/or WebSockets to control Janus, or as a carrier of Janus Events, you can install the latest version with the following steps: git clone https://github.com/eclipse/paho.mqtt.c.git cd paho.mqtt.c make && sudo make install * *Note:* you may want to set up a different install path for the library, to achieve that, replace the last command by 'sudo prefix=/usr make install'. In case you're interested in Nanomsg support, you'll need to install the related C library. It is usually available as an easily installable package in pretty much all repositories. The following is an example on how to install it on Ubuntu: aptitude install libnanomsg-dev Finally, the same can be said for rabbitmq-c as well, which is needed for the optional RabbitMQ support. In fact, several different versions of the library can be found, and the versions usually available in most distribution repositories are not up-do-date with respect to the current state of the development. As such, if you're interested in integrating RabbitMQ queues as an alternative (or replacement) to HTTP and/or WebSockets to control Janus, you can install the latest version with the following steps: git clone https://github.com/alanxz/rabbitmq-c cd rabbitmq-c git submodule init git submodule update mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=/usr .. make && sudo make install * *Note:* you may need to pass `--libdir=/usr/lib64` to the configure script if you're installing on a x86_64 distribution. To conclude, should you be interested in building the Janus documentation as well, you'll need some additional tools too: * [Doxygen](http://www.doxygen.org) * [Graphviz](http://www.graphviz.org/) On Fedora: yum install doxygen graphviz On Ubuntu/Debian: aptitude install doxygen graphviz ## Compile Once you have installed all the dependencies, get the code: git clone https://github.com/meetecho/janus-gateway.git cd janus-gateway Then just use: sh autogen.sh to generate the configure file. After that, configure and compile as usual to start the whole compilation process: ./configure --prefix=/opt/janus make make install Since Janus requires configuration files for both the core and its modules in order to work, you'll probably also want to install the default configuration files to use, which you can do this way: make configs Remember to only do this once, or otherwise a subsequent `make configs` will overwrite any configuration file you may have modified in the meanwhile. If you've installed the above libraries but are not interested, for instance, in Data Channels, WebSockets, MQTT and/or RabbitMQ, you can disable them when configuring: ./configure --disable-websockets --disable-data-channels --disable-rabbitmq --disable-mqtt There are configuration flags for pretty much all external modules and many of the features, so you may want to issue a `./configure --help` to dig through the available options. A summary of what's going to be built will always appear after you do a configure, allowing you to double check if what you need and don't need is there. If Doxygen and graphviz are available, the process can also build the documentation for you. By default the compilation process will not try to build the documentation, so if you instead prefer to build it, use the `--enable-docs` configuration option: ./configure --enable-docs You can also selectively enable/disable other features (e.g., specific plugins you don't care about, or whether or not you want to build the recordings post-processor). Use the --help option when configuring for more info. ### Building on FreeBSD * *Note*: rtp_forward of streams only works streaming to IPv6, because of #2051 and thus the feature is not supported on FreeBSD at the moment. When building on FreeBSD you can install the depencencies from ports or packages, here only pkg method is used. You also need to use `gmake` instead of `make`, since it is a GNU makefile. `./configure` can be run without arguments since the default prefix is `/usr/local` which is your default `LOCALBASE`. Note that the `configure.ac` is coded to use openssl in base. If you wish to use openssl from ports or any other ssl you must change `configure.ac` accordingly. pkg install libsrtp2 libusrsctp jansson libnice libmicrohttpd libwebsockets curl opus sofia-sip libogg jansson libnice libconfig \ libtool gmake autoconf autoconf-wrapper glib gengetopt ### Building on MacOS While most of the above instructions will work when compiling Janus on MacOS as well, there are a few aspects to highlight when doing that. 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 \ 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. Notice that you may need to provide a custom `prefix` and `PKG_CONFIG_PATH` when configuring Janus as well, e.g.: ./configure --prefix=/usr/local/janus PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig Everything else works exactly the same way as on Linux. ## Configure and start To start the server, you can use the `janus` executable. There are several things you can configure, either in a configuration file: /etc/janus/janus.jcfg or on the command line: /bin/janus --help Usage: janus [OPTIONS]... -h, --help Print help and exit -V, --version Print version and exit -b, --daemon Launch Janus in background as a daemon (default=off) -p, --pid-file=path Open the specified PID file when starting Janus (default=none) -N, --disable-stdout Disable stdout based logging (default=off) -L, --log-file=path Log to the specified file (default=stdout only) -H --cwd-path Working directory for Janus daemon process (default=/) -i, --interface=ipaddress Interface to use (will be the public IP) -P, --plugins-folder=path Plugins folder (default=./plugins) -C, --config=filename Configuration file to use -F, --configs-folder=path Configuration files folder (default=./conf) -c, --cert-pem=filename DTLS certificate -k, --cert-key=filename DTLS certificate key -K, --cert-pwd=text DTLS certificate key passphrase (if needed) -S, --stun-server=address:port STUN server(:port) to use, if needed (e.g., Janus behind NAT, default=none) -1, --nat-1-1=ip Public IP to put in all host candidates, assuming a 1:1 NAT is in place (e.g., Amazon EC2 instances, default=none) -2, --keep-private-host When nat-1-1 is used (e.g., Amazon EC2 instances), don't remove the private host, but keep both to simulate STUN (default=off) -E, --ice-enforce-list=list Comma-separated list of the only interfaces to use for ICE gathering; partial strings are supported (e.g., eth0 or eno1,wlan0, default=none) -X, --ice-ignore-list=list Comma-separated list of interfaces or IP addresses to ignore for ICE gathering; partial strings are supported (e.g., vmnet8,192.168.0.1,10.0.0.1 or vmnet,192.168., default=vmnet) -6, --ipv6-candidates Whether to enable IPv6 candidates or not (experimental) (default=off) -O, --ipv6-link-local Whether IPv6 link-local candidates should be gathered as well (default=off) -l, --libnice-debug Whether to enable libnice debugging or not (default=off) -f, --full-trickle Do full-trickle instead of half-trickle (default=off) -I, --ice-lite Whether to enable the ICE Lite mode or not (default=off) -T, --ice-tcp Whether to enable ICE-TCP or not (warning: only works with ICE Lite) (default=off) -Q, --min-nack-queue=number Minimum size of the NACK queue (in ms) per user for retransmissions, no matter the RTT -t, --no-media-timer=number Time (in s) that should pass with no media (audio or video) being received before Janus notifies you about this -W, --slowlink-threshold=number Number of lost packets (per s) that should trigger a 'slowlink' Janus API event to users (default=0, feature disabled) -r, --rtp-port-range=min-max Port range to use for RTP/RTCP (only available if the installed libnice supports it) -B, --twcc-period=number How often (in ms) to send TWCC feedback back to senders, if negotiated (default=200ms) -n, --server-name=name Public name of this Janus instance (default=MyJanusInstance) -s, --session-timeout=number Session timeout value, in seconds (default=60) -m, --reclaim-session-timeout=number Reclaim session timeout value, in seconds (default=0) -d, --debug-level=1-7 Debug/logging level (0=disable debugging, 7=maximum debug level; default=4) -D, --debug-timestamps Enable debug/logging timestamps (default=off) -o, --disable-colors Disable color in the logging (default=off) -M, --debug-locks Enable debugging of locks/mutexes (very verbose!) (default=off) -a, --apisecret=randomstring API secret all requests need to pass in order to be accepted by Janus (useful when wrapping Janus API requests in a server, none by default) -A, --token-auth Enable token-based authentication for all requests (default=off) -e, --event-handlers Enable event handlers (default=off) -w, --no-webrtc-encryption Disable WebRTC encryption, so no DTLS or SRTP (only for debugging!) (default=off) Options passed through the command line have the precedence on those specified in the configuration file. To start the server, simply run: /bin/janus This will start the server, and have it look at the configuration file. Make sure you have a look at all of the configuration files, to tailor Janus to your specific needs: each configuration file is documented, so it shouldn't be hard to make changes according to your requirements. The repo comes with some defaults (assuming you issues `make configs` after installing the server) that tend to make sense for generic deployments, and also includes some sample configurations for all the plugins (e.g., web servers to listen on, conference rooms to create, streaming mountpoints to make available at startup, etc.). To test whether it's working correctly, you can use the demos provided with this package in the `html` folder: these are exactly the same demos available online on the [project website](https://janus.conf.meetecho.com/). Just copy the file it contains in a webserver, or use a userspace webserver to serve the files in the `html` folder (e.g., with php or python), and open the `index.html` page in either Chrome or Firefox. A list of demo pages exploiting the different plugins will be available. Remember to edit the transport/port details in the demo JavaScript files if you changed any transport-related configuration from its defaults. Besides, the demos refer to the pre-configured plugin resources, so if you add some new resources (e.g., a new videoconference) you may have to tweak the demo pages to actually use them. ## Documentation Janus is thoroughly documented. You can find the current documentation, automatically generated with Doxygen, on the [project website](https://janus.conf.meetecho.com/docs/). ## Help us! Any thought, feedback or (hopefully not!) insult is welcome! Developed by [@meetecho](https://github.com/meetecho) janus-gateway-0.11.8/SECURITY.md000066400000000000000000000017741420142227500161610ustar00rootroot00000000000000# Security Policy ## Supported Versions Notice that, while there are multiple versions of Janus, they're simply tagged versions of the master Janus branch. As such, once they're tagged as versions, they won't receive security updates. The only way to get security updates that are published after a specific version is to either use a more recent tagged version (if it includes the security fix) or refer to the master branch instead (which is where active development focuses on). Refer to the [CHANGELOG.md](CHANGELOG.md) file for information of what each version adds, including security related fixes. ## Reporting a Vulnerability In case you find a vulnerability you think we should be aware of, please use the contact form on the [Meetecho website](https://www.meetecho.com), using the "Not sure/Other" service type in the dropdown menu. We take vulnerability reports very seriously, and so we tend to prioritize the evaulation of such reports and, in case a fix is indeed warranted, the development of a fix. janus-gateway-0.11.8/apierror.c000066400000000000000000000037501420142227500163530ustar00rootroot00000000000000#include "apierror.h" const char *janus_get_api_error(int error) { switch(error) { case JANUS_OK: return "Success"; case JANUS_ERROR_UNAUTHORIZED: return "Unauthorized request (wrong or missing secret/token)"; case JANUS_ERROR_UNAUTHORIZED_PLUGIN: return "Unauthorized access to plugin (token is not allowed to)"; case JANUS_ERROR_UNKNOWN: return "Unknown error"; case JANUS_ERROR_TRANSPORT_SPECIFIC: return "Transport specific error"; case JANUS_ERROR_MISSING_REQUEST: return "Missing request"; case JANUS_ERROR_UNKNOWN_REQUEST: return "Unknown request"; case JANUS_ERROR_INVALID_JSON: return "Invalid JSON"; case JANUS_ERROR_INVALID_JSON_OBJECT: return "Invalid JSON Object"; case JANUS_ERROR_MISSING_MANDATORY_ELEMENT: return "Missing mandatory element"; case JANUS_ERROR_INVALID_REQUEST_PATH: return "Invalid path for this request"; case JANUS_ERROR_SESSION_NOT_FOUND: return "Session not found"; case JANUS_ERROR_HANDLE_NOT_FOUND: return "Handle not found"; case JANUS_ERROR_PLUGIN_NOT_FOUND: return "Plugin not found"; case JANUS_ERROR_PLUGIN_ATTACH: return "Error attaching plugin"; case JANUS_ERROR_PLUGIN_MESSAGE: return "Error sending message to plugin"; case JANUS_ERROR_PLUGIN_DETACH: return "Error detaching from plugin"; case JANUS_ERROR_JSEP_UNKNOWN_TYPE: return "Unsupported JSEP type"; case JANUS_ERROR_JSEP_INVALID_SDP: return "Invalid SDP"; case JANUS_ERROR_TRICKE_INVALID_STREAM: return "Invalid stream"; case JANUS_ERROR_INVALID_ELEMENT_TYPE: return "Invalid element type"; case JANUS_ERROR_SESSION_CONFLICT: return "Session ID already in use"; case JANUS_ERROR_UNEXPECTED_ANSWER: return "Unexpected ANSWER (no OFFER)"; case JANUS_ERROR_TOKEN_NOT_FOUND: return "Token not found"; case JANUS_ERROR_WEBRTC_STATE: return "Wrong WebRTC state"; case JANUS_ERROR_NOT_ACCEPTING_SESSIONS: return "Currently not accepting new sessions"; default: return "Unknown error"; } } janus-gateway-0.11.8/apierror.h000066400000000000000000000067451420142227500163670ustar00rootroot00000000000000/*! \file apierror.h * \author Lorenzo Miniero * \copyright GNU General Public License v3 * \brief Janus API errors definition * \details Definition of all the API errors that may occur when invoking * the Janus web-based JSON API. * \todo This code still needs proper hooks in the JavaScript libraries that use the interface. * * \ingroup core * \ref core */ #ifndef JANUS_API_ERROR_H #define JANUS_API_ERROR_H /*! \brief Success (no error) */ #define JANUS_OK 0 /*! \brief Unauthorized (can only happen when using apisecret/auth token) */ #define JANUS_ERROR_UNAUTHORIZED 403 /*! \brief Unauthorized access to a plugin (can only happen when using auth token) */ #define JANUS_ERROR_UNAUTHORIZED_PLUGIN 405 /*! \brief Unknown/undocumented error */ #define JANUS_ERROR_UNKNOWN 490 /*! \brief Transport related error */ #define JANUS_ERROR_TRANSPORT_SPECIFIC 450 /*! \brief The request is missing in the message */ #define JANUS_ERROR_MISSING_REQUEST 452 /*! \brief The Janus core does not suppurt this request */ #define JANUS_ERROR_UNKNOWN_REQUEST 453 /*! \brief The payload is not a valid JSON message */ #define JANUS_ERROR_INVALID_JSON 454 /*! \brief The object is not a valid JSON object as expected */ #define JANUS_ERROR_INVALID_JSON_OBJECT 455 /*! \brief A mandatory element is missing in the message */ #define JANUS_ERROR_MISSING_MANDATORY_ELEMENT 456 /*! \brief The request cannot be handled for this webserver path */ #define JANUS_ERROR_INVALID_REQUEST_PATH 457 /*! \brief The session the request refers to doesn't exist */ #define JANUS_ERROR_SESSION_NOT_FOUND 458 /*! \brief The handle the request refers to doesn't exist */ #define JANUS_ERROR_HANDLE_NOT_FOUND 459 /*! \brief The plugin the request wants to talk to doesn't exist */ #define JANUS_ERROR_PLUGIN_NOT_FOUND 460 /*! \brief An error occurring when trying to attach to a plugin and create a handle */ #define JANUS_ERROR_PLUGIN_ATTACH 461 /*! \brief An error occurring when trying to send a message/request to the plugin */ #define JANUS_ERROR_PLUGIN_MESSAGE 462 /*! \brief An error occurring when trying to detach from a plugin and destroy the related handle */ #define JANUS_ERROR_PLUGIN_DETACH 463 /*! \brief The Janus core doesn't support this SDP type */ #define JANUS_ERROR_JSEP_UNKNOWN_TYPE 464 /*! \brief The Session Description provided by the peer is invalid */ #define JANUS_ERROR_JSEP_INVALID_SDP 465 /*! \brief The stream a trickle candidate for does not exist or is invalid */ #define JANUS_ERROR_TRICKE_INVALID_STREAM 466 /*! \brief A JSON element is of the wrong type (e.g., an integer instead of a string) */ #define JANUS_ERROR_INVALID_ELEMENT_TYPE 467 /*! \brief The ID provided to create a new session is already in use */ #define JANUS_ERROR_SESSION_CONFLICT 468 /*! \brief We got an ANSWER to an OFFER we never made */ #define JANUS_ERROR_UNEXPECTED_ANSWER 469 /*! \brief The auth token the request refers to doesn't exist */ #define JANUS_ERROR_TOKEN_NOT_FOUND 470 /*! \brief The current request cannot be handled because of not compatible WebRTC state */ #define JANUS_ERROR_WEBRTC_STATE 471 /*! \brief The server is currently configured not to accept new sessions */ #define JANUS_ERROR_NOT_ACCEPTING_SESSIONS 472 /*! \brief Helper method to get a string representation of an API error code * @param[in] error The API error code * @returns A string representation of the error code */ const char *janus_get_api_error(int error); #endif janus-gateway-0.11.8/auth.c000066400000000000000000000235221420142227500154700ustar00rootroot00000000000000/*! \file auth.c * \author Lorenzo Miniero * \copyright GNU General Public License v3 * \brief Requests authentication * \details Implementation of simple mechanisms for authenticating * requests. * * If enabled (it's disabled by default), each request must contain a * valid token string, * or otherwise the request is rejected with an * error. * * When no \c token_auth_secret is set, Stored-token mode is active. * In this mode the Janus admin API can be used to specify valid string * tokens. Whether tokens should be shared across users or not is * completely up to the controlling application: these tokens are * completely opaque to Janus, and treated as strings, which means * Janus will only check if the token exists or not when asked. * * However, if a secret is set, the Signed-token mode is used. * In this mode, no direct communication between the controlling * application and Janus is necessary. Instead, the application signs * tokens that Janus can verify using the secret key. * * \ingroup core * \ref core */ #include #include #include "auth.h" #include "debug.h" #include "mutex.h" #include "utils.h" /* Hash table to contain the tokens to match */ static GHashTable *tokens = NULL, *allowed_plugins = NULL; static gboolean auth_enabled = FALSE; static janus_mutex mutex; static char *auth_secret = NULL; static void janus_auth_free_token(char *token) { g_free(token); } /* Setup */ void janus_auth_init(gboolean enabled, const char *secret) { if(enabled) { if(secret == NULL) { JANUS_LOG(LOG_INFO, "Stored-Token based authentication enabled\n"); tokens = g_hash_table_new_full(g_str_hash, g_str_equal, (GDestroyNotify)janus_auth_free_token, NULL); allowed_plugins = g_hash_table_new_full(g_str_hash, g_str_equal, (GDestroyNotify)janus_auth_free_token, NULL); auth_enabled = TRUE; } else { JANUS_LOG(LOG_INFO, "Signed-Token based authentication enabled\n"); auth_secret = g_strdup(secret); auth_enabled = TRUE; } } else { JANUS_LOG(LOG_INFO, "Token based authentication disabled\n"); } janus_mutex_init(&mutex); } gboolean janus_auth_is_enabled(void) { return auth_enabled; } gboolean janus_auth_is_stored_mode(void) { return auth_enabled && tokens != NULL; } gboolean janus_auth_is_signed_mode(void) { return auth_enabled && auth_secret != NULL; } void janus_auth_deinit(void) { janus_mutex_lock(&mutex); if(tokens != NULL) g_hash_table_destroy(tokens); tokens = NULL; if(allowed_plugins != NULL) g_hash_table_destroy(allowed_plugins); allowed_plugins = NULL; g_free(auth_secret); auth_secret = NULL; janus_mutex_unlock(&mutex); } gboolean janus_auth_check_signature(const char *token, const char *realm) { if (!auth_enabled || auth_secret == NULL) return FALSE; gchar **parts = g_strsplit(token, ":", 2); gchar **data = NULL; /* Token should have exactly one data and one hash part */ if(!parts[0] || !parts[1] || parts[2]) goto fail; data = g_strsplit(parts[0], ",", 3); /* Need at least an expiry timestamp and realm */ if(!data[0] || !data[1]) goto fail; /* Verify timestamp */ gint64 expiry_time = strtoll(data[0], NULL, 10); gint64 real_time = janus_get_real_time() / 1000000; if(expiry_time < 0 || real_time > expiry_time) goto fail; /* Verify realm */ if(strcmp(data[1], realm)) goto fail; /* Verify HMAC-SHA1 */ unsigned char signature[EVP_MAX_MD_SIZE]; unsigned int len; HMAC(EVP_sha1(), auth_secret, strlen(auth_secret), (const unsigned char*)parts[0], strlen(parts[0]), signature, &len); gchar *base64 = g_base64_encode(signature, len); gboolean result = janus_strcmp_const_time(parts[1], base64); g_strfreev(data); g_strfreev(parts); g_free(base64); return result; fail: g_strfreev(data); g_strfreev(parts); return FALSE; } gboolean janus_auth_check_signature_contains(const char *token, const char *realm, const char *desc) { if (!auth_enabled || auth_secret == NULL) { return TRUE; } if(token == NULL) return FALSE; gchar **parts = g_strsplit(token, ":", 2); gchar **data = NULL; /* Token should have exactly one data and one hash part */ if(!parts[0] || !parts[1] || parts[2]) goto fail; data = g_strsplit(parts[0], ",", 0); /* Need at least an expiry timestamp and realm */ if(!data[0] || !data[1]) goto fail; /* Verify timestamp */ gint64 expiry_time = strtoll(data[0], NULL, 10); gint64 real_time = janus_get_real_time() / 1000000; if(expiry_time < 0 || real_time > expiry_time) goto fail; /* Verify realm */ if(strcmp(data[1], realm)) goto fail; /* Find descriptor */ gboolean result = FALSE; int i = 2; for(i = 2; data[i]; i++) { if (!strcmp(desc, data[i])) { result = TRUE; break; } } if (!result) goto fail; /* Verify HMAC-SHA1 */ unsigned char signature[EVP_MAX_MD_SIZE]; unsigned int len; HMAC(EVP_sha1(), auth_secret, strlen(auth_secret), (const unsigned char*)parts[0], strlen(parts[0]), signature, &len); gchar *base64 = g_base64_encode(signature, len); result = janus_strcmp_const_time(parts[1], base64); g_strfreev(data); g_strfreev(parts); g_free(base64); return result; fail: g_strfreev(data); g_strfreev(parts); return FALSE; } /* Tokens manipulation */ gboolean janus_auth_add_token(const char *token) { if(!auth_enabled || tokens == NULL) { JANUS_LOG(LOG_ERR, "Can't add token, stored-authentication mechanism is disabled\n"); return FALSE; } if(token == NULL) return FALSE; janus_mutex_lock(&mutex); if(g_hash_table_lookup(tokens, token)) { JANUS_LOG(LOG_VERB, "Token already validated\n"); janus_mutex_unlock(&mutex); return TRUE; } char *new_token = g_strdup(token); g_hash_table_insert(tokens, new_token, new_token); janus_mutex_unlock(&mutex); return TRUE; } gboolean janus_auth_check_token(const char *token) { /* Always TRUE if the mechanism is disabled, of course */ if(!auth_enabled) return TRUE; if (tokens == NULL) return janus_auth_check_signature(token, "janus"); janus_mutex_lock(&mutex); if(token && g_hash_table_lookup(tokens, token)) { janus_mutex_unlock(&mutex); return TRUE; } janus_mutex_unlock(&mutex); return FALSE; } GList *janus_auth_list_tokens(void) { /* Always NULL if the mechanism is disabled, of course */ if(!auth_enabled || tokens == NULL) return NULL; janus_mutex_lock(&mutex); GList *list = NULL; if(g_hash_table_size(tokens) > 0) { GHashTableIter iter; gpointer value; g_hash_table_iter_init(&iter, tokens); while (g_hash_table_iter_next(&iter, NULL, &value)) { const char *token = value; list = g_list_append(list, g_strdup(token)); } } janus_mutex_unlock(&mutex); return list; } gboolean janus_auth_remove_token(const char *token) { if(!auth_enabled || tokens == NULL) { JANUS_LOG(LOG_ERR, "Can't remove token, stored-authentication mechanism is disabled\n"); return FALSE; } janus_mutex_lock(&mutex); gboolean ok = token && g_hash_table_remove(tokens, token); /* Also clear the allowed plugins mapping */ GList *list = g_hash_table_lookup(allowed_plugins, token); g_hash_table_remove(allowed_plugins, token); if(list != NULL) g_list_free(list); /* Done */ janus_mutex_unlock(&mutex); return ok; } /* Plugins access */ gboolean janus_auth_allow_plugin(const char *token, janus_plugin *plugin) { if(!auth_enabled || allowed_plugins == NULL) { JANUS_LOG(LOG_ERR, "Can't allow access to plugin, authentication mechanism is disabled\n"); return FALSE; } if(token == NULL || plugin == NULL) return FALSE; janus_mutex_lock(&mutex); if(!g_hash_table_lookup(tokens, token)) { janus_mutex_unlock(&mutex); return FALSE; } GList *list = g_hash_table_lookup(allowed_plugins, token); if(list == NULL) { /* Add the new permission now */ list = g_list_append(list, plugin); char *new_token = g_strdup(token); g_hash_table_insert(allowed_plugins, new_token, list); janus_mutex_unlock(&mutex); return TRUE; } /* We already have a list, update it if needed */ if(g_list_find(list, plugin) != NULL) { JANUS_LOG(LOG_VERB, "Plugin access already allowed for token\n"); janus_mutex_unlock(&mutex); return TRUE; } list = g_list_append(list, plugin); char *new_token = g_strdup(token); g_hash_table_insert(allowed_plugins, new_token, list); janus_mutex_unlock(&mutex); return TRUE; } gboolean janus_auth_check_plugin(const char *token, janus_plugin *plugin) { /* Always TRUE if the mechanism is disabled, of course */ if(!auth_enabled) return TRUE; if (allowed_plugins == NULL) return janus_auth_check_signature_contains(token, "janus", plugin->get_package()); janus_mutex_lock(&mutex); if(!g_hash_table_lookup(tokens, token)) { janus_mutex_unlock(&mutex); return FALSE; } GList *list = g_hash_table_lookup(allowed_plugins, token); if(g_list_find(list, plugin) == NULL) { janus_mutex_unlock(&mutex); return FALSE; } janus_mutex_unlock(&mutex); return TRUE; } GList *janus_auth_list_plugins(const char *token) { /* Always NULL if the mechanism is disabled, of course */ if(!auth_enabled || allowed_plugins == NULL) return NULL; janus_mutex_lock(&mutex); if(!g_hash_table_lookup(tokens, token)) { janus_mutex_unlock(&mutex); return FALSE; } GList *list = NULL; GList *plugins_list = g_hash_table_lookup(allowed_plugins, token); if(plugins_list != NULL) list = g_list_copy(plugins_list); janus_mutex_unlock(&mutex); return list; } gboolean janus_auth_disallow_plugin(const char *token, janus_plugin *plugin) { if(!auth_enabled || allowed_plugins == NULL) { JANUS_LOG(LOG_ERR, "Can't disallow access to plugin, authentication mechanism is disabled\n"); return FALSE; } janus_mutex_lock(&mutex); if(!g_hash_table_lookup(tokens, token)) { janus_mutex_unlock(&mutex); return FALSE; } GList *list = g_hash_table_lookup(allowed_plugins, token); if(list != NULL) { /* Update the list */ list = g_list_remove_all(list, plugin); char *new_token = g_strdup(token); g_hash_table_insert(allowed_plugins, new_token, list); } janus_mutex_unlock(&mutex); return TRUE; } janus-gateway-0.11.8/auth.h000066400000000000000000000112761420142227500155000ustar00rootroot00000000000000/*! \file auth.h * \author Lorenzo Miniero * \copyright GNU General Public License v3 * \brief Requests authentication (headers) * \details Implementation of a simple mechanism for authenticating * requests. If enabled (it's disabled by default), the Janus admin API * can be used to specify valid tokens; each request must then contain * a valid token string, or otherwise the request is rejected with an * error. Whether tokens should be shared across users or not is * completely up to the controlling application: these tokens are * completely opaque to Janus, and treated as strings, which means * Janus will only check if the token exists or not when asked. * * \ingroup core * \ref core */ #ifndef JANUS_AUTH_H #define JANUS_AUTH_H #include #include "plugins/plugin.h" /*! \brief Method to initializing the token based authentication * @param[in] enabled Whether the authentication mechanism should be enabled or not * @param[in] secret the secret to validate signed tokens against, or NULL to use stored tokens */ void janus_auth_init(gboolean enabled, const char *secret); /*! \brief Method to check whether the mechanism is enabled or not */ gboolean janus_auth_is_enabled(void); /*! \brief Method to check whether the mechanism is in stored-token mode or not */ gboolean janus_auth_is_stored_mode(void); /*! \brief Method to check whether the mechanism is in signed-token mode or not */ gboolean janus_auth_is_signed_mode(void); /*! \brief Method to de-initialize the mechanism */ void janus_auth_deinit(void); /*! \brief Method to check whether a signed token is valid * @param[in] token The token to validate * @param[in] realm The token realm * @returns TRUE if the signature is valid and not expired, FALSE otherwise */ gboolean janus_auth_check_signature(const char *token, const char *realm); /*! \brief Method to verify a signed token contains a descriptor * @param[in] token The token to validate * @param[in] realm The token realm * @param[in] desc The descriptor to search for * @returns When the token based authentication is enabled: TRUE if the token is valid, not expired and contains the descriptor, FALSE otherwise. When the token based authentication is disabled: always TRUE. */ gboolean janus_auth_check_signature_contains(const char *token, const char *realm, const char *desc); /*! \brief Method to add a new valid token for authenticating * @param[in] token The new valid token * @returns TRUE if the operation was successful, FALSE otherwise */ gboolean janus_auth_add_token(const char *token); /*! \brief Method to check whether a provided token is valid or not * \note verifies both token signatures and against stored tokens * @param[in] token The token to validate * @returns TRUE if the token is valid, FALSE otherwise */ gboolean janus_auth_check_token(const char *token); /*! \brief Method to return a list of the tokens * \note It's the caller responsibility to free the list and its values * @returns A pointer to a GList instance containing the tokens */ GList *janus_auth_list_tokens(void); /*! \brief Method to invalidate an existing token * @param[in] token The valid to invalidate * @returns TRUE if the operation was successful, FALSE otherwise */ gboolean janus_auth_remove_token(const char *token); /*! \brief Method to allow a token to use a plugin * @param[in] token The token that can now access this plugin * @param[in] plugin Opaque pointer to the janus_plugin instance this token can access * @returns TRUE if the operation was successful, FALSE otherwise */ gboolean janus_auth_allow_plugin(const char *token, janus_plugin *plugin); /*! \brief Method to check whether a provided token can access a specified plugin * \note verifies both token signatures and against stored tokens * @param[in] token The token to check * @param[in] plugin The plugin to check as an opaque pointer to a janus_plugin instance * @returns TRUE if the token is allowed to access the plugin, FALSE otherwise */ gboolean janus_auth_check_plugin(const char *token, janus_plugin *plugin); /*! \brief Method to return a list of the plugins a specific token has access to * \note It's the caller responsibility to free the list (but NOT the values) * @param[in] token The token to get the list for * @returns A pointer to a GList instance containing the liist */ GList *janus_auth_list_plugins(const char *token); /*! \brief Method to disallow a token to use a plugin * @param[in] token The token this operation refers to * @param[in] plugin Opaque pointer to the janus_plugin instance this token can not access anymore * @returns TRUE if the operation was successful, FALSE otherwise */ gboolean janus_auth_disallow_plugin(const char *token, janus_plugin *plugin); #endif janus-gateway-0.11.8/autogen.sh000077500000000000000000000001741420142227500163620ustar00rootroot00000000000000#!/bin/sh srcdir=`dirname $0` test -z "$srcdir" && srcdir=. mkdir -p m4 autoreconf --verbose --force --install || exit 1 janus-gateway-0.11.8/bower.json000066400000000000000000000017311420142227500163720ustar00rootroot00000000000000{ "name": "janus-gateway", "version": "0.11.8", "homepage": "https://github.com/meetecho/janus-gateway", "authors": [ "Lorenzo Miniero ", "Philip Withnall ", "Jack Leigh", "Pierce Lopez ", "Benjamin Trent ", "Dustin Oprea ", "Maurizio Porrato", "Giacomo Vacca", "mrauhu", "Min Wang", "leonuh", "Nicholas Wylie", "Graeme Yeates ", "gatecrasher777", "Damon Oehlman ", "Scott " ], "description": "A javascript library for interacting with the C based Janus WebRTC Server", "main": "./html/janus.js", "license": "GPLv3", "ignore": [ "**/.*", "**/*.alaw", "**/*.mjr", "node_modules", "bower_components", "test", "tests" ], "dependencies": { "webrtc-adapter": "8.1.1" } } janus-gateway-0.11.8/conf/000077500000000000000000000000001420142227500153045ustar00rootroot00000000000000janus-gateway-0.11.8/conf/janus.eventhandler.gelfevh.jcfg.sample000066400000000000000000000020461420142227500246360ustar00rootroot00000000000000# This configures the GELF event handler. Appending necessary headers # and sending messages via TCP or UDP 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) backend = "your.graylog.server" # DNS or IP of your Graylog server port = "12201" # Port Graylog server is listening on protocol = "tcp" # tcp or udp transport type max_message_len = 1024 # Note that we add 12 bytes of headers + standard UDP headers (8 bytes) # when calculating packet size based on MTU #compress = true # Optionally, only for UDP transport, JSON messages can be compressed using zlib #compression = 9 # In case, you can specify the compression factor, where 1 is # the fastest (low compression), and 9 gives the best compression } janus-gateway-0.11.8/conf/janus.eventhandler.mqttevh.jcfg.sample000066400000000000000000000054471420142227500247160ustar00rootroot00000000000000# This configures the MQTT event handler. Events are sent either on # one topic or on a topic per event type. # # By default, configuration topics for handle and webrtc event types # with the base topic are configured to /janus/events, e.g.: # /janus/events/handle # /janus/events/webrtc 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) json = "indented" # Whether the JSON messages should be indented (default), # plain (no indentation) or compact (no indentation and no spaces) url = "tcp://localhost:1883" # The URL of the MQTT server. "tcp://" and "ssl://" protocols are supported. #mqtt_version = "3.1.1" # Protocol version. Available values: 3.1, 3.1.1 (default), 5. client_id = "janus.example.com" # Janus client id. You have to configure a unique ID (default: guest). #keep_alive_interval = 20 # Keep connection for N seconds (default: 30) #cleansession = 0 # Clean session flag (default: off) #retain = 0 # Default MQTT retain flag for published events #qos = 1 # Default MQTT QoS for published events #max_inflight = 10 # Maximum number of inflight messages #max_buffered = 100 # Maximum number of buffered messages #disconnect_timeout = 100 # Seconds to wait before destroying client #username = "guest" # Username for authentication (default: no authentication) #password = "guest" # Password for authentication (default: no authentication) #topic = "/janus/events" # Base topic (default: /janus/events) #addevent = true # Whether we should add the event type to the base topic #tls_enable = false # Whether TLS support must be enabled # Initial message sent to status topic #connect_status = "{\"event\": \"connected\", \"eventhandler\": \"janus.eventhandler.mqttevh\"}" # Message sent after disconnect or as LWT #disconnect_status = "{\"event\": \"disconnected\"}" #will_enabled = false # Whether to enable LWT (default: false) #will_retain = 1 # Whether LWT should be retained (default: 1) #will_qos = 0 # QoS for LWT (default: 0) # Additional parameters if "mqtts://" schema is used #tls_verify_peer = true # Whether peer verification must be enabled #tls_verify_hostname = true # Whether hostname verification must be enabled # Certificates to use when TLS support is enabled, if needed #tls_cacert = "/path/to/cacert.pem" #tls_client_cert = "/path/to/cert.pem" #tls_client_key = "/path/to/key.pem" #tls_ciphers #tls_version # These options work with MQTT 5 only. #add_user_properties = () # List of user property ["key", "value"] pairs to add. } janus-gateway-0.11.8/conf/janus.eventhandler.nanomsgevh.jcfg.sample000066400000000000000000000032431420142227500253630ustar00rootroot00000000000000# This configures the Nanomsg event handler. Since this plugin only # forwards each event it receives via Nanomsg, you simply need to # configure (i) which events to subscribe to, (ii) the address to use for # the communication, and (iii) whether the address should be used to bind # locally or to connect to a remote endpoint. Notice that the only supported # pattern is NN_PUBSUB, where the Nanomsg event handler is the publisher. 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) #mode = "bind" # Whether we should 'bind' to the specified # address, or connect to it if remote (default) address = "ipc:///tmp/janusevh.ipc" # Address to use, refer to the Nanomsg documentation # for more info on different transports you can use here } janus-gateway-0.11.8/conf/janus.eventhandler.rabbitmqevh.jcfg.sample000066400000000000000000000036541420142227500255300ustar00rootroot00000000000000# 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" # Routing key to use when publishing messages #exchange_type = "fanout" # Rabbitmq exchange_type can be one of the available types: direct, topic, headers and fanout (fanout by defualt). #heartbeat = 60 # Defines the seconds without communication that should pass before considering the TCP connection unreachable. #declare_outgoing_queue = true # By default (for backwards compatibility), we declare an outgoing queue. Set this to false to disable that behavior #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" } janus-gateway-0.11.8/conf/janus.eventhandler.sampleevh.jcfg.sample000066400000000000000000000044021420142227500252000ustar00rootroot00000000000000# 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. json = "indented" # Whether the JSON messages should be indented (default), # plain (no indentation) or compact (no indentation and no spaces) #compress = true # Optionally, the JSON messages can be compressed using zlib #compression = 9 # In case, you can specify the compression factor, where 1 is # the fastest (low compression), and 9 gives the best compression # 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 = "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 } janus-gateway-0.11.8/conf/janus.eventhandler.wsevh.jcfg.sample000066400000000000000000000030601420142227500243470ustar00rootroot00000000000000# This configures the WebSockets event handler. Since this plugin only # forwards each event it receives via WebSockets, you simply need to # configure (i) which events to subscribe to, and (ii) the address of # the WebSockets 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. json = "indented" # Whether the JSON messages should be indented (default), # plain (no indentation) or compact (no indentation and no spaces) # Address the plugin will send all events to as WebSocket # messages. In case authentication is required to contact # the backend, set the credentials as well. backend = "ws://your.websocket.here" # subprotocol = "your-subprotocol" # In case you need to debug connection issues, you can configure # the 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_logging = "err,warn" } janus-gateway-0.11.8/conf/janus.jcfg.sample.in000066400000000000000000000552141420142227500211530ustar00rootroot00000000000000# 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 loggers_folder = "@loggerdir@" # External loggers 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!) #log_prefix = "[janus] " # In case you want log lines to be prefixed by some # custom text, you can use the 'log_prefix' property. # It supports terminal colors, meaning something like # "[\x1b[32mjanus\x1b[0m] " would show a green "janus" # string in square brackets (assuming debug_colors=true). # 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). #allow_loop_indication = true # In case a static number of event loops is # configured as explained above, by default # new handles will be allocated on one loop or # another by the Janus core itself. In some cases # it may be helpful to manually tell the Janus # core which loop a handle should be added to, # e.g., to group viewers of the same stream on # the same loop. This is possible via the Janus # API when performing the 'attach' request, but # only if allow_loop_indication is set to true; # it's set to false by default to avoid abuses. # Don't change if you don't know what you're doing! #opaqueid_in_api = true # Opaque IDs set by applications are typically # only passed to event handlers for correlation # purposes, but not sent back to the user or # application in the related Janus API responses # or events; in case you need them to be in the # Janus API too, set this property to 'true'. #hide_dependencies = true # By default, a call to the "info" endpoint of # either the Janus or Admin API now also returns # the versions of the main dependencies (e.g., # libnice, libsrtp, which crypto library is in # use and so on). Should you want that info not # to be disclose, set 'hide_dependencies' to true. #exit_on_dl_error = false # If a Janus shared libary cannot be loaded or an expected # symbol is not found, exit immediately. # The following is ONLY useful when debugging RTP/RTCP packets, # e.g., to look at unencrypted live traffic with a browser. By # default it is obviously disabled, as WebRTC mandates encryption. #no_webrtc_encryption = true # Janus provides ways via its API to specify custom paths to save # files to (e.g., recordings, pcap captures and the like). In order # to avoid people can mess with folders they're not supposed to, # you can configure an array of folders that Janus should prevent # creating files in. If the 'protected_folder' property below is # commented, no folder is protected. # Notice that at the moment this only covers attempts to start # an .mjr recording and pcap/text2pcap packet captures. protected_folders = [ "/bin", "/boot", "/dev", "/etc", "/initrd", "/lib", "/lib32", "/lib64", "/proc", "/sbin", "/sys", "/usr", "/var", # We add what are usually the folders Janus is installed to # as well: we don't just put "/opt/janus" because that would # include folders like "/opt/janus/share" that is where # recordings might be saved to by some plugins "/opt/janus/bin", "/opt/janus/etc", "/opt/janus/include", "/opt/janus/lib", "/opt/janus/lib32", "/opt/janus/lib64", "/opt/janus/sbin" ] } # Certificate and key to use for DTLS (and passphrase if needed). If missing, # Janus will autogenerate a self-signed certificate to use. Notice that # self-signed certificates are fine for the purpose of WebRTC DTLS # connectivity, for the time being, at least until Identity Providers # are standardized and implemented in browsers. If for some reason you # want to enforce the DTLS stack in Janus to enforce valid certificates # from peers, though, you can do that setting 'dtls_accept_selfsigned' to # 'false' below: DO NOT TOUCH THAT IF YOU DO NOT KNOW WHAT YOU'RE DOING! # You can also configure the DTLS ciphers to offer: the default if not # set is "DEFAULT:!NULL:!aNULL:!SHA256:!SHA384:!aECDH:!AESGCM+AES256:!aPSK" # Finally, by default NIST P-256 certificates are generated (see #1997), # but RSA generation is still supported if you set 'rsa_private_key' to 'true'. certificates: { #cert_pem = "/path/to/certificate.pem" #cert_key = "/path/to/key.pem" #cert_pwd = "secretpassphrase" #dtls_accept_selfsigned = false #dtls_ciphers = "your-desired-openssl-ciphers" #rsa_private_key = false } # Media-related stuff: you can configure whether if you want to enable IPv6 # support (and link-local IPs), the minimum size of the NACK queue (in ms, # defaults to 200ms) for retransmissions no matter the RTT, 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), # 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), how many lost packets should trigger a # 'slowlink' event to users (default=0, disabled), and how often, in milliseconds, # to send the Transport Wide Congestion Control feedback information back # to senders, if negotiated (default=200ms). 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 #ipv6_linklocal = true #min_nack_queue = 500 #rtp_port_range = "20000-40000" #dtls_mtu = 1200 #no_media_timer = 1 #slowlink_threshold = 4 #twcc_period = 100 #dtls_timeout = 500 # Janus can do some optimizations on the NACK queue, specifically when # keyframes are involved. Namely, you can configure Janus so that any # time a keyframe is sent to a user, the NACK buffer for that connection # is emptied. This allows Janus to ignore NACK requests for packets # sent shortly before the keyframe was sent, since it can be assumed # that the keyframe will restore a complete working image for the user # anyway (which is the main reason why video retransmissions are typically # required). While this optimization is known to work fine in most cases, # it can backfire in some edge cases, and so is disabled by default. #nack_optimizations = true # If you need DSCP packet marking and prioritization, you can configure # the 'dscp' property to a specific values, and Janus will try to # set it on all outgoing packets using libnice. Normally, the specs # suggest to use different values depending on whether audio, video # or data are used, but since all PeerConnections in Janus are bundled, # we can only use one. You can refer to this document for more info: # https://tools.ietf.org/html/draft-ietf-tsvwg-rtcweb-qos-18#page-6 # That said, DON'T TOUCH THIS IF YOU DON'T KNOW WHAT IT MEANS! #dscp = 46 } # 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). If libnice is # at least 0.1.15, you can choose which ICE nomination mode to use: valid # values are "regular" and "aggressive" (the default depends on the libnice # version itself; if we can set it, we set aggressive nomination). You can # also configure whether to use connectivity checks as keep-alives, which # might help detecting when a peer is no longer available (notice that # current libnice master is breaking connections after 50 seconds when # keepalive-conncheck is being used, so if you want to use it, better # sticking to 0.1.18 until the issue is addressed upstream). Finally, # you can also enable ICE-TCP support (beware that this may lead to problems # if you do not 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_nomination = "regular" #ice_keepalive_conncheck = true #ice_lite = true #ice_tcp = true # By default Janus tries to resolve mDNS (.local) candidates: even # though this is now done asynchronously and shouldn't keep the API # busy, even in case mDNS resolution takes a long time to timeout, # you can choose to drop all .local candidates instead, which is # helpful in case you know clients will never be in the same private # network as the one the Janus instance is running from. Notice that # this will cause ICE to fail if mDNS is the only way to connect! #ignore_mdns = 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. # If you'd rather keep the private IP address in place, rather than # replacing it (and so have both of them as advertised candidates), # then set the 'keep_private_host' property to true. # Multiple public IP addresses can be specified as a comma separated list # if the Janus is deployed in a DMZ between two 1-1 NAT for internal and # external users. #nat_1_1_mapping = "1.2.3.4" #keep_private_host = true # 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. Notice that you should NEVER configure # a TURN server for Janus unless it's really what you want! If you want # *users* to use TURN, then you need to configure that on the client # side, and NOT in Janus. The following TURN configuration should ONLY # be enabled when Janus itself is sitting behind a restrictive firewall # (e.g., it's part of a service installed on a box in a private home). #turn_server = "myturnserver.com" #turn_port = 3478 #turn_type = "udp" #turn_user = "myuser" #turn_pwd = "mypassword" # You can also 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. The timeout can be configured in seconds, with a default of # 10 seconds and a minimum of 1 second. Notice that the 'opaque_id' provided # via Janus API will be used as the username for a specific PeerConnection # by default; if that one is missing, the 'session_id' will be used as the # username instead. #turn_rest_api = "http://yourbackend.com/path/to/api" #turn_rest_api_key = "anyapikeyyoumayhaveset" #turn_rest_api_method = "GET" #turn_rest_api_timeout = 10 # In case a TURN server is provided, you can allow applications to force # Janus to use TURN (https://github.com/meetecho/janus-gateway/pull/2774). # This is NOT allowed by default: only enable it if you know what you're doing. #allow_force_relay = true # 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" # In case you want to allow Janus to start even if the configured STUN or TURN # server is unreachable, you can set 'ignore_unreachable_ice_server' to true. # WARNING: We do not recommend to ignore reachability problems, particularly # if you run Janus in the cloud. Before enabling this flag, make sure your # system is correctly configured and Janus starts after the network layer of # your machine is ready. Note that Linux distributions offer such directives. # You could use the following directive in systemd: 'After=network-online.target' # https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Before= #ignore_unreachable_ice_server = true } # 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" } # As a core feature, Janus can log either on the standard output, or to # a local file. Should you need more advanced logging functionality, you # can make use of one of the custom loggers, or write one yourself. Use the # 'disable' directive to prevent Janus from loading one or more loggers: # use a comma separated list of logger file names to identify the loggers # to disable. By default all available loggers are enabled and loaded at startup. loggers: { #disable = "libjanus_jsonlog.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). By default Janus sends single media # statistic events per media (audio, video and simulcast layers as separate # events): if you'd rather receive a single containing all media stats in a # single array, set 'combine_media_stats' to true. events: { #broadcast = true #combine_media_stats = true #disable = "libjanus_sampleevh.so" #stats_period = 5 } janus-gateway-0.11.8/conf/janus.logger.jsonlog.jcfg.sample000066400000000000000000000013641420142227500234730ustar00rootroot00000000000000# This configures the JSON-based file logger. This is a very simple logger # with no particular advantage over the existing, integrated, logging # functionality Janus provides, and so it's configuration is quite basic # as well: it's here mostly to provide a reference implementation for # developers willing to provide additional, and more complex, external loggers. general: { enabled = false # By default the module is not enabled json = "indented" # Since this logger simply writes each log line as # a JSON object to a file, you can configure whether # the JSON log lines should be indented (default), # plain (no indentation) or compact (no indentation and no spaces) filename = "/tmp/janus-log.json" # Filename to save to } janus-gateway-0.11.8/conf/janus.plugin.audiobridge.jcfg.sample000066400000000000000000000122041420142227500243100ustar00rootroot00000000000000# room-: { # description = "This is my awesome room" # is_private = true|false (whether this room should be in the public list, default=true) # secret = "" # pin = "" # sampling_rate = (e.g., 16000 for wideband mixing) # spatial_audio = true|false (if true, the mix will be stereo to spatially place users, default=false) # audiolevel_ext = true|false (whether the ssrc-audio-level RTP extension must # be negotiated/used or not for new joins, default=true) # audiolevel_event = true|false (whether to emit event to other users or not, default=false) # 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) # default_prebuffering = number of packets to buffer before decoding each particiant (default=6) # default_expectedloss = percent of packets we expect participants may miss, to help with FEC (default=0, max=20; automatically used for forwarders too) # default_bitrate = default bitrate in bps to use for the all participants (default=0, which means libopus decides; automatically used for forwarders too) # record = true|false (whether this room should be recorded, default=false) # record_file = "/path/to/recording.wav" (where to save the recording) # record_dir = "/path/to/" (path to save the recording to, makes record_file a relative path if provided) # mjrs = true|false (whether all participants in the room should be individually recorded to mjr files, default=false) # mjrs_dir = "/path/to/" (path to save the mjr files to) # allow_rtp_participants = true|false (whether participants should be allowed to join # via plain RTP as well, rather than just WebRTC, default=false) # groups = optional, non-hierarchical, array of groups to tag participants, for external forwarding purposes only # # 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 = "" # rtp_forward_host_family = "" # 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_codec = opus (default), pcma (A-Law) or pcmu (mu-Law) # rtp_forward_ptype = payload type to use when streaming (optional: only read for Opus, 100 used if missing) # rtp_forward_group = group of participants to forward, if enabled in the room (optional: forwards full mix if missing) # rtp_forward_srtp_suite = length of authentication tag (32 or 80) # rtp_forward_srtp_crypto = "" # 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 #lock_rtp_forward = true # Whether the admin_key above should be # enforced for RTP forwarding requests too #lock_play_file = true # Whether the admin_key above should be # enforced for playing .opus files too #record_tmp_ext = "tmp" # Optional temporary extension to add to filenames # while recording: e.g., setting "tmp" would mean # .wav --> .wav.tmp until the file is closed #events = false # Whether events should be sent to event # handlers (default=true) # By default, integers are used as a unique ID for both rooms and participants. # In case you want to use strings instead (e.g., a UUID), set string_ids to true. #string_ids = true # Normally, all AudioBridge participants will join by negotiating a WebRTC # PeerConnection: the plugin also supports adding participants that will # use plain RTP, though, be it for supporting legacy users (e.g., SIP # participants who an orchestrator can add to the bridge) or more simply # to temporarily inject external audio in a room from a live source. To # support plain RTP, the plugin needs to have a range of ports it can bind # to: notice this should be configured so that it doesn't conflict with other # plugins (e.g., Streaming, SIP, NoSIP) and applications (e.g., Janus itself). # The default if you don't specify anything is 10000-60000. #rtp_port_range = "50000-60000" # In case we need to support plain RTP participants, we'll also need to know # what local IP address to bind to for media. If no address is set in the # property below, then one will be automatically guessed from the system. #local_ip = "1.2.3.4" } room-1234: { description = "Demo Room" secret = "adminpwd" sampling_rate = 16000 record = false #record_dir = "/path/to/" #record_file = "recording.wav" } janus-gateway-0.11.8/conf/janus.plugin.duktape.jcfg.sample.in000066400000000000000000000021101420142227500240670ustar00rootroot00000000000000# 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" } janus-gateway-0.11.8/conf/janus.plugin.echotest.jcfg.sample000066400000000000000000000001461420142227500236520ustar00rootroot00000000000000# events = true|false, whether events should be sent to event handlers general: { #events = false } janus-gateway-0.11.8/conf/janus.plugin.lua.jcfg.sample.in000066400000000000000000000020731420142227500232230ustar00rootroot00000000000000# 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" } janus-gateway-0.11.8/conf/janus.plugin.nosip.jcfg.sample000066400000000000000000000014721420142227500231670ustar00rootroot00000000000000general: { # Specify which local IP address to bind to for media. # If not set it will be automatically guessed from the system #local_ip = "1.2.3.4" # Specify which (public) IP address to advertise in the SDP. # If not set, the value above or anything autodetected will be used #sdp_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=true) #events = false # If you need DSCP packet marking and prioritization, you can configure # the 'dscp_audio_rtp' and/or 'dscp_video_rtp' property to specific values, # and the plugin will set it on all outgoing audio/video RTP packets. # No packet marking is done if this parameter is undefined or equal to 0 #dscp_audio_rtp = 46 #dscp_video_rtp = 26 } janus-gateway-0.11.8/conf/janus.plugin.recordplay.jcfg.sample.in000066400000000000000000000002661420142227500246100ustar00rootroot00000000000000# path = where to place recordings in the file system # events = true|false, whether events should be sent to event handlers general: { path = "@recordingsdir@" #events = false } janus-gateway-0.11.8/conf/janus.plugin.sip.jcfg.sample000066400000000000000000000036331420142227500226330ustar00rootroot00000000000000general: { # Specify which local IP address to bind to for SIP stack. # If not set it will be automatically guessed from the system #local_ip = "1.2.3.4" # Specify which local IP address to bind for the media stack. # If not set it will be automatically set to the value of local_ip #local_media_ip = "1.2.3.4" # Specify which (public) IP address to advertise in the SDP. # If not set, the value above or anything autodetected will be used #sdp_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=true) #events = false # If you need DSCP packet marking and prioritization, you can configure # the 'dscp_audio_rtp' and/or 'dscp_video_rtp' property to specific values, # and the plugin will set it on all outgoing audio/video RTP packets. # No packet marking is done if this parameter is undefined or equal to 0 #dscp_audio_rtp = 46 #dscp_video_rtp = 26 # In case you want to use SIPS for some sessions, Sofia may need to # have access to a certificate to use: this is especially true for # Sofia >= 1.13, which will fail to create the agent if no certificate # is available. By default, Sofia looks for 'agent.pem' and 'cafile.pem' # in the '$HOME/.sip/auth' folder, but you can specify a different # one by uncommenting and setting the property below. #sips_certs_dir = "/etc/sip/certs" } janus-gateway-0.11.8/conf/janus.plugin.streaming.jcfg.sample.in000066400000000000000000000275301420142227500244400ustar00rootroot00000000000000# 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 # metadata = An optional string that can contain any metadata (e.g., JSON) # associated with the stream you want users to receive # is_private = true|false (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 = true|false (do/don't stream audio) # video = true|false (do/don't stream video) # The following options are only valid for the 'rtp' type: # data = true|false (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 port for receiving audio frames, if any # audioiface = network interface or IP address to bind to, if any (binds to all otherwise) # audiopt =