remove no SP gateways if Account Gateways (#219)

This commit is contained in:
Sam Machin
2025-11-11 13:30:30 +00:00
committed by GitHub
parent 73eb8e8d17
commit 4150454736

View File

@@ -294,7 +294,7 @@ module.exports = (srf, logger) => {
/* get all the carriers and gateways for the account owning this sip realm */
const [gwAcc] = await pp.query(sqlSelectAllCarriersForAccountByRealm, [uri.host]);
const [gwSP] = gwAcc.length ? [[]] : await pp.query(sqlSelectAllCarriersForSPByRealm, uri.host);
const [gwSP] = await pp.query(sqlSelectAllCarriersForSPByRealm, uri.host);
const gw = gwAcc
.concat(gwSP)
.sort((a, b) => b.netmask - a.netmask);