mirror of
https://github.com/jambonz/sbc-sip-sidecar.git
synced 2026-03-21 18:58:05 +00:00
remove send_options_bots array (#129)
fixes ticket #1983 Co-authored-by: rhonda hollis <rhonda@jambonz.org>
This commit is contained in:
@@ -2,7 +2,6 @@ const { addSipGatewayToBlacklist, removeSipGatewayFromBlacklist, isSipGatewayBla
|
||||
const {OPTIONS_RESPONSE_REMOVE} = require('./config');
|
||||
|
||||
const send_options_gateways = [];
|
||||
const send_options_bots = [];
|
||||
|
||||
class OptionsBot {
|
||||
constructor(logger, gateway) {
|
||||
@@ -93,6 +92,7 @@ class OptionsBot {
|
||||
}
|
||||
|
||||
module.exports = async(logger, srf) => {
|
||||
|
||||
const updateSipGatewayOptsBot = async(logger, srf) => {
|
||||
try {
|
||||
|
||||
@@ -105,10 +105,9 @@ module.exports = async(logger, srf) => {
|
||||
send_options_gateways.push(...gws);
|
||||
for (const g of send_options_gateways) {
|
||||
const optsBot = new OptionsBot(logger, g);
|
||||
send_options_bots.push(optsBot);
|
||||
optsBot.options(srf);
|
||||
}
|
||||
logger.debug(`updateSipGatewayOptsBot: we have started ${send_options_bots.length} optionsBots`);
|
||||
logger.debug(`updateSipGatewayOptsBot: we have started ${send_options_gateways.length} optionsBots`);
|
||||
}
|
||||
} catch (err) {
|
||||
logger.error({ err }, 'updateSipGatewayOptsBot Error');
|
||||
|
||||
Reference in New Issue
Block a user