explicitly bind esl socket to ipv4 interface (digital ocean k8s defaults to ipv6 which causes in ECONNREFUSED from freeswitch)

This commit is contained in:
Dave Horton
2022-03-29 09:19:38 -04:00
parent 86b030db93
commit aaf94006db

View File

@@ -50,7 +50,10 @@ function installSrfLocals(srf, logger) {
assert.ok(arr, `Invalid syntax JAMBONES_FREESWITCH: ${process.env.JAMBONES_FREESWITCH}`);
const opts = {address: arr[1], port: arr[2], secret: arr[3]};
if (arr.length > 4) opts.advertisedAddress = arr[4];
if (process.env.NODE_ENV === 'test') opts.listenAddress = '0.0.0.0';
/* 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';
return opts;
});
logger.info({fsInventory}, 'freeswitch inventory');