Compare commits

..

2 Commits

Author SHA1 Message Date
Hoan Luu Huu
62bc6b4bac feat: add fs service url to sbc ping option (#383)
* feat multi srs

* add fs service URL to SBC ping option
2023-06-23 11:13:08 +01:00
two56
91fe3ceb06 Clear conference details in both Jambonz and FreeSWITCH (#350)
Co-authored-by: Matt Preskett <matt.preskett@netcall.com>
2023-06-14 15:35:04 -04:00
5 changed files with 21 additions and 10 deletions

5
app.js
View File

@@ -120,10 +120,15 @@ function handle(signal) {
srf.locals.disabled = true;
logger.info(`got signal ${signal}`);
const setName = `${(JAMBONES_CLUSTER_ID || 'default')}:active-fs`;
const fsServiceUrlSetName = `${(JAMBONES_CLUSTER_ID || 'default')}:fs-service-url`;
if (setName && srf.locals.localSipAddress) {
logger.info(`got signal ${signal}, removing ${srf.locals.localSipAddress} from set ${setName}`);
removeFromSet(setName, srf.locals.localSipAddress);
}
if (fsServiceUrlSetName && srf.locals.serviceUrl) {
logger.info(`got signal ${signal}, removing ${srf.locals.serviceUrl} from set ${fsServiceUrlSetName}`);
removeFromSet(fsServiceUrlSetName, srf.locals.serviceUrl);
}
removeFromSet(FS_UUID_SET_NAME, srf.locals.fsUUID);
if (K8S) {
srf.locals.lifecycleEmitter.operationalState = LifeCycleEvents.ScaleIn;

View File

@@ -114,7 +114,12 @@ class Conference extends Task {
}
this.emitter.emit('kill');
await this._doFinalMemberCheck(cs);
if (this.ep && this.ep.connected) this.ep.conn.removeAllListeners('esl::event::CUSTOM::*') ;
if (this.ep && this.ep.connected) {
this.ep.conn.removeAllListeners('esl::event::CUSTOM::*');
this.ep.api(`conference ${this.confName} kick ${this.memberId}`)
.catch((err) => this.logger.info({err}, 'Error kicking participant'));
}
cs.clearConferenceDetails();
this.notifyTaskDone();
}

View File

@@ -101,7 +101,8 @@ module.exports = (logger) => {
method: 'OPTIONS',
headers: {
'X-FS-Status': ms && !dryUpCalls ? 'open' : 'closed',
'X-FS-Calls': srf.locals.sessionTracker.count
'X-FS-Calls': srf.locals.sessionTracker.count,
'X-FS-ServiceUrl': srf.locals.serviceUrl
}
});
req.on('response', (res) => {

14
package-lock.json generated
View File

@@ -15,7 +15,7 @@
"@jambonz/speech-utils": "^0.0.15",
"@jambonz/stats-collector": "^0.1.8",
"@jambonz/time-series": "^0.2.7",
"@jambonz/verb-specifications": "^0.0.24",
"@jambonz/verb-specifications": "^0.0.25",
"@opentelemetry/api": "^1.4.0",
"@opentelemetry/exporter-jaeger": "^1.9.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.35.0",
@@ -1699,9 +1699,9 @@
}
},
"node_modules/@jambonz/verb-specifications": {
"version": "0.0.24",
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.24.tgz",
"integrity": "sha512-Bm8NKaCa2Xor82I1c873BtBaXbtFHXS3rPrnSM1+cYQqz5eXkl4QE4qDKqv2z9ihYYuuTZzTwwp8jQSXJGIb0g==",
"version": "0.0.25",
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.25.tgz",
"integrity": "sha512-Dq8bS9hNCWGm7CbSaAwMv3YzG6PI1tk3lOj0bFIF74FiLq/cIHtm4KsUwUMQPgJhED8Lbi0v3q63L98737ndbg==",
"dependencies": {
"debug": "^4.3.4",
"pino": "^8.8.0"
@@ -10219,9 +10219,9 @@
}
},
"@jambonz/verb-specifications": {
"version": "0.0.24",
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.24.tgz",
"integrity": "sha512-Bm8NKaCa2Xor82I1c873BtBaXbtFHXS3rPrnSM1+cYQqz5eXkl4QE4qDKqv2z9ihYYuuTZzTwwp8jQSXJGIb0g==",
"version": "0.0.25",
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.25.tgz",
"integrity": "sha512-Dq8bS9hNCWGm7CbSaAwMv3YzG6PI1tk3lOj0bFIF74FiLq/cIHtm4KsUwUMQPgJhED8Lbi0v3q63L98737ndbg==",
"requires": {
"debug": "^4.3.4",
"pino": "^8.8.0"

View File

@@ -31,7 +31,7 @@
"@jambonz/speech-utils": "^0.0.15",
"@jambonz/stats-collector": "^0.1.8",
"@jambonz/time-series": "^0.2.7",
"@jambonz/verb-specifications": "^0.0.24",
"@jambonz/verb-specifications": "^0.0.25",
"@opentelemetry/api": "^1.4.0",
"@opentelemetry/exporter-jaeger": "^1.9.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.35.0",