|
@@ -55,12 +55,9 @@ export default function Moderator(roomName, xmpp, emitter, options) {
|
55
|
55
|
this.externalAuthEnabled = false;
|
56
|
56
|
this.options = options;
|
57
|
57
|
|
58
|
|
- // Sip gateway can be enabled by configuring Jigasi host in config.js or
|
59
|
|
- // it will be enabled automatically if focus detects the component through
|
60
|
|
- // service discovery.
|
61
|
|
- this.sipGatewayEnabled
|
62
|
|
- = this.options.connection.hosts
|
63
|
|
- && this.options.connection.hosts.call_control !== undefined;
|
|
58
|
+ // Whether SIP gateway (jigasi) support is enabled. This is set
|
|
59
|
+ // based on conference properties received in presence.
|
|
60
|
+ this.sipGatewayEnabled = false;
|
64
|
61
|
|
65
|
62
|
this.eventEmitter = emitter;
|
66
|
63
|
|
|
@@ -160,23 +157,7 @@ Moderator.prototype.createConferenceIq = function() {
|
160
|
157
|
if (sessionId) {
|
161
|
158
|
elem.attrs({ 'session-id': sessionId });
|
162
|
159
|
}
|
163
|
|
- if (this.options.connection.enforcedBridge !== undefined) {
|
164
|
|
- elem.c(
|
165
|
|
- 'property', {
|
166
|
|
- name: 'enforcedBridge',
|
167
|
|
- value: this.options.connection.enforcedBridge
|
168
|
|
- }).up();
|
169
|
|
- }
|
170
|
160
|
|
171
|
|
- // Tell the focus we have Jigasi configured
|
172
|
|
- if (this.options.connection.hosts !== undefined
|
173
|
|
- && this.options.connection.hosts.call_control !== undefined) {
|
174
|
|
- elem.c(
|
175
|
|
- 'property', {
|
176
|
|
- name: 'call_control',
|
177
|
|
- value: this.options.connection.hosts.call_control
|
178
|
|
- }).up();
|
179
|
|
- }
|
180
|
161
|
elem.c(
|
181
|
162
|
'property', {
|
182
|
163
|
name: 'disableRtx',
|
|
@@ -341,8 +322,7 @@ Moderator.prototype.parseConfigOptions = function(resultIq) {
|
341
|
322
|
this.eventEmitter.emit(AuthenticationEvents.IDENTITY_UPDATED,
|
342
|
323
|
authenticationEnabled, authIdentity);
|
343
|
324
|
|
344
|
|
- // Check if focus has auto-detected Jigasi component(this will be also
|
345
|
|
- // included if we have passed our host from the config)
|
|
325
|
+ // Check if jicofo has jigasi support enabled.
|
346
|
326
|
if ($(resultIq).find(
|
347
|
327
|
'>conference>property'
|
348
|
328
|
+ '[name=\'sipGatewayEnabled\'][value=\'true\']').length) {
|