Adds isSIPCallingSupported method to the conference

This commit is contained in:
hristoterezov 2015-12-29 17:51:17 -06:00
parent 47e86a5fa9
commit 5663f24c14
4 changed files with 38 additions and 2 deletions

View File

@ -577,6 +577,15 @@ JitsiConference.prototype.toggleRecording = function (token, followEntity) {
reject(new Error("The conference is not created yet!"))});
}
/**
* Returns true if the SIP calls are supported and false otherwise
*/
JitsiConference.prototype.isSIPCallingSupported = function () {
if(this.room)
return this.room.isSIPCallingSupported();
return false;
}
/**
* Dials a number.
* @param number the number

View File

@ -579,6 +579,15 @@ JitsiConference.prototype.toggleRecording = function (token, followEntity) {
reject(new Error("The conference is not created yet!"))});
}
/**
* Returns true if the SIP calls are supported and false otherwise
*/
JitsiConference.prototype.isSIPCallingSupported = function () {
if(this.room)
return this.room.isSIPCallingSupported();
return false;
}
/**
* Dials a number.
* @param number the number
@ -6753,6 +6762,15 @@ ChatRoom.prototype.toggleRecording = function (token, followEntity) {
reject(new Error("The conference is not created yet!"))});
}
/**
* Returns true if the SIP calls are supported and false otherwise
*/
ChatRoom.prototype.isSIPCallingSupported = function () {
if(this.moderator)
return this.moderator.isSipGatewayEnabled();
return false;
}
/**
* Dials a number.
* @param number the number
@ -10552,7 +10570,7 @@ function Moderator(roomName, xmpp, emitter) {
// 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.
this.sipGatewayEnabled =
this.sipGatewayEnabled = this.xmppService.options.hosts &&
this.xmppService.options.hosts.call_control !== undefined;
this.eventEmitter = emitter;

View File

@ -706,6 +706,15 @@ ChatRoom.prototype.toggleRecording = function (token, followEntity) {
reject(new Error("The conference is not created yet!"))});
}
/**
* Returns true if the SIP calls are supported and false otherwise
*/
ChatRoom.prototype.isSIPCallingSupported = function () {
if(this.moderator)
return this.moderator.isSipGatewayEnabled();
return false;
}
/**
* Dials a number.
* @param number the number

View File

@ -38,7 +38,7 @@ function Moderator(roomName, xmpp, emitter) {
// 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.
this.sipGatewayEnabled =
this.sipGatewayEnabled = this.xmppService.options.hosts &&
this.xmppService.options.hosts.call_control !== undefined;
this.eventEmitter = emitter;