fixes for dynamic

This commit is contained in:
Dave Horton
2020-02-17 21:37:45 -05:00
parent bfaa396f03
commit 8c95a5ceeb
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ class CallSession extends Emitter {
this.logger.info('No available feature servers, rejecting call!');
return this.res.send(480);
}
debug(`using feature server ${featureServer}`);
this.logger.debug(`using feature server ${featureServer}`);
this.rtpEngineOpts = makeRtpEngineOpts(this.req, isWSS(this.req), false);
this.rtpEngineResource = {destroy: this.del.bind(null, this.rtpEngineOpts.common)};
@@ -43,7 +43,7 @@ class CallSession extends Emitter {
// replace host part of uri if its an ipv4 address, leave it otherwise
if (/\d{1-3}\.\d{1-3}\.\d{1-3}\.\d{1-3}/.test(obj.host)) {
host = obj.host;
proxy = featureServer;
proxy = `sip:${featureServer}`;
}
else {
host = featureServer;
+1 -1
View File
@@ -10,7 +10,7 @@ module.exports = (srf, logger) => {
srf.options((req, res) => {
res.send(200);
if (req.has('X-FS-Status')) {
const uri = `sip:${req.source_address}:${req.source_address}`;
const uri = `${req.source_address}:${req.source_address}`;
const status = req.get('X-FS-Status');
const calls = req.has('X-FS-Calls') ? parseInt(req.get('X-FS-Calls')) : 0;
if (status === 'open') {