@routr/dispatcher 2.0.5-alpha.4 → 2.0.5-alpha.8
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/processor.js +2 -2
- package/dist/run_middlewares.js +2 -2
- package/package.json +3 -3
package/dist/processor.js
CHANGED
|
@@ -33,13 +33,13 @@ function processor(params) {
|
|
|
33
33
|
return (call, callback) => {
|
|
34
34
|
const { request } = call;
|
|
35
35
|
// Messages type reponse will not be sent to middleware chain
|
|
36
|
-
if (request.message.
|
|
36
|
+
if (request.message.messageType === 'responseType') {
|
|
37
37
|
return run_processor_1.runProcessor({ callback, request, processors, connections: procConns });
|
|
38
38
|
}
|
|
39
39
|
run_middlewares_1.runMiddlewares({ callback, request, middlewares, connections: middConns })
|
|
40
40
|
.then((req) => {
|
|
41
41
|
// Since the chain was broken we need to skip the processor and return the updated request
|
|
42
|
-
if (req.message.
|
|
42
|
+
if (req.message.messageType === "responseType") {
|
|
43
43
|
logger_1.default.verbose("skipped processsing request ref " + req.ref);
|
|
44
44
|
return callback(null, req);
|
|
45
45
|
}
|
package/dist/run_middlewares.js
CHANGED
|
@@ -57,8 +57,8 @@ function runMiddlewares(params) {
|
|
|
57
57
|
// Send message and re-insert response for next middleware
|
|
58
58
|
try {
|
|
59
59
|
req.message = (yield processMessage(midd.ref, conn, req)).message;
|
|
60
|
-
if (req.message.
|
|
61
|
-
logger_1.default.verbose("found
|
|
60
|
+
if (req.message.messageType === "responseType") {
|
|
61
|
+
logger_1.default.verbose("found messageType to be responseType and broke the chain");
|
|
62
62
|
break;
|
|
63
63
|
}
|
|
64
64
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routr/dispatcher",
|
|
3
|
-
"version": "2.0.5-alpha.
|
|
3
|
+
"version": "2.0.5-alpha.8",
|
|
4
4
|
"description": "Receives SIP messages and forwards them to the corresponding Message Processor",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/routr#readme",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@grpc/grpc-js": "^1.5.9",
|
|
29
|
-
"@routr/common": "^2.0.5-alpha.
|
|
29
|
+
"@routr/common": "^2.0.5-alpha.8",
|
|
30
30
|
"ajv": "^6.12.6",
|
|
31
31
|
"fp-ts": "^2.11.8"
|
|
32
32
|
},
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"bugs": {
|
|
38
38
|
"url": "https://github.com/fonoster/routr/issues"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "e093bd9f05f7600a419f4e3d9eb41643b3682218"
|
|
41
41
|
}
|