mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
added support for conference verb
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"TaskName": {
|
||||
"Conference": "conference",
|
||||
"Dial": "dial",
|
||||
"Gather": "gather",
|
||||
"Hangup": "hangup",
|
||||
|
||||
@@ -114,7 +114,15 @@ function installSrfLocals(srf, logger) {
|
||||
retrieveCall,
|
||||
listCalls,
|
||||
deleteCall,
|
||||
synthAudio
|
||||
synthAudio,
|
||||
createHash,
|
||||
retrieveHash,
|
||||
deleteKey,
|
||||
addKey,
|
||||
retrieveKey,
|
||||
retrieveSet,
|
||||
addToSet,
|
||||
removeFromSet
|
||||
} = require('jambonz-realtimedb-helpers')({
|
||||
host: process.env.JAMBONES_REDIS_HOST,
|
||||
port: process.env.JAMBONES_REDIS_PORT || 6379
|
||||
@@ -129,7 +137,15 @@ function installSrfLocals(srf, logger) {
|
||||
retrieveCall,
|
||||
listCalls,
|
||||
deleteCall,
|
||||
synthAudio
|
||||
synthAudio,
|
||||
createHash,
|
||||
retrieveHash,
|
||||
deleteKey,
|
||||
addKey,
|
||||
retrieveKey,
|
||||
retrieveSet,
|
||||
addToSet,
|
||||
removeFromSet
|
||||
},
|
||||
parentLogger: logger,
|
||||
ipv4: localIp,
|
||||
|
||||
@@ -77,7 +77,7 @@ class Requestor {
|
||||
try {
|
||||
buf = isRelativeUrl(url) ?
|
||||
await this.post(url, params, this.authHeader) :
|
||||
await bent(method, 'buffer', 200, 201)(url, params, basicAuth(username, password));
|
||||
await bent(method, 'buffer', 200, 201, 202)(url, params, basicAuth(username, password));
|
||||
} catch (err) {
|
||||
this.logger.info({baseUrl: this.baseUrl, url: err.statusCode},
|
||||
`web callback returned unexpected error code ${err.statusCode}`);
|
||||
@@ -95,7 +95,7 @@ class Requestor {
|
||||
return json;
|
||||
}
|
||||
catch (err) {
|
||||
this.logger.debug({err, url, method}, `Requestor:request returned non-JSON content: '${buf.toString()}'`);
|
||||
//this.logger.debug({err, url, method}, `Requestor:request returned non-JSON content: '${buf.toString()}'`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +75,8 @@ module.exports = (logger) => {
|
||||
uri: `sip:${sbc}`,
|
||||
method: 'OPTIONS',
|
||||
headers: {
|
||||
'X-FS-Status': ms && !dryUpCalls ? 'open' : 'closed'
|
||||
'X-FS-Status': ms && !dryUpCalls ? 'open' : 'closed',
|
||||
'X-FS-Calls': srf.locals.sessionTracker.count
|
||||
}
|
||||
});
|
||||
req.on('response', (res) => {
|
||||
@@ -91,7 +92,13 @@ module.exports = (logger) => {
|
||||
setInterval(() => {
|
||||
const {srf} = require('../..');
|
||||
pingProxies(srf);
|
||||
}, 60000);
|
||||
}, 20000);
|
||||
|
||||
// initial ping once we are up
|
||||
setTimeout(() => {
|
||||
const {srf} = require('../..');
|
||||
pingProxies(srf);
|
||||
}, 1000);
|
||||
|
||||
return {
|
||||
lifecycleEmitter,
|
||||
|
||||
Reference in New Issue
Block a user