@routr/rtprelay 2.0.8-alpha.30 → 2.0.8-alpha.32

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/envs.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export declare const BIND_ADDR: string;
1
2
  export declare const RTPENGINE_HOST: string;
2
3
  export declare const RTPENGINE_PORT: number;
3
4
  export declare const RTPENGINE_TIMEOUT: number;
package/dist/envs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- var _a, _b;
2
+ var _a, _b, _c;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.RTPENGINE_TIMEOUT = exports.RTPENGINE_PORT = exports.RTPENGINE_HOST = void 0;
4
+ exports.RTPENGINE_TIMEOUT = exports.RTPENGINE_PORT = exports.RTPENGINE_HOST = exports.BIND_ADDR = void 0;
5
5
  /*
6
6
  * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
7
7
  * http://github.com/fonoster
@@ -22,6 +22,7 @@ exports.RTPENGINE_TIMEOUT = exports.RTPENGINE_PORT = exports.RTPENGINE_HOST = vo
22
22
  */
23
23
  const common_1 = require("@routr/common");
24
24
  common_1.Assertions.assertEnvsAreSet(["RTPENGINE_HOST"]);
25
+ exports.BIND_ADDR = (_a = process.env.BIND_ADDR) !== null && _a !== void 0 ? _a : "0.0.0.0:51903";
25
26
  exports.RTPENGINE_HOST = process.env.RTPENGINE_HOST;
26
- exports.RTPENGINE_PORT = parseInt((_a = process.env.RTPENGINE_PORT) !== null && _a !== void 0 ? _a : "22222");
27
- exports.RTPENGINE_TIMEOUT = parseInt((_b = process.env.RTPENGINE_TIMEOUT) !== null && _b !== void 0 ? _b : "5000");
27
+ exports.RTPENGINE_PORT = parseInt((_b = process.env.RTPENGINE_PORT) !== null && _b !== void 0 ? _b : "22222");
28
+ exports.RTPENGINE_TIMEOUT = parseInt((_c = process.env.RTPENGINE_TIMEOUT) !== null && _c !== void 0 ? _c : "5000");
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ /*
5
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
6
+ * http://github.com/fonoster
7
+ *
8
+ * This file is part of Routr.
9
+ *
10
+ * Licensed under the MIT License (the "License");
11
+ * you may not use this file except in compliance with
12
+ * the License. You may obtain a copy of the License at
13
+ *
14
+ * https://opensource.org/licenses/MIT
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" BASIS,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ */
22
+ const common_1 = require("@routr/common");
23
+ const envs_1 = require("./envs");
24
+ common_1.HealthCheck.check(envs_1.BIND_ADDR);
package/dist/runner.js CHANGED
@@ -32,10 +32,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  step((generator = generator.apply(thisArg, _arguments || [])).next());
33
33
  });
34
34
  };
35
- var _a;
36
35
  Object.defineProperty(exports, "__esModule", { value: true });
37
36
  /*
38
- * Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
37
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
39
38
  * http://github.com/fonoster/routr
40
39
  *
41
40
  * This file is part of Routr
@@ -64,7 +63,7 @@ const utils_1 = require("./utils");
64
63
  const logger = (0, logger_1.getLogger)({ service: "rtprelay", filePath: __filename });
65
64
  const rtpeConfig = { host: envs_1.RTPENGINE_HOST, port: envs_1.RTPENGINE_PORT };
66
65
  new processor_1.default({
67
- bindAddr: (_a = process.env.BIND_ADDR) !== null && _a !== void 0 ? _a : "0.0.0.0:51903",
66
+ bindAddr: envs_1.BIND_ADDR,
68
67
  name: "rtprelay-middleware"
69
68
  }).listen((req, res) => __awaiter(void 0, void 0, void 0, function* () {
70
69
  try {
@@ -75,13 +74,13 @@ new processor_1.default({
75
74
  ? (0, utils_1.getDirectionFromResponse)(req)
76
75
  : (0, utils_1.getDirectionFromRequest)(req);
77
76
  const sendRequest = (f) => __awaiter(void 0, void 0, void 0, function* () {
78
- var _b;
77
+ var _a;
79
78
  const r = yield f(rtpeConfig)(req);
80
79
  if (r.result === "error") {
81
80
  throw new common_1.CommonErrors.BadRequestError(r["error-reason"]);
82
81
  }
83
82
  if ((0, utils_1.callInvolvesWebRTC)(direction)) {
84
- req.message.body = (_b = r.sdp) === null || _b === void 0 ? void 0 : _b.replaceAll("a=crypto:", "a=ignore:").replaceAll("a=sendrecv", "a=sendrecv\na=rtcp-mux");
83
+ req.message.body = (_a = r.sdp) === null || _a === void 0 ? void 0 : _a.replaceAll("a=crypto:", "a=ignore:").replaceAll("a=sendrecv", "a=sendrecv\na=rtcp-mux");
85
84
  }
86
85
  else {
87
86
  req.message.body = r.sdp;
package/dist/tracer.js CHANGED
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.init = void 0;
7
7
  /*
8
- * Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
8
+ * Copyright (C) 2023 by Fonoster Inc (https://fonoster.com)
9
9
  * http://github.com/fonoster/routr
10
10
  *
11
11
  * This file is part of Routr
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/rtprelay",
3
- "version": "2.0.8-alpha.30",
3
+ "version": "2.0.8-alpha.32",
4
4
  "description": "Media Relay for Routr using RTPengine",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/routr#readme",
@@ -16,10 +16,11 @@
16
16
  "build": "tsc -b tsconfig.json"
17
17
  },
18
18
  "bin": {
19
- "run_rtprelay": "dist/runner.js"
19
+ "run_rtprelay": "dist/runner.js",
20
+ "healthcheck_rtprelay": "dist/healthcheck.js"
20
21
  },
21
22
  "dependencies": {
22
- "@fonoster/logger": "0.3.18",
23
+ "@fonoster/logger": "0.3.20",
23
24
  "@opentelemetry/api": "^1.0.4",
24
25
  "@opentelemetry/exporter-jaeger": "^1.0.4",
25
26
  "@opentelemetry/instrumentation": "^0.27.0",
@@ -28,8 +29,8 @@
28
29
  "@opentelemetry/sdk-trace-base": "^1.0.4",
29
30
  "@opentelemetry/sdk-trace-node": "^1.0.4",
30
31
  "@opentelemetry/semantic-conventions": "^1.0.4",
31
- "@routr/common": "^2.0.8-alpha.30",
32
- "@routr/processor": "^2.0.8-alpha.30",
32
+ "@routr/common": "^2.0.8-alpha.32",
33
+ "@routr/processor": "^2.0.8-alpha.32",
33
34
  "rtpengine-client": "^0.4.11"
34
35
  },
35
36
  "files": [
@@ -45,5 +46,5 @@
45
46
  "bugs": {
46
47
  "url": "https://github.com/fonoster/routr/issues"
47
48
  },
48
- "gitHead": "6466c3e5262850c85dc6d15eec3e25f915a37667"
49
+ "gitHead": "cc7a72209d40052647c76a4e47517a0ea82ae9f7"
49
50
  }