diff --git a/bigbluebutton-html5/imports/api/audio/client/bridge/sip.js b/bigbluebutton-html5/imports/api/audio/client/bridge/sip.js index 720e88586a9b78e9c619601ad86d8247cdaad2be..6f01321317a7db4754ae1f49414937217def2222 100755 --- a/bigbluebutton-html5/imports/api/audio/client/bridge/sip.js +++ b/bigbluebutton-html5/imports/api/audio/client/bridge/sip.js @@ -180,18 +180,13 @@ class SIPSession { }, CALL_TRANSFER_TIMEOUT); // This is is the call transfer code ask @chadpilkey - if (this.sessionSupportRTPPayloadDtmf(this.currentSession)) { - this.currentSession.sessionDescriptionHandler.sendDtmf(1); - } else { - // RFC4733 not supported , sending DTMF through INFO - logger.debug({ - logCode: 'sip_js_rtp_payload_dtmf_not_supported', - extraInfo: { - callerIdName: this.user.callerIdName, - }, - }, 'Browser do not support payload dtmf, using INFO instead'); - this.sendDtmf(1); - } + logger.debug({ + logCode: 'sip_js_rtp_payload_send_dtmf', + extraInfo: { + callerIdName: this.user.callerIdName, + }, + }, 'Sending DTMF INFO to transfer user'); + this.sendDtmf(1); Tracker.autorun((c) => { trackerControl = c; diff --git a/bigbluebutton-html5/imports/api/cursor/server/handlers/cursorUpdate.js b/bigbluebutton-html5/imports/api/cursor/server/handlers/cursorUpdate.js index a3e5c2a1b07e5478626fa93ba93208a8724d66c2..6fe89e2c3e9bddc35cd65f67b4ec5e6a8165568d 100755 --- a/bigbluebutton-html5/imports/api/cursor/server/handlers/cursorUpdate.js +++ b/bigbluebutton-html5/imports/api/cursor/server/handlers/cursorUpdate.js @@ -17,9 +17,9 @@ const proccess = _.throttle(() => { delete cursorQueue[meetingId]; CursorStreamer(meetingId).emit('message', { meetingId, cursors }); - if (streamerLog) { - Logger.debug('CursorUpdate process has finished', { meetingId }); - } + // if (streamerLog) { + // Logger.debug('CursorUpdate process has finished', { meetingId }); + // } } catch (error) { Logger.error(`Error while trying to send cursor streamer data for meeting ${meetingId}. ${error}`); } diff --git a/bigbluebutton-html5/imports/api/external-videos/server/methods/initializeExternalVideo.js b/bigbluebutton-html5/imports/api/external-videos/server/methods/initializeExternalVideo.js index 847fd30756c017124537013c8123737cedab18a8..3a2275c220d6c7bf1e4e0c5fd84630d046b93bab 100644 --- a/bigbluebutton-html5/imports/api/external-videos/server/methods/initializeExternalVideo.js +++ b/bigbluebutton-html5/imports/api/external-videos/server/methods/initializeExternalVideo.js @@ -10,14 +10,7 @@ const allowRecentMessages = (eventName, message) => { state, } = message; - Logger.debug('ExternalVideo Streamer auth allowed', { - userId, - meetingId, - eventName, - time, - rate, - state, - }); + Logger.debug('ExternalVideo Streamer auth allowed', {userId, meetingId, eventName, time, rate, state}); return true; }; @@ -32,6 +25,6 @@ export default function initializeExternalVideo() { streamer.allowEmit(allowRecentMessages); Logger.info(`Created External Video streamer for ${streamName}`); } else { - Logger.debug('`External Video streamer is already created', { streamName }); + Logger.debug('External Video streamer is already created', { streamName }); } } diff --git a/bigbluebutton-html5/imports/startup/server/index.js b/bigbluebutton-html5/imports/startup/server/index.js index fa6e73c59c683d3a632326f367878019a94e4b70..ce0b3500e9b9cdb3c9397060c0c1c81cfb012f58 100755 --- a/bigbluebutton-html5/imports/startup/server/index.js +++ b/bigbluebutton-html5/imports/startup/server/index.js @@ -23,60 +23,65 @@ Meteor.startup(() => { const CDN_URL = APP_CONFIG.cdn; let heapDumpMbThreshold = 100; - // https://github.com/sockjs/sockjs-node/blob/1ef08901f045aae7b4df0f91ef598d7a11e82897/lib/transport/websocket.js#L74-L82 - const newHeartbeat = function heartbeat() { - const currentTime = new Date().getTime(); - - // Skipping heartbeat, because websocket is sending data - if (currentTime - this.ws.lastSentFrameTimestamp < 10000) { - Logger.info('Skipping heartbeat, because websocket is sending data', { - currentTime, - lastSentFrameTimestamp: this.ws.lastSentFrameTimestamp, - userId: this.session.connection._meteorSession.userId, - }); - return; - } + const { customHeartbeat } = APP_CONFIG; + + if (customHeartbeat) { + Logger.warn('Custom heartbeat functions are enabled'); + // https://github.com/sockjs/sockjs-node/blob/1ef08901f045aae7b4df0f91ef598d7a11e82897/lib/transport/websocket.js#L74-L82 + const newHeartbeat = function heartbeat() { + const currentTime = new Date().getTime(); + + // Skipping heartbeat, because websocket is sending data + if (currentTime - this.ws.lastSentFrameTimestamp < 10000) { + Logger.info('Skipping heartbeat, because websocket is sending data', { + currentTime, + lastSentFrameTimestamp: this.ws.lastSentFrameTimestamp, + userId: this.session.connection._meteorSession.userId, + }); + return; + } - const supportsHeartbeats = this.ws.ping(null, () => clearTimeout(this.hto_ref)); - if (supportsHeartbeats) { - this.hto_ref = setTimeout(() => { - Logger.info('Heartbeat timeout', { userId: this.session.connection._meteorSession.userId, sentAt: currentTime, now: new Date().getTime() }); - }, Meteor.server.options.heartbeatTimeout); - } else { - Logger.error('Unexpected error supportsHeartbeats=false'); - } - }; + const supportsHeartbeats = this.ws.ping(null, () => clearTimeout(this.hto_ref)); + if (supportsHeartbeats) { + this.hto_ref = setTimeout(() => { + Logger.info('Heartbeat timeout', { userId: this.session.connection._meteorSession.userId, sentAt: currentTime, now: new Date().getTime() }); + }, Meteor.server.options.heartbeatTimeout); + } else { + Logger.error('Unexpected error supportsHeartbeats=false'); + } + }; - // https://github.com/davhani/hagty/blob/6a5c78e9ae5a5e4ade03e747fb4cc8ea2df4be0c/faye-websocket/lib/faye/websocket/api.js#L84-L88 - const newSend = function send(data) { - this.lastSentFrameTimestamp = new Date().getTime(); + // https://github.com/davhani/hagty/blob/6a5c78e9ae5a5e4ade03e747fb4cc8ea2df4be0c/faye-websocket/lib/faye/websocket/api.js#L84-L88 + const newSend = function send(data) { + this.lastSentFrameTimestamp = new Date().getTime(); - // Call https://github.com/meteor/meteor/blob/1e7e56eec8414093cd0c1c70750b894069fc972a/packages/ddp-common/heartbeat.js#L80-L88 - this.meteorHeartbeat._seenPacket = true; - if (this.meteorHeartbeat._heartbeatTimeoutHandle) { - this.meteorHeartbeat._clearHeartbeatTimeoutTimer(); - } + // Call https://github.com/meteor/meteor/blob/1e7e56eec8414093cd0c1c70750b894069fc972a/packages/ddp-common/heartbeat.js#L80-L88 + this.meteorHeartbeat._seenPacket = true; + if (this.meteorHeartbeat._heartbeatTimeoutHandle) { + this.meteorHeartbeat._clearHeartbeatTimeoutTimer(); + } - if (this.readyState > 1/* API.OPEN = 1 */) return false; - if (!(data instanceof Buffer)) data = String(data); - return this._driver.messages.write(data); - }; + if (this.readyState > 1/* API.OPEN = 1 */) return false; + if (!(data instanceof Buffer)) data = String(data); + return this._driver.messages.write(data); + }; - Meteor.setInterval(() => { - for (const session of Meteor.server.sessions.values()) { - const { socket } = session; - const recv = socket._session.recv; + Meteor.setInterval(() => { + for (const session of Meteor.server.sessions.values()) { + const { socket } = session; + const recv = socket._session.recv; - if (session.bbbFixApplied || !recv || !recv.ws) { - continue; - } + if (session.bbbFixApplied || !recv || !recv.ws) { + continue; + } - recv.ws.meteorHeartbeat = session.heartbeat; - recv.__proto__.heartbeat = newHeartbeat; - recv.ws.__proto__.send = newSend; - session.bbbFixApplied = true; - } - }, 5000); + recv.ws.meteorHeartbeat = session.heartbeat; + recv.__proto__.heartbeat = newHeartbeat; + recv.ws.__proto__.send = newSend; + session.bbbFixApplied = true; + } + }, 5000); + } const memoryMonitoringSettings = Meteor.settings.private.memoryMonitoring; if (memoryMonitoringSettings.stat.enabled) { diff --git a/bigbluebutton-html5/imports/startup/server/redis.js b/bigbluebutton-html5/imports/startup/server/redis.js index 49fb95d991c89f6e58cfb2a14f5673bedc1f744b..d18f7302cef386f4a88aa14679f3001991d83733 100755 --- a/bigbluebutton-html5/imports/startup/server/redis.js +++ b/bigbluebutton-html5/imports/startup/server/redis.js @@ -60,7 +60,7 @@ class MeetingMessageQueue { } called = true; const queueLength = this.queue.length(); - if (queueLength > 0) { + if (queueLength > 100) { Logger.warn(`Redis: MeetingMessageQueue for meetingId=${meetingId} has queue size=${queueLength} `); } next(); diff --git a/bigbluebutton-html5/private/config/settings.yml b/bigbluebutton-html5/private/config/settings.yml index a8d5253345f3daf8a82912ec23a672c94e7b2550..62c69a3f6aa3fae15ab8fa27f9339c75ad666bfc 100755 --- a/bigbluebutton-html5/private/config/settings.yml +++ b/bigbluebutton-html5/private/config/settings.yml @@ -36,6 +36,7 @@ public: # can generate excessive overhead to the server. We recommend # this value to be kept under 12. breakoutRoomLimit: 8 + customHeartbeat: false defaultSettings: application: animations: true @@ -419,7 +420,7 @@ public: - pencil - hand clientLog: - server: { enabled: true, level: info } + server: { enabled: false, level: info } console: { enabled: true, level: debug } external: { enabled: false, level: info, url: https://LOG_HOST/html5Log, method: POST, throttleInterval: 400, flushOnClose: true, logTag: "" } private: