add env JAMBONES_ESL_LISTEN_ADDRESS

This commit is contained in:
Dave Horton
2022-03-29 09:33:39 -04:00
parent aaf94006db
commit 23eae34888

View File

@@ -53,7 +53,8 @@ function installSrfLocals(srf, logger) {
/* NB: originally for testing only, but for now all jambonz deployments /* NB: originally for testing only, but for now all jambonz deployments
have freeswitch installed locally alongside this app 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; return opts;
}); });
logger.info({fsInventory}, 'freeswitch inventory'); logger.info({fsInventory}, 'freeswitch inventory');
@@ -66,7 +67,7 @@ function installSrfLocals(srf, logger) {
initMS(logger, val, ms); initMS(logger, val, ms);
} }
catch (err) { 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 // retry to connect to any that were initially offline