bugfix for #22: headers were being incorrectly applied to follow-on INVITEs

This commit is contained in:
Dave Horton
2020-09-21 08:29:54 -04:00
parent 8f65b0de2f
commit e642e13946
3 changed files with 18 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ const registrar = new Registrar({
host: process.env.JAMBONES_REDIS_HOST,
port: process.env.JAMBONES_REDIS_PORT || 6379
});
const deepcopy = require('deepcopy');
const moment = require('moment');
const uuidv4 = require('uuid/v4');
@@ -289,8 +289,9 @@ class SingleDialer extends Emitter {
}
function placeOutdial({logger, srf, ms, sbcAddress, target, opts, application, callInfo}) {
const sd = new SingleDialer({logger, sbcAddress, target, opts, application, callInfo});
sd.exec(srf, ms, opts);
const myOpts = deepcopy(opts);
const sd = new SingleDialer({logger, sbcAddress, target, myOpts, application, callInfo});
sd.exec(srf, ms, myOpts);
return sd;
}

13
package-lock.json generated
View File

@@ -1034,6 +1034,14 @@
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
"dev": true
},
"deepcopy": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/deepcopy/-/deepcopy-2.1.0.tgz",
"integrity": "sha512-8cZeTb1ZKC3bdSCP6XOM1IsTczIO73fdqtwa2B0N15eAz7gmyhQo+mc5gnFuulsgN3vIQYmTgbmQVKalH1dKvQ==",
"requires": {
"type-detect": "^4.0.8"
}
},
"default-require-extensions": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz",
@@ -3906,6 +3914,11 @@
"prelude-ls": "^1.2.1"
}
},
"type-detect": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
"integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g=="
},
"type-fest": {
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",

View File

@@ -32,6 +32,7 @@
"bent": "^7.3.9",
"cidr-matcher": "^2.1.1",
"debug": "^4.1.1",
"deepcopy": "^2.1.0",
"drachtio-fsmrf": "^2.0.1",
"drachtio-srf": "^4.4.37",
"express": "^4.17.1",