mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2026-10-09 21:14:09 +00:00
bugfix: incoming call to accounts.sip_realm did not look for SP-level carriers
This commit is contained in:
+9
-1
@@ -112,7 +112,14 @@ module.exports = function(srf, logger) {
|
||||
const identifyAccount = async(req, res, next) => {
|
||||
try {
|
||||
const {wasOriginatedFromCarrier, getApplicationForDidAndCarrier} = req.srf.locals;
|
||||
const {fromCarrier, gateway, account_sid, application_sid, account} = await wasOriginatedFromCarrier(req);
|
||||
const {
|
||||
fromCarrier,
|
||||
gateway,
|
||||
account_sid,
|
||||
voip_carrier_sid,
|
||||
application_sid,
|
||||
account
|
||||
} = await wasOriginatedFromCarrier(req);
|
||||
/**
|
||||
* calls come from 3 sources:
|
||||
* (1) A carrier
|
||||
@@ -132,6 +139,7 @@ module.exports = function(srf, logger) {
|
||||
originator: 'trunk',
|
||||
carrier: gateway.name,
|
||||
gateway,
|
||||
voip_carrier_sid: gateway.voip_carrier_sid,
|
||||
application_sid: sid || gateway.application_sid,
|
||||
account_sid,
|
||||
account,
|
||||
|
||||
Reference in New Issue
Block a user