mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2026-07-24 21:01:49 +00:00
fixes for dynamic
This commit is contained in:
+2
-2
@@ -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
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user