@routr/edgeport 2.1.11 → 2.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/edgeport.js CHANGED
@@ -25,12 +25,18 @@ function edgePort(config) {
25
25
  const sipProvider = (0, create_sip_provider_1.default)(sipStack, (0, create_listening_points_1.default)(sipStack, config));
26
26
  const externalAddrs = new ArrayList();
27
27
  const localnets = new ArrayList();
28
- // Addresses from the environment
29
- if (envs_1.EXTERNAL_ADDRS) {
28
+ if (envs_1.EXTERNAL_ADDRS.length > 0) {
30
29
  envs_1.EXTERNAL_ADDRS.forEach((addr) => externalAddrs.add(addr));
31
30
  }
32
- (_a = config.spec.externalAddrs) === null || _a === void 0 ? void 0 : _a.forEach((addr) => externalAddrs.add(addr));
33
- (_b = config.spec.localnets) === null || _b === void 0 ? void 0 : _b.forEach((net) => localnets.add(net));
31
+ else {
32
+ (_a = config.spec.externalAddrs) === null || _a === void 0 ? void 0 : _a.forEach((addr) => externalAddrs.add(addr));
33
+ }
34
+ if (envs_1.LOCALNETS.length > 0) {
35
+ envs_1.LOCALNETS.forEach((net) => localnets.add(net));
36
+ }
37
+ else {
38
+ (_b = config.spec.localnets) === null || _b === void 0 ? void 0 : _b.forEach((net) => localnets.add(net));
39
+ }
34
40
  sipProvider.addSipListener(new GRPCSipListener(sipProvider, config, externalAddrs, localnets));
35
41
  }
36
42
  exports.default = edgePort;
package/dist/envs.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export declare const EXTERNAL_ADDRS: string[];
2
+ export declare const LOCALNETS: string[];
package/dist/envs.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
- var _a, _b;
2
+ var _a, _b, _c, _d;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.EXTERNAL_ADDRS = void 0;
4
+ exports.LOCALNETS = exports.EXTERNAL_ADDRS = void 0;
5
5
  exports.EXTERNAL_ADDRS = (_b = (_a = System.getenv("EXTERNAL_ADDRS")) === null || _a === void 0 ? void 0 : _a.split(",")) !== null && _b !== void 0 ? _b : [];
6
+ exports.LOCALNETS = (_d = (_c = System.getenv("LOCALNETS")) === null || _c === void 0 ? void 0 : _c.split(",")) !== null && _d !== void 0 ? _d : [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/edgeport",
3
- "version": "2.1.11",
3
+ "version": "2.1.15",
4
4
  "description": "SIP endpoint at the edge of the network",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/routr#readme",
@@ -35,5 +35,5 @@
35
35
  "js-yaml": "^4.1.0",
36
36
  "toml": "^3.0.0"
37
37
  },
38
- "gitHead": "7c3161336c29feb497a256018a08b65c1dedd0fd"
38
+ "gitHead": "842bb5f1cc9b2c7296119ef9fd0dcf00e7064772"
39
39
  }