mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2025-12-19 04:27:45 +00:00
bugfix: dialed numbers less than 8 digits are allowed since a voip_carrier may handle calls that are not actually routed to the PSTN (e.g. PBX)
This commit is contained in:
@@ -177,8 +177,8 @@ module.exports = (srf, logger, opts) => {
|
||||
return next();
|
||||
}
|
||||
|
||||
// if the called number is digits only (after possible leading plus sign) and long enough, do lcr
|
||||
if (!/^\d+$/.test(req.calledNumber.slice(1)) || req.calledNumber.length < 8) {
|
||||
// if the called number is digits only (after possible leading plus sign), do lcr
|
||||
if (!/^\d+$/.test(req.calledNumber.slice(1))) {
|
||||
debug(`unable to route call to ${aor}; no registered user found`);
|
||||
logger.info(`unable to route call to ${aor}; no registered user found`);
|
||||
return res.send(404);
|
||||
|
||||
Reference in New Issue
Block a user