mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +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`);
|
||||
|
||||
// calculate if inbandDTMF tone is used
|
||||
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;
|
||||
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;
|
||||
|
||||
if (voip_carrier_sid) {
|
||||
const {lookupVoipCarrierBySid} = dbUtils(this.logger, this.srf);
|
||||
|
||||
@@ -8,7 +8,7 @@ const CallSession = require('./call-session');
|
||||
|
||||
*/
|
||||
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({
|
||||
logger,
|
||||
application,
|
||||
@@ -23,6 +23,7 @@ class ConfirmCallSession extends CallSession {
|
||||
});
|
||||
this.dlg = dlg;
|
||||
this.ep = ep;
|
||||
this.req = req;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -653,7 +653,8 @@ class Conference extends Task {
|
||||
memberId: this.memberId,
|
||||
confName: this.confName,
|
||||
tasks,
|
||||
rootSpan: cs.rootSpan
|
||||
rootSpan: cs.rootSpan,
|
||||
req: cs.req
|
||||
});
|
||||
await this._playSession.exec();
|
||||
this._playSession = null;
|
||||
|
||||
@@ -1048,7 +1048,8 @@ class TaskDial extends Task {
|
||||
callInfo: this.cs.callInfo,
|
||||
accountInfo: this.cs.accountInfo,
|
||||
tasks,
|
||||
rootSpan: this.cs.rootSpan
|
||||
rootSpan: this.cs.rootSpan,
|
||||
req: this.cs.req
|
||||
});
|
||||
await this._onHoldSession.exec();
|
||||
this._onHoldSession = null;
|
||||
|
||||
@@ -369,7 +369,8 @@ class TaskEnqueue extends Task {
|
||||
callInfo: cs.callInfo,
|
||||
accountInfo: cs.accountInfo,
|
||||
tasks: tasksToRun,
|
||||
rootSpan: cs.rootSpan
|
||||
rootSpan: cs.rootSpan,
|
||||
req: cs.req
|
||||
});
|
||||
await this._playSession.exec();
|
||||
this._playSession = null;
|
||||
|
||||
@@ -381,7 +381,8 @@ class SingleDialer extends Emitter {
|
||||
callInfo: this.callInfo,
|
||||
accountInfo: this.accountInfo,
|
||||
tasks,
|
||||
rootSpan: this.rootSpan
|
||||
rootSpan: this.rootSpan,
|
||||
req: this.req
|
||||
});
|
||||
await cs.exec();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user