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;
}