mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
fix ConfirmCallSession in placeCall does not have access to tmpFiles for removing tmp file later (#1356)
This commit is contained in:
@@ -676,7 +676,8 @@ class TaskDial extends Task {
|
|||||||
rootSpan: cs.rootSpan,
|
rootSpan: cs.rootSpan,
|
||||||
startSpan: this.startSpan.bind(this),
|
startSpan: this.startSpan.bind(this),
|
||||||
dialTask: this,
|
dialTask: this,
|
||||||
onHoldMusic: this.cs.onHoldMusic
|
onHoldMusic: this.cs.onHoldMusic,
|
||||||
|
tmpFiles: this.cs.tmpFiles,
|
||||||
});
|
});
|
||||||
this.dials.set(sd.callSid, sd);
|
this.dials.set(sd.callSid, sd);
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const { createMediaEndpoint } = require('./media-endpoint');
|
|||||||
|
|
||||||
class SingleDialer extends Emitter {
|
class SingleDialer extends Emitter {
|
||||||
constructor({logger, sbcAddress, target, opts, application, callInfo, accountInfo, rootSpan, startSpan, dialTask,
|
constructor({logger, sbcAddress, target, opts, application, callInfo, accountInfo, rootSpan, startSpan, dialTask,
|
||||||
onHoldMusic}) {
|
onHoldMusic, tmpFiles}) {
|
||||||
super();
|
super();
|
||||||
assert(target.type);
|
assert(target.type);
|
||||||
|
|
||||||
@@ -44,6 +44,7 @@ class SingleDialer extends Emitter {
|
|||||||
this.callSid = crypto.randomUUID();
|
this.callSid = crypto.randomUUID();
|
||||||
this.dialTask = dialTask;
|
this.dialTask = dialTask;
|
||||||
this.onHoldMusic = onHoldMusic;
|
this.onHoldMusic = onHoldMusic;
|
||||||
|
this.tmpFiles = tmpFiles;
|
||||||
|
|
||||||
this.on('callStatusChange', this._notifyCallStatusChange.bind(this));
|
this.on('callStatusChange', this._notifyCallStatusChange.bind(this));
|
||||||
}
|
}
|
||||||
@@ -536,12 +537,12 @@ class SingleDialer extends Emitter {
|
|||||||
|
|
||||||
function placeOutdial({
|
function placeOutdial({
|
||||||
logger, srf, ms, sbcAddress, target, opts, application, callInfo, accountInfo, rootSpan, startSpan, dialTask,
|
logger, srf, ms, sbcAddress, target, opts, application, callInfo, accountInfo, rootSpan, startSpan, dialTask,
|
||||||
onHoldMusic
|
onHoldMusic, tmpFiles
|
||||||
}) {
|
}) {
|
||||||
const myOpts = deepcopy(opts);
|
const myOpts = deepcopy(opts);
|
||||||
const sd = new SingleDialer({
|
const sd = new SingleDialer({
|
||||||
logger, sbcAddress, target, opts: myOpts, application, callInfo,
|
logger, sbcAddress, target, opts: myOpts, application, callInfo,
|
||||||
accountInfo, rootSpan, startSpan, dialTask, onHoldMusic
|
accountInfo, rootSpan, startSpan, dialTask, onHoldMusic, tmpFiles
|
||||||
});
|
});
|
||||||
sd.exec(srf, ms, myOpts);
|
sd.exec(srf, ms, myOpts);
|
||||||
return sd;
|
return sd;
|
||||||
|
|||||||
Reference in New Issue
Block a user