From 23eae3488824473ca8834c86fcea61596986084e Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Tue, 29 Mar 2022 09:33:39 -0400 Subject: [PATCH] add env JAMBONES_ESL_LISTEN_ADDRESS --- lib/utils/install-srf-locals.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/utils/install-srf-locals.js b/lib/utils/install-srf-locals.js index 5ffb8e9c..231785f7 100644 --- a/lib/utils/install-srf-locals.js +++ b/lib/utils/install-srf-locals.js @@ -53,7 +53,8 @@ function installSrfLocals(srf, logger) { /* NB: originally for testing only, but for now all jambonz deployments have freeswitch installed locally alongside this app */ - /*if (process.env.NODE_ENV === 'test') */opts.listenAddress = '0.0.0.0'; + if (process.env.NODE_ENV === 'test') opts.listenAddress = '0.0.0.0'; + else if (process.env.JAMBONES_ESL_LISTEN_ADDRESS) opts.listenAddress = process.env.JAMBONES_ESL_LISTEN_ADDRESS; return opts; }); logger.info({fsInventory}, 'freeswitch inventory'); @@ -66,7 +67,7 @@ function installSrfLocals(srf, logger) { initMS(logger, val, ms); } catch (err) { - logger.info({err}, `failed connecting to freeswitch at ${fs.address}, will retry shortly`); + logger.info({err}, `failed connecting to freeswitch at ${fs.address}, will retry shortly: ${err.message}`); } } // retry to connect to any that were initially offline