mirror of
https://github.com/jambonz/sbc-inbound.git
synced 2026-01-24 22:37:51 +00:00
remove no SP gateways if Account Gateways (#219)
This commit is contained in:
@@ -294,7 +294,7 @@ module.exports = (srf, logger) => {
|
|||||||
|
|
||||||
/* get all the carriers and gateways for the account owning this sip realm */
|
/* get all the carriers and gateways for the account owning this sip realm */
|
||||||
const [gwAcc] = await pp.query(sqlSelectAllCarriersForAccountByRealm, [uri.host]);
|
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
|
const gw = gwAcc
|
||||||
.concat(gwSP)
|
.concat(gwSP)
|
||||||
.sort((a, b) => b.netmask - a.netmask);
|
.sort((a, b) => b.netmask - a.netmask);
|
||||||
|
|||||||
Reference in New Issue
Block a user