Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions lib/call-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,14 @@ class CallSession extends Emitter {
}
}
if (!voip_carrier_sid) {
/* no LCR/ inbound carrier for this account/SP - at this point its a random shuffle of outbound carriers */
voip_carrier_sid = await this.lookupOutboundCarrierForAccount(this.account_sid);
if(process.env.JAMBONES_OUTDIAL_TRUNK_FAILOVER==='false') {
this.logger.info(`no outbound carriers found for account_sid ${account_sid}`);
this.res.send(603);
return this.srf.endSession(this.req);
} else {
/* no LCR/ inbound carrier for this account/SP - at this point its a random shuffle of outbound carriers */
voip_carrier_sid = await this.lookupOutboundCarrierForAccount(this.account_sid);
}
}
if (!voip_carrier_sid) {
/* no outbound carriers exist for this account/SP */
Expand Down