mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2026-05-06 08:47:14 +00:00
curtail massive log msg (#242)
This commit is contained in:
+14
-4
@@ -394,8 +394,13 @@ module.exports = (srf, logger) => {
|
||||
}
|
||||
}
|
||||
if (r.length > 1) {
|
||||
logger.info({r},
|
||||
'multiple carriers with the same gateway have the same number provisioned for the same account'
|
||||
const all = r.map(({account_sid, voip_carrier_sid}) => ({account_sid, voip_carrier_sid}));
|
||||
logger.info({
|
||||
number: r[0].number,
|
||||
total: all.length,
|
||||
matches: all.slice(0, 5)
|
||||
},
|
||||
'multiple carriers with the same gateway have the same number provisioned for the same account'
|
||||
+ ' -- cannot determine which one to use');
|
||||
return {
|
||||
fromCarrier: true,
|
||||
@@ -601,8 +606,13 @@ module.exports = (srf, logger) => {
|
||||
}
|
||||
}
|
||||
else if (r.length > 1) {
|
||||
logger.info({r},
|
||||
'multiple accounts have added this carrier with default routing -- cannot determine which to use');
|
||||
const all = r.map(({account_sid, voip_carrier_sid}) => ({account_sid, voip_carrier_sid}));
|
||||
logger.info({
|
||||
number: r[0].number,
|
||||
total: all.length,
|
||||
matches: all.slice(0, 5)
|
||||
},
|
||||
'multiple accounts have added this carrier with default routing -- cannot determine which to use');
|
||||
return {
|
||||
fromCarrier: true,
|
||||
error: 'Multiple accounts are attempting to route the same phone number from the same carrier'
|
||||
|
||||
Reference in New Issue
Block a user