@routr/connect 2.15.0 → 2.15.2
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/handlers/register.js +2 -1
- package/dist/handlers/request.js +13 -1
- package/dist/runner.js +1 -1
- package/dist/tracer.d.ts +1 -7
- package/dist/tracer.js +4 -32
- package/package.json +5 -13
|
@@ -71,6 +71,7 @@ const logger = (0, logger_1.getLogger)({ service: "connect", filePath: __filenam
|
|
|
71
71
|
const jwtVerifier = (0, utils_1.getVerifierImpl)();
|
|
72
72
|
const handleRegister = (apiClient, location) => {
|
|
73
73
|
return (request, res) => __awaiter(void 0, void 0, void 0, function* () {
|
|
74
|
+
var _a;
|
|
74
75
|
// Calculate and return challenge
|
|
75
76
|
if (request.message.authorization) {
|
|
76
77
|
const auth = Object.assign({}, request.message.authorization);
|
|
@@ -118,7 +119,7 @@ const handleRegister = (apiClient, location) => {
|
|
|
118
119
|
yield location.addRoute({
|
|
119
120
|
aor: payload.aor,
|
|
120
121
|
route: location_1.Helper.createRoute(request),
|
|
121
|
-
maxContacts: payload.maxContacts
|
|
122
|
+
maxContacts: (_a = payload.maxContacts) !== null && _a !== void 0 ? _a : -1
|
|
122
123
|
});
|
|
123
124
|
res.sendRegisterOk(request);
|
|
124
125
|
}
|
package/dist/handlers/request.js
CHANGED
|
@@ -76,7 +76,19 @@ const handleRequest = (location, apiClient) => (request, res) => __awaiter(void
|
|
|
76
76
|
try {
|
|
77
77
|
const req = common_1.Environment.ENFORCE_E164 ? enforceE164(request) : request;
|
|
78
78
|
let route;
|
|
79
|
-
|
|
79
|
+
// A CANCEL must follow the exact path its INVITE took (RFC 3261 §9.1) — it is
|
|
80
|
+
// never a new call to route. edgeport already forwards it correctly, straight
|
|
81
|
+
// from the INVITE's own client transaction (GRPCSipListener#sendCancel), which
|
|
82
|
+
// does not use the route this handler computes for CANCEL at all; it only needs
|
|
83
|
+
// a non-error response to reach that logic. Routing it fresh through
|
|
84
|
+
// peerToPSTN/agentToPSTN re-applies checks meant for a NEW call — chiefly
|
|
85
|
+
// peerToPSTN's required X-DOD-Number header, which Asterisk's CANCEL does not
|
|
86
|
+
// carry (only the original INVITE does) — and rejects it with a 400 that never
|
|
87
|
+
// reaches edgeport's already-correct CANCEL handling. The result: the CANCEL is
|
|
88
|
+
// silently dropped, the call keeps ringing, and if the callee answers a moment
|
|
89
|
+
// later they connect into a line the caller has already abandoned.
|
|
90
|
+
if (processor_1.Extensions.getHeaderValue(req, common_1.CommonTypes.ExtraHeader.EDGEPORT_REF) ||
|
|
91
|
+
req.method === common_1.CommonTypes.Method.CANCEL) {
|
|
80
92
|
route = location_1.Helper.createRouteFromLastMessage(req);
|
|
81
93
|
}
|
|
82
94
|
else {
|
package/dist/runner.js
CHANGED
|
@@ -23,7 +23,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
* limitations under the License.
|
|
24
24
|
*/
|
|
25
25
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
26
|
-
require("./tracer").init("
|
|
26
|
+
require("./tracer").init("connect");
|
|
27
27
|
const common_1 = require("@routr/common");
|
|
28
28
|
const envs_1 = require("./envs");
|
|
29
29
|
const service_1 = __importDefault(require("./service"));
|
package/dist/tracer.d.ts
CHANGED
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* This function registers the instrumentations for the service.
|
|
3
|
-
*
|
|
4
|
-
* @param {string} serviceName - The name of the service.
|
|
5
|
-
* @return {Tracer} The tracer object.
|
|
6
|
-
*/
|
|
7
|
-
export declare function init(serviceName: string): import("@opentelemetry/api").Tracer;
|
|
1
|
+
export { init } from "@routr/common/dist/tracer";
|
package/dist/tracer.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.init =
|
|
3
|
+
exports.init = void 0;
|
|
7
4
|
/*
|
|
8
5
|
* Copyright (C) 2026 by Fonoster Inc (https://fonoster.com)
|
|
9
6
|
* http://github.com/fonoster/routr
|
|
@@ -22,31 +19,6 @@ exports.init = init;
|
|
|
22
19
|
* See the License for the specific language governing permissions and
|
|
23
20
|
* limitations under the License.
|
|
24
21
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const resources_1 = require("@opentelemetry/resources");
|
|
29
|
-
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
|
|
30
|
-
const sdk_trace_base_1 = require("@opentelemetry/sdk-trace-base");
|
|
31
|
-
const exporter_jaeger_1 = require("@opentelemetry/exporter-jaeger");
|
|
32
|
-
const instrumentation_grpc_1 = require("@opentelemetry/instrumentation-grpc");
|
|
33
|
-
/**
|
|
34
|
-
* This function registers the instrumentations for the service.
|
|
35
|
-
*
|
|
36
|
-
* @param {string} serviceName - The name of the service.
|
|
37
|
-
* @return {Tracer} The tracer object.
|
|
38
|
-
*/
|
|
39
|
-
function init(serviceName) {
|
|
40
|
-
const provider = new sdk_trace_node_1.NodeTracerProvider({
|
|
41
|
-
resource: new resources_1.Resource({
|
|
42
|
-
[semantic_conventions_1.SemanticResourceAttributes.SERVICE_NAME]: serviceName
|
|
43
|
-
})
|
|
44
|
-
});
|
|
45
|
-
const exporter = new exporter_jaeger_1.JaegerExporter();
|
|
46
|
-
provider.addSpanProcessor(new sdk_trace_base_1.SimpleSpanProcessor(exporter));
|
|
47
|
-
provider.register();
|
|
48
|
-
(0, instrumentation_1.registerInstrumentations)({
|
|
49
|
-
instrumentations: [new instrumentation_grpc_1.GrpcInstrumentation()]
|
|
50
|
-
});
|
|
51
|
-
return api_1.default.trace.getTracer("routr-tracer");
|
|
52
|
-
}
|
|
22
|
+
// The shared tracer, imported on its own so @grpc/grpc-js is not loaded before it.
|
|
23
|
+
var tracer_1 = require("@routr/common/dist/tracer");
|
|
24
|
+
Object.defineProperty(exports, "init", { enumerable: true, get: function () { return tracer_1.init; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routr/connect",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.2",
|
|
4
4
|
"description": "Default processor",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/routr#readme",
|
|
@@ -20,17 +20,9 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@fonoster/logger": "0.6.0",
|
|
23
|
-
"@
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
26
|
-
"@opentelemetry/instrumentation-grpc": "^0.27.0",
|
|
27
|
-
"@opentelemetry/resources": "^1.0.4",
|
|
28
|
-
"@opentelemetry/sdk-trace-base": "^1.0.4",
|
|
29
|
-
"@opentelemetry/sdk-trace-node": "^1.0.4",
|
|
30
|
-
"@opentelemetry/semantic-conventions": "^1.0.4",
|
|
31
|
-
"@routr/common": "^2.15.0",
|
|
32
|
-
"@routr/location": "^2.15.0",
|
|
33
|
-
"@routr/processor": "^2.15.0",
|
|
23
|
+
"@routr/common": "^2.15.2",
|
|
24
|
+
"@routr/location": "^2.15.2",
|
|
25
|
+
"@routr/processor": "^2.15.2",
|
|
34
26
|
"jsonwebtoken": "^9.0.3"
|
|
35
27
|
},
|
|
36
28
|
"devDependencies": {
|
|
@@ -49,5 +41,5 @@
|
|
|
49
41
|
"bugs": {
|
|
50
42
|
"url": "https://github.com/fonoster/routr/issues"
|
|
51
43
|
},
|
|
52
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "012332304537f623d017dffdf4911910fb27c0e0"
|
|
53
45
|
}
|