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) {
|
if (r.length > 1) {
|
||||||
logger.info({r},
|
const all = r.map(({account_sid, voip_carrier_sid}) => ({account_sid, voip_carrier_sid}));
|
||||||
'multiple carriers with the same gateway have the same number provisioned for the same account'
|
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');
|
+ ' -- cannot determine which one to use');
|
||||||
return {
|
return {
|
||||||
fromCarrier: true,
|
fromCarrier: true,
|
||||||
@@ -601,8 +606,13 @@ module.exports = (srf, logger) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (r.length > 1) {
|
else if (r.length > 1) {
|
||||||
logger.info({r},
|
const all = r.map(({account_sid, voip_carrier_sid}) => ({account_sid, voip_carrier_sid}));
|
||||||
'multiple accounts have added this carrier with default routing -- cannot determine which to use');
|
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 {
|
return {
|
||||||
fromCarrier: true,
|
fromCarrier: true,
|
||||||
error: 'Multiple accounts are attempting to route the same phone number from the same carrier'
|
error: 'Multiple accounts are attempting to route the same phone number from the same carrier'
|
||||||
|
|||||||
Reference in New Issue
Block a user