mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
fix ConfirmCallSession cannot be played (#993)
* fix ConfirmCallSession cannot be played * fix review comments * fix review comments
This commit is contained in:
@@ -1043,8 +1043,8 @@ class CallSession extends Emitter {
|
|||||||
this.logger.info({tasks: listTaskNames(this.tasks)}, `CallSession:exec starting ${this.tasks.length} tasks`);
|
this.logger.info({tasks: listTaskNames(this.tasks)}, `CallSession:exec starting ${this.tasks.length} tasks`);
|
||||||
|
|
||||||
// calculate if inbandDTMF tone is used
|
// calculate if inbandDTMF tone is used
|
||||||
const voip_carrier_sid = this.req.has('X-Voip-Carrier-Sid') ? this.req.get('X-Voip-Carrier-Sid') :
|
const voip_carrier_sid = this.req?.has('X-Voip-Carrier-Sid') ? this.req.get('X-Voip-Carrier-Sid') :
|
||||||
this.req.has('X-Requested-Carrier-Sid') ? this.req.get('X-Requested-Carrier-Sid') : null;
|
this.req?.has('X-Requested-Carrier-Sid') ? this.req.get('X-Requested-Carrier-Sid') : null;
|
||||||
|
|
||||||
if (voip_carrier_sid) {
|
if (voip_carrier_sid) {
|
||||||
const {lookupVoipCarrierBySid} = dbUtils(this.logger, this.srf);
|
const {lookupVoipCarrierBySid} = dbUtils(this.logger, this.srf);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const CallSession = require('./call-session');
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
class ConfirmCallSession extends CallSession {
|
class ConfirmCallSession extends CallSession {
|
||||||
constructor({logger, application, dlg, ep, tasks, callInfo, accountInfo, memberId, confName, rootSpan}) {
|
constructor({logger, application, dlg, ep, tasks, callInfo, accountInfo, memberId, confName, rootSpan, req}) {
|
||||||
super({
|
super({
|
||||||
logger,
|
logger,
|
||||||
application,
|
application,
|
||||||
@@ -23,6 +23,7 @@ class ConfirmCallSession extends CallSession {
|
|||||||
});
|
});
|
||||||
this.dlg = dlg;
|
this.dlg = dlg;
|
||||||
this.ep = ep;
|
this.ep = ep;
|
||||||
|
this.req = req;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -653,7 +653,8 @@ class Conference extends Task {
|
|||||||
memberId: this.memberId,
|
memberId: this.memberId,
|
||||||
confName: this.confName,
|
confName: this.confName,
|
||||||
tasks,
|
tasks,
|
||||||
rootSpan: cs.rootSpan
|
rootSpan: cs.rootSpan,
|
||||||
|
req: cs.req
|
||||||
});
|
});
|
||||||
await this._playSession.exec();
|
await this._playSession.exec();
|
||||||
this._playSession = null;
|
this._playSession = null;
|
||||||
|
|||||||
@@ -1048,7 +1048,8 @@ class TaskDial extends Task {
|
|||||||
callInfo: this.cs.callInfo,
|
callInfo: this.cs.callInfo,
|
||||||
accountInfo: this.cs.accountInfo,
|
accountInfo: this.cs.accountInfo,
|
||||||
tasks,
|
tasks,
|
||||||
rootSpan: this.cs.rootSpan
|
rootSpan: this.cs.rootSpan,
|
||||||
|
req: this.cs.req
|
||||||
});
|
});
|
||||||
await this._onHoldSession.exec();
|
await this._onHoldSession.exec();
|
||||||
this._onHoldSession = null;
|
this._onHoldSession = null;
|
||||||
|
|||||||
@@ -369,7 +369,8 @@ class TaskEnqueue extends Task {
|
|||||||
callInfo: cs.callInfo,
|
callInfo: cs.callInfo,
|
||||||
accountInfo: cs.accountInfo,
|
accountInfo: cs.accountInfo,
|
||||||
tasks: tasksToRun,
|
tasks: tasksToRun,
|
||||||
rootSpan: cs.rootSpan
|
rootSpan: cs.rootSpan,
|
||||||
|
req: cs.req
|
||||||
});
|
});
|
||||||
await this._playSession.exec();
|
await this._playSession.exec();
|
||||||
this._playSession = null;
|
this._playSession = null;
|
||||||
|
|||||||
@@ -381,7 +381,8 @@ class SingleDialer extends Emitter {
|
|||||||
callInfo: this.callInfo,
|
callInfo: this.callInfo,
|
||||||
accountInfo: this.accountInfo,
|
accountInfo: this.accountInfo,
|
||||||
tasks,
|
tasks,
|
||||||
rootSpan: this.rootSpan
|
rootSpan: this.rootSpan,
|
||||||
|
req: this.req
|
||||||
});
|
});
|
||||||
await cs.exec();
|
await cs.exec();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user