-
-
Notifications
You must be signed in to change notification settings - Fork 25
Added a environment variable JAMBONES_OUTDIAL_TRUNK_FAILOVER to disab… #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -229,6 +229,14 @@ class CallSession extends Emitter { | |
| /* was a specific carrier requested */ | ||
| let voip_carrier_sid = this.req.get('X-Requested-Carrier-Sid'); | ||
| const account_sid = this.req.get('X-Account-Sid'); | ||
| this.logger.info(`carrier requested ${voip_carrier_sid}`); | ||
| if (!voip_carrier_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); | ||
| } | ||
| } | ||
| if (!voip_carrier_sid && account_sid) { | ||
| /* search for an LCR table for this account or service provider */ | ||
| voip_carrier_sid = await this.lookupCarrierByAccountLcr(account_sid, this.req.calledNumber); | ||
|
|
@@ -247,7 +255,7 @@ 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); | ||
| voip_carrier_sid = await this.lookupOutboundCarrierForAccount(this.account_sid); | ||
| } | ||
| if (!voip_carrier_sid) { | ||
| /* no outbound carriers exist for this account/SP */ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this info log was used for debugging and can be removed