Skip to content

Commit

Permalink
fix ConfirmCallSession cannot be played
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed Dec 4, 2024
1 parent dce4fe1 commit 020e4b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/session/call-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -1043,8 +1043,9 @@ 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;
// For ConfirmCallSession, req is not available and we don't need to enable DTMF tone for ConfirmCallSession
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);
Expand Down

0 comments on commit 020e4b7

Please sign in to comment.