mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2025-12-19 04:37:43 +00:00
logging
This commit is contained in:
@@ -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(',');
|
||||
|
||||
Reference in New Issue
Block a user