@routr/processor 2.3.0 → 2.4.1
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/extensions.js +1 -1
- package/dist/helper.js +1 -1
- package/dist/processor.js +1 -1
- package/dist/response.d.ts +14 -0
- package/dist/response.js +21 -1
- package/dist/tracer.js +1 -1
- package/package.json +3 -3
package/dist/extensions.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.removeHeader = exports.addHeader = exports.updateHeader = exports.getHea
|
|
|
7
7
|
*
|
|
8
8
|
* This file is part of Routr
|
|
9
9
|
*
|
|
10
|
-
* Licensed under the MIT License (the "License")
|
|
10
|
+
* Licensed under the MIT License (the "License");
|
|
11
11
|
* you may not use this file except in compliance with
|
|
12
12
|
* the License. You may obtain a copy of the License at
|
|
13
13
|
*
|
package/dist/helper.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.isBye = exports.isOkOrRingingWithSDP = exports.isInviteOrAckWithSDP = ex
|
|
|
7
7
|
*
|
|
8
8
|
* This file is part of Routr
|
|
9
9
|
*
|
|
10
|
-
* Licensed under the MIT License (the "License")
|
|
10
|
+
* Licensed under the MIT License (the "License");
|
|
11
11
|
* you may not use this file except in compliance with
|
|
12
12
|
* the License. You may obtain a copy of the License at
|
|
13
13
|
*
|
package/dist/processor.js
CHANGED
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
*
|
|
10
10
|
* This file is part of Routr
|
|
11
11
|
*
|
|
12
|
-
* Licensed under the MIT License (the "License")
|
|
12
|
+
* Licensed under the MIT License (the "License");
|
|
13
13
|
* you may not use this file except in compliance with
|
|
14
14
|
* the License. You may obtain a copy of the License at
|
|
15
15
|
*
|
package/dist/response.d.ts
CHANGED
|
@@ -19,6 +19,16 @@ export default class Response {
|
|
|
19
19
|
name: string;
|
|
20
20
|
value: string;
|
|
21
21
|
}>): void;
|
|
22
|
+
/**
|
|
23
|
+
* Sends a register ok response.
|
|
24
|
+
*
|
|
25
|
+
* @param {MessageRequest} request - The request message.
|
|
26
|
+
* @param {object[]} extraHeaders - Optional extra headers to be sent.
|
|
27
|
+
*/
|
|
28
|
+
sendRegisterOk(request: MessageRequest, extraHeaders?: Array<{
|
|
29
|
+
name: string;
|
|
30
|
+
value: string;
|
|
31
|
+
}>): void;
|
|
22
32
|
/**
|
|
23
33
|
* Sends a method not allowed response.
|
|
24
34
|
*/
|
|
@@ -27,6 +37,10 @@ export default class Response {
|
|
|
27
37
|
* Sends a not found response.
|
|
28
38
|
*/
|
|
29
39
|
sendNotFound(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Sends a temporary unavailable response.
|
|
42
|
+
*/
|
|
43
|
+
sendTemporaryUnavailable(): void;
|
|
30
44
|
/**
|
|
31
45
|
* Sends a not implemented response.
|
|
32
46
|
*/
|
package/dist/response.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
*
|
|
7
7
|
* This file is part of Routr
|
|
8
8
|
*
|
|
9
|
-
* Licensed under the MIT License (the "License")
|
|
9
|
+
* Licensed under the MIT License (the "License");
|
|
10
10
|
* you may not use this file except in compliance with
|
|
11
11
|
* the License. You may obtain a copy of the License at
|
|
12
12
|
*
|
|
@@ -48,6 +48,17 @@ class Response {
|
|
|
48
48
|
sendOk(extraHeaders) {
|
|
49
49
|
this.callback(null, buildResponse({ code: common_1.CommonTypes.ResponseType.OK, extraHeaders }));
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Sends a register ok response.
|
|
53
|
+
*
|
|
54
|
+
* @param {MessageRequest} request - The request message.
|
|
55
|
+
* @param {object[]} extraHeaders - Optional extra headers to be sent.
|
|
56
|
+
*/
|
|
57
|
+
sendRegisterOk(request, extraHeaders) {
|
|
58
|
+
this.callback(null, {
|
|
59
|
+
message: Object.assign(Object.assign({}, buildResponse({ code: common_1.CommonTypes.ResponseType.OK, extraHeaders }).message), { contact: request.message.contact })
|
|
60
|
+
});
|
|
61
|
+
}
|
|
51
62
|
/**
|
|
52
63
|
* Sends a method not allowed response.
|
|
53
64
|
*/
|
|
@@ -66,6 +77,15 @@ class Response {
|
|
|
66
77
|
reasonPhrase: "Not Found"
|
|
67
78
|
}));
|
|
68
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Sends a temporary unavailable response.
|
|
82
|
+
*/
|
|
83
|
+
sendTemporaryUnavailable() {
|
|
84
|
+
this.callback(null, buildResponse({
|
|
85
|
+
code: common_1.CommonTypes.ResponseType.TEMPORARILY_UNAVAILABLE,
|
|
86
|
+
reasonPhrase: "Temporarily Unavailable"
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
69
89
|
/**
|
|
70
90
|
* Sends a not implemented response.
|
|
71
91
|
*/
|
package/dist/tracer.js
CHANGED
|
@@ -10,7 +10,7 @@ exports.init = void 0;
|
|
|
10
10
|
*
|
|
11
11
|
* This file is part of Routr
|
|
12
12
|
*
|
|
13
|
-
* Licensed under the MIT License (the "License")
|
|
13
|
+
* Licensed under the MIT License (the "License");
|
|
14
14
|
* you may not use this file except in compliance with
|
|
15
15
|
* the License. You may obtain a copy of the License at
|
|
16
16
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routr/processor",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "Processor server and API",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/routr#readme",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@opentelemetry/sdk-trace-base": "^1.0.4",
|
|
24
24
|
"@opentelemetry/sdk-trace-node": "^1.0.4",
|
|
25
25
|
"@opentelemetry/semantic-conventions": "^1.0.4",
|
|
26
|
-
"@routr/common": "^2.
|
|
26
|
+
"@routr/common": "^2.4.1",
|
|
27
27
|
"fp-ts": "^2.11.8",
|
|
28
28
|
"phone": "^3.1.32"
|
|
29
29
|
},
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"bugs": {
|
|
45
45
|
"url": "https://github.com/fonoster/routr/issues"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "3897ad320d98a0d17ca7dd552fc0ca7c5a84368d"
|
|
48
48
|
}
|