From aaf94006db650aa00231ab55a0f8a727af1872d1 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Tue, 29 Mar 2022 09:19:38 -0400 Subject: [PATCH] explicitly bind esl socket to ipv4 interface (digital ocean k8s defaults to ipv6 which causes in ECONNREFUSED from freeswitch) --- lib/utils/install-srf-locals.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/utils/install-srf-locals.js b/lib/utils/install-srf-locals.js index f9123fda..5ffb8e9c 100644 --- a/lib/utils/install-srf-locals.js +++ b/lib/utils/install-srf-locals.js @@ -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');