This commit is contained in:
Dave Horton
2025-01-17 09:11:08 -05:00
parent c0e42bcdaa
commit 25415c0be9

View File

@@ -265,7 +265,7 @@ module.exports = (srf, logger) => {
/* find all carrier entries that have an inbound gateway matching the source IP */
const [gw] = await pp.query(sqlSelectAllGatewaysForSP);
logger.debug({gw}, `checking gateways for source address ${req.source_address}`);
//logger.debug({gw}, `checking gateways for source address ${req.source_address}`);
let matches = gw
.sort((a, b) => b.netmask - a.netmask)
.filter(gatewayMatchesSourceAddress.bind(null, logger, req.source_address))
@@ -283,7 +283,7 @@ module.exports = (srf, logger) => {
if (matches.length > 1) {
matches = [...new Set(matches.map(JSON.stringify))].map(JSON.parse);
}
logger.debug({matches}, `matches for source address ${req.source_address}`);
//logger.debug({matches}, `matches for source address ${req.source_address}`);
if (matches.length) {
/* we have one or more matches. Now check for one with a provisioned phone number matching the DID */
const vc_sids = matches.map((m) => `'${m.voip_carrier_sid}'`).join(',');