Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Improves SIP gateway auto configuration by getting feedback from the focus.
paweldomasc76b78eb46c5
diff --git a/moderator.js b/moderator.jsindex a4f31c415c..b0ca59ef90 100644--- a/moderator.js+++ b/moderator.js@@ -11,6 +11,10 @@ var Moderator = (function (my) {var getNextErrorTimeout = Util.createExpBackoffTimer(1000);// External authentication stuffvar externalAuthEnabled = false;+ // Sip gateway can be enabled by configuring Jigasi host in config.js or+ // it will be enabled automatically if focus detects the component through+ // service discovery.+ var sipGatewayEnabled = config.hosts.call_control !== undefined;my.isModerator = function () {return connection.emuc.isModerator();@@ -24,6 +28,10 @@ var Moderator = (function (my) {return externalAuthEnabled;};+ my.isSipGatewayEnabled = function () {+ return sipGatewayEnabled;+ };+my.onModeratorStatusChanged = function (isModerator) {Toolbar.showSipCallButton(isModerator);@@ -99,6 +107,14 @@ var Moderator = (function (my) {{ name: 'bridge', value: config.hosts.bridge}).up();}+ // Tell the focus we have Jigasi configured+ if (config.hosts.call_control !== undefined)+ {+ elem.c(+ 'property',+ { name: 'call_control', value: config.hosts.call_control})+ .up();+ }if (config.channelLastN !== undefined){elem.c(@@ -148,7 +164,17 @@ var Moderator = (function (my) {if (extAuthParam.length) {externalAuthEnabled = extAuthParam.attr('value') === 'true';}+console.info("External authentication enabled: " + externalAuthEnabled);++ // Check if focus has auto-detected Jigasi component(this will be also+ // included if we have passed our host from the config)+ if ($(resultIq).find(+ '>conference>property[name=\'sipGatewayEnabled\']').length) {+ sipGatewayEnabled = true;+ }++ console.info("Sip gateway enabled: " + sipGatewayEnabled);};// FIXME: we need to show the fact that we're waiting for the focusdiff --git a/toolbar.js b/toolbar.jsindex c920b10257..098d8dfa88 100644--- a/toolbar.js+++ b/toolbar.js@@ -265,7 +265,7 @@ var Toolbar = (function (my) {// Shows or hides SIP calls buttonmy.showSipCallButton = function (show) {- if (config.hosts.call_control && show) {+ if (Moderator.isSipGatewayEnabled() && show) {$('#sipCallButton').css({display: "inline"});} else {$('#sipCallButton').css({display: "none"});