@routr/common 2.0.8-alpha.25 → 2.0.8-alpha.28
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/connect/connect_error.js +1 -1
- package/dist/connect/index.d.ts +1 -0
- package/dist/connect/index.js +1 -0
- package/dist/protos/processor.proto +2 -1
- package/dist/protos/sipmessage.proto +5 -0
- package/dist/types.d.ts +65 -58
- package/dist/types.js +58 -58
- package/package.json +2 -2
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.convertToErrorResponse = exports.CodeToResponseTypeMap = void 0;
|
|
4
|
-
const types_1 = require("../types");
|
|
5
4
|
/*
|
|
6
5
|
* Copyright (C) 2022 by Fonoster Inc (https://fonoster.com)
|
|
7
6
|
* http://github.com/fonoster
|
|
@@ -20,6 +19,7 @@ const types_1 = require("../types");
|
|
|
20
19
|
* See the License for the specific language governing permissions and
|
|
21
20
|
* limitations under the License.
|
|
22
21
|
*/
|
|
22
|
+
const types_1 = require("../types");
|
|
23
23
|
exports.CodeToResponseTypeMap = {
|
|
24
24
|
401: types_1.ResponseType.UNAUTHORIZED,
|
|
25
25
|
403: types_1.ResponseType.FORBIDDEN,
|
package/dist/connect/index.d.ts
CHANGED
package/dist/connect/index.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -70,6 +70,7 @@ export interface ProcessorConfig {
|
|
|
70
70
|
export interface MiddlewareConfig {
|
|
71
71
|
ref: string;
|
|
72
72
|
addr: string;
|
|
73
|
+
postProcessor: boolean;
|
|
73
74
|
}
|
|
74
75
|
export interface ServiceInfo {
|
|
75
76
|
name: string;
|
|
@@ -140,64 +141,64 @@ export interface Route {
|
|
|
140
141
|
headers?: HeaderModifier[];
|
|
141
142
|
}
|
|
142
143
|
export declare enum ResponseType {
|
|
143
|
-
UNKNOWN =
|
|
144
|
-
TRYING =
|
|
145
|
-
RINGING =
|
|
146
|
-
CALL_IS_BEING_FORWARDED =
|
|
147
|
-
QUEUED =
|
|
148
|
-
SESSION_PROGRESS =
|
|
149
|
-
SUCCESS =
|
|
150
|
-
OK =
|
|
151
|
-
ACCEPTED =
|
|
152
|
-
REDIRECTION =
|
|
153
|
-
MULTIPLE_CHOICES =
|
|
154
|
-
MOVED_PERMANENTLY =
|
|
155
|
-
MOVED_TEMPORARILY =
|
|
156
|
-
USE_PROXY =
|
|
157
|
-
ALTERNATIVE_SERVICE =
|
|
158
|
-
CLIENT_ERROR =
|
|
159
|
-
BAD_REQUEST =
|
|
160
|
-
UNAUTHORIZED =
|
|
161
|
-
PAYMENT_REQUIRED =
|
|
162
|
-
FORBIDDEN =
|
|
163
|
-
NOT_FOUND =
|
|
164
|
-
METHOD_NOT_ALLOWED =
|
|
165
|
-
NOT_ACCEPTABLE =
|
|
166
|
-
PROXY_AUTHENTICATION_REQUIRED =
|
|
167
|
-
REQUEST_TIMEOUT =
|
|
168
|
-
GONE =
|
|
169
|
-
REQUEST_ENTITY_TOO_LARGE =
|
|
170
|
-
REQUEST_URI_TOO_LONG =
|
|
171
|
-
UNSUPPORTED_MEDIA_TYPE =
|
|
172
|
-
UNSUPPORTED_URI_SCHEME =
|
|
173
|
-
BAD_EXTENSION =
|
|
174
|
-
EXTENSION_REQUIRED =
|
|
175
|
-
INTERVAL_TOO_BRIEF =
|
|
176
|
-
TEMPORARILY_UNAVAILABLE =
|
|
177
|
-
CALL_OR_TRANSACTION_DOES_NOT_EXIST =
|
|
178
|
-
LOOP_DETECTED =
|
|
179
|
-
TOO_MANY_HOPS =
|
|
180
|
-
ADDRESS_INCOMPLETE =
|
|
181
|
-
AMBIGUOUS =
|
|
182
|
-
BUSY_HERE =
|
|
183
|
-
REQUEST_TERMINATED =
|
|
184
|
-
NOT_ACCEPTABLE_HERE =
|
|
185
|
-
BAD_EVENT =
|
|
186
|
-
REQUEST_PENDING =
|
|
187
|
-
UNDECIPHERABLE =
|
|
188
|
-
SERVER_ERROR =
|
|
189
|
-
SERVER_INTERNAL_ERROR =
|
|
190
|
-
NOT_IMPLEMENTED =
|
|
191
|
-
BAD_GATEWAY =
|
|
192
|
-
SERVICE_UNAVAILABLE =
|
|
193
|
-
SERVER_TIMEOUT =
|
|
194
|
-
VERSION_NOT_SUPPORTED =
|
|
195
|
-
MESSAGE_TOO_LARGE =
|
|
196
|
-
GLOBAL_ERROR =
|
|
197
|
-
BUSY_EVERYWHERE =
|
|
198
|
-
DECLINE =
|
|
199
|
-
DOES_NOT_EXIST_ANYWHERE =
|
|
200
|
-
SESSION_NOT_ACCEPTABLE =
|
|
144
|
+
UNKNOWN = "UNKNOWN",
|
|
145
|
+
TRYING = "TRYING",
|
|
146
|
+
RINGING = "RINGING",
|
|
147
|
+
CALL_IS_BEING_FORWARDED = "CALL_IS_BEING_FORWARDED",
|
|
148
|
+
QUEUED = "QUEUED",
|
|
149
|
+
SESSION_PROGRESS = "SESSION_PROGRESS",
|
|
150
|
+
SUCCESS = "SUCCESS",
|
|
151
|
+
OK = "OK",
|
|
152
|
+
ACCEPTED = "ACCEPTED",
|
|
153
|
+
REDIRECTION = "REDIRECTION",
|
|
154
|
+
MULTIPLE_CHOICES = "MULTIPLE_CHOICES",
|
|
155
|
+
MOVED_PERMANENTLY = "MOVED_PERMANENTLY",
|
|
156
|
+
MOVED_TEMPORARILY = "MOVED_TEMPORARILY",
|
|
157
|
+
USE_PROXY = "USE_PROXY",
|
|
158
|
+
ALTERNATIVE_SERVICE = "ALTERNATIVE_SERVICE",
|
|
159
|
+
CLIENT_ERROR = "CLIENT_ERROR",
|
|
160
|
+
BAD_REQUEST = "BAD_REQUEST",
|
|
161
|
+
UNAUTHORIZED = "UNAUTHORIZED",
|
|
162
|
+
PAYMENT_REQUIRED = "PAYMENT_REQUIRED",
|
|
163
|
+
FORBIDDEN = "FORBIDDEN",
|
|
164
|
+
NOT_FOUND = "NOT_FOUND",
|
|
165
|
+
METHOD_NOT_ALLOWED = "METHOD_NOT_ALLOWED",
|
|
166
|
+
NOT_ACCEPTABLE = "NOT_ACCEPTABLE",
|
|
167
|
+
PROXY_AUTHENTICATION_REQUIRED = "PROXY_AUTHENTICATION_REQUIRED",
|
|
168
|
+
REQUEST_TIMEOUT = "REQUEST_TIMEOUT",
|
|
169
|
+
GONE = "GONE",
|
|
170
|
+
REQUEST_ENTITY_TOO_LARGE = "REQUEST_ENTITY_TOO_LARGE",
|
|
171
|
+
REQUEST_URI_TOO_LONG = "REQUEST_URI_TOO_LONG",
|
|
172
|
+
UNSUPPORTED_MEDIA_TYPE = "UNSUPPORTED_MEDIA_TYPE",
|
|
173
|
+
UNSUPPORTED_URI_SCHEME = "UNSUPPORTED_URI_SCHEME",
|
|
174
|
+
BAD_EXTENSION = "BAD_EXTENSION",
|
|
175
|
+
EXTENSION_REQUIRED = "EXTENSION_REQUIRED",
|
|
176
|
+
INTERVAL_TOO_BRIEF = "INTERVAL_TOO_BRIEF",
|
|
177
|
+
TEMPORARILY_UNAVAILABLE = "TEMPORARILY_UNAVAILABLE",
|
|
178
|
+
CALL_OR_TRANSACTION_DOES_NOT_EXIST = "CALL_OR_TRANSACTION_DOES_NOT_EXIST",
|
|
179
|
+
LOOP_DETECTED = "LOOP_DETECTED",
|
|
180
|
+
TOO_MANY_HOPS = "TOO_MANY_HOPS",
|
|
181
|
+
ADDRESS_INCOMPLETE = "ADDRESS_INCOMPLETE",
|
|
182
|
+
AMBIGUOUS = "AMBIGUOUS",
|
|
183
|
+
BUSY_HERE = "BUSY_HERE",
|
|
184
|
+
REQUEST_TERMINATED = "REQUEST_TERMINATED",
|
|
185
|
+
NOT_ACCEPTABLE_HERE = "NOT_ACCEPTABLE_HERE",
|
|
186
|
+
BAD_EVENT = "BAD_EVENT",
|
|
187
|
+
REQUEST_PENDING = "REQUEST_PENDING",
|
|
188
|
+
UNDECIPHERABLE = "UNDECIPHERABLE",
|
|
189
|
+
SERVER_ERROR = "SERVER_ERROR",
|
|
190
|
+
SERVER_INTERNAL_ERROR = "SERVER_INTERNAL_ERROR",
|
|
191
|
+
NOT_IMPLEMENTED = "NOT_IMPLEMENTED",
|
|
192
|
+
BAD_GATEWAY = "BAD_GATEWAY",
|
|
193
|
+
SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE",
|
|
194
|
+
SERVER_TIMEOUT = "SERVER_TIMEOUT",
|
|
195
|
+
VERSION_NOT_SUPPORTED = "VERSION_NOT_SUPPORTED",
|
|
196
|
+
MESSAGE_TOO_LARGE = "MESSAGE_TOO_LARGE",
|
|
197
|
+
GLOBAL_ERROR = "GLOBAL_ERROR",
|
|
198
|
+
BUSY_EVERYWHERE = "BUSY_EVERYWHERE",
|
|
199
|
+
DECLINE = "DECLINE",
|
|
200
|
+
DOES_NOT_EXIST_ANYWHERE = "DOES_NOT_EXIST_ANYWHERE",
|
|
201
|
+
SESSION_NOT_ACCEPTABLE = "SESSION_NOT_ACCEPTABLE"
|
|
201
202
|
}
|
|
202
203
|
export interface WWWAuthenticate {
|
|
203
204
|
realm: string;
|
|
@@ -238,6 +239,11 @@ export interface Via {
|
|
|
238
239
|
port: number;
|
|
239
240
|
branch?: string;
|
|
240
241
|
transport: Transport;
|
|
242
|
+
received?: string;
|
|
243
|
+
rPortFlag?: boolean;
|
|
244
|
+
rPort?: number;
|
|
245
|
+
ttl?: number;
|
|
246
|
+
mAddr?: string;
|
|
241
247
|
}
|
|
242
248
|
export interface SipURI {
|
|
243
249
|
user?: string;
|
|
@@ -307,6 +313,7 @@ export interface SIPMessage {
|
|
|
307
313
|
via: Via[];
|
|
308
314
|
route: RouteHeader[];
|
|
309
315
|
recordRoute: RecordRoute[];
|
|
316
|
+
body?: string;
|
|
310
317
|
}
|
|
311
318
|
export interface GrpcCallback {
|
|
312
319
|
(error: Error | {
|
package/dist/types.js
CHANGED
|
@@ -51,64 +51,64 @@ var HeaderModifierAction;
|
|
|
51
51
|
})(HeaderModifierAction = exports.HeaderModifierAction || (exports.HeaderModifierAction = {}));
|
|
52
52
|
var ResponseType;
|
|
53
53
|
(function (ResponseType) {
|
|
54
|
-
ResponseType[
|
|
55
|
-
ResponseType[
|
|
56
|
-
ResponseType[
|
|
57
|
-
ResponseType[
|
|
58
|
-
ResponseType[
|
|
59
|
-
ResponseType[
|
|
60
|
-
ResponseType[
|
|
61
|
-
ResponseType[
|
|
62
|
-
ResponseType[
|
|
63
|
-
ResponseType[
|
|
64
|
-
ResponseType[
|
|
65
|
-
ResponseType[
|
|
66
|
-
ResponseType[
|
|
67
|
-
ResponseType[
|
|
68
|
-
ResponseType[
|
|
69
|
-
ResponseType[
|
|
70
|
-
ResponseType[
|
|
71
|
-
ResponseType[
|
|
72
|
-
ResponseType[
|
|
73
|
-
ResponseType[
|
|
74
|
-
ResponseType[
|
|
75
|
-
ResponseType[
|
|
76
|
-
ResponseType[
|
|
77
|
-
ResponseType[
|
|
78
|
-
ResponseType[
|
|
79
|
-
ResponseType[
|
|
80
|
-
ResponseType[
|
|
81
|
-
ResponseType[
|
|
82
|
-
ResponseType[
|
|
83
|
-
ResponseType[
|
|
84
|
-
ResponseType[
|
|
85
|
-
ResponseType[
|
|
86
|
-
ResponseType[
|
|
87
|
-
ResponseType[
|
|
88
|
-
ResponseType[
|
|
89
|
-
ResponseType[
|
|
90
|
-
ResponseType[
|
|
91
|
-
ResponseType[
|
|
92
|
-
ResponseType[
|
|
93
|
-
ResponseType[
|
|
94
|
-
ResponseType[
|
|
95
|
-
ResponseType[
|
|
96
|
-
ResponseType[
|
|
97
|
-
ResponseType[
|
|
98
|
-
ResponseType[
|
|
99
|
-
ResponseType[
|
|
100
|
-
ResponseType[
|
|
101
|
-
ResponseType[
|
|
102
|
-
ResponseType[
|
|
103
|
-
ResponseType[
|
|
104
|
-
ResponseType[
|
|
105
|
-
ResponseType[
|
|
106
|
-
ResponseType[
|
|
107
|
-
ResponseType[
|
|
108
|
-
ResponseType[
|
|
109
|
-
ResponseType[
|
|
110
|
-
ResponseType[
|
|
111
|
-
ResponseType[
|
|
54
|
+
ResponseType["UNKNOWN"] = "UNKNOWN";
|
|
55
|
+
ResponseType["TRYING"] = "TRYING";
|
|
56
|
+
ResponseType["RINGING"] = "RINGING";
|
|
57
|
+
ResponseType["CALL_IS_BEING_FORWARDED"] = "CALL_IS_BEING_FORWARDED";
|
|
58
|
+
ResponseType["QUEUED"] = "QUEUED";
|
|
59
|
+
ResponseType["SESSION_PROGRESS"] = "SESSION_PROGRESS";
|
|
60
|
+
ResponseType["SUCCESS"] = "SUCCESS";
|
|
61
|
+
ResponseType["OK"] = "OK";
|
|
62
|
+
ResponseType["ACCEPTED"] = "ACCEPTED";
|
|
63
|
+
ResponseType["REDIRECTION"] = "REDIRECTION";
|
|
64
|
+
ResponseType["MULTIPLE_CHOICES"] = "MULTIPLE_CHOICES";
|
|
65
|
+
ResponseType["MOVED_PERMANENTLY"] = "MOVED_PERMANENTLY";
|
|
66
|
+
ResponseType["MOVED_TEMPORARILY"] = "MOVED_TEMPORARILY";
|
|
67
|
+
ResponseType["USE_PROXY"] = "USE_PROXY";
|
|
68
|
+
ResponseType["ALTERNATIVE_SERVICE"] = "ALTERNATIVE_SERVICE";
|
|
69
|
+
ResponseType["CLIENT_ERROR"] = "CLIENT_ERROR";
|
|
70
|
+
ResponseType["BAD_REQUEST"] = "BAD_REQUEST";
|
|
71
|
+
ResponseType["UNAUTHORIZED"] = "UNAUTHORIZED";
|
|
72
|
+
ResponseType["PAYMENT_REQUIRED"] = "PAYMENT_REQUIRED";
|
|
73
|
+
ResponseType["FORBIDDEN"] = "FORBIDDEN";
|
|
74
|
+
ResponseType["NOT_FOUND"] = "NOT_FOUND";
|
|
75
|
+
ResponseType["METHOD_NOT_ALLOWED"] = "METHOD_NOT_ALLOWED";
|
|
76
|
+
ResponseType["NOT_ACCEPTABLE"] = "NOT_ACCEPTABLE";
|
|
77
|
+
ResponseType["PROXY_AUTHENTICATION_REQUIRED"] = "PROXY_AUTHENTICATION_REQUIRED";
|
|
78
|
+
ResponseType["REQUEST_TIMEOUT"] = "REQUEST_TIMEOUT";
|
|
79
|
+
ResponseType["GONE"] = "GONE";
|
|
80
|
+
ResponseType["REQUEST_ENTITY_TOO_LARGE"] = "REQUEST_ENTITY_TOO_LARGE";
|
|
81
|
+
ResponseType["REQUEST_URI_TOO_LONG"] = "REQUEST_URI_TOO_LONG";
|
|
82
|
+
ResponseType["UNSUPPORTED_MEDIA_TYPE"] = "UNSUPPORTED_MEDIA_TYPE";
|
|
83
|
+
ResponseType["UNSUPPORTED_URI_SCHEME"] = "UNSUPPORTED_URI_SCHEME";
|
|
84
|
+
ResponseType["BAD_EXTENSION"] = "BAD_EXTENSION";
|
|
85
|
+
ResponseType["EXTENSION_REQUIRED"] = "EXTENSION_REQUIRED";
|
|
86
|
+
ResponseType["INTERVAL_TOO_BRIEF"] = "INTERVAL_TOO_BRIEF";
|
|
87
|
+
ResponseType["TEMPORARILY_UNAVAILABLE"] = "TEMPORARILY_UNAVAILABLE";
|
|
88
|
+
ResponseType["CALL_OR_TRANSACTION_DOES_NOT_EXIST"] = "CALL_OR_TRANSACTION_DOES_NOT_EXIST";
|
|
89
|
+
ResponseType["LOOP_DETECTED"] = "LOOP_DETECTED";
|
|
90
|
+
ResponseType["TOO_MANY_HOPS"] = "TOO_MANY_HOPS";
|
|
91
|
+
ResponseType["ADDRESS_INCOMPLETE"] = "ADDRESS_INCOMPLETE";
|
|
92
|
+
ResponseType["AMBIGUOUS"] = "AMBIGUOUS";
|
|
93
|
+
ResponseType["BUSY_HERE"] = "BUSY_HERE";
|
|
94
|
+
ResponseType["REQUEST_TERMINATED"] = "REQUEST_TERMINATED";
|
|
95
|
+
ResponseType["NOT_ACCEPTABLE_HERE"] = "NOT_ACCEPTABLE_HERE";
|
|
96
|
+
ResponseType["BAD_EVENT"] = "BAD_EVENT";
|
|
97
|
+
ResponseType["REQUEST_PENDING"] = "REQUEST_PENDING";
|
|
98
|
+
ResponseType["UNDECIPHERABLE"] = "UNDECIPHERABLE";
|
|
99
|
+
ResponseType["SERVER_ERROR"] = "SERVER_ERROR";
|
|
100
|
+
ResponseType["SERVER_INTERNAL_ERROR"] = "SERVER_INTERNAL_ERROR";
|
|
101
|
+
ResponseType["NOT_IMPLEMENTED"] = "NOT_IMPLEMENTED";
|
|
102
|
+
ResponseType["BAD_GATEWAY"] = "BAD_GATEWAY";
|
|
103
|
+
ResponseType["SERVICE_UNAVAILABLE"] = "SERVICE_UNAVAILABLE";
|
|
104
|
+
ResponseType["SERVER_TIMEOUT"] = "SERVER_TIMEOUT";
|
|
105
|
+
ResponseType["VERSION_NOT_SUPPORTED"] = "VERSION_NOT_SUPPORTED";
|
|
106
|
+
ResponseType["MESSAGE_TOO_LARGE"] = "MESSAGE_TOO_LARGE";
|
|
107
|
+
ResponseType["GLOBAL_ERROR"] = "GLOBAL_ERROR";
|
|
108
|
+
ResponseType["BUSY_EVERYWHERE"] = "BUSY_EVERYWHERE";
|
|
109
|
+
ResponseType["DECLINE"] = "DECLINE";
|
|
110
|
+
ResponseType["DOES_NOT_EXIST_ANYWHERE"] = "DOES_NOT_EXIST_ANYWHERE";
|
|
111
|
+
ResponseType["SESSION_NOT_ACCEPTABLE"] = "SESSION_NOT_ACCEPTABLE";
|
|
112
112
|
})(ResponseType = exports.ResponseType || (exports.ResponseType = {}));
|
|
113
113
|
var MessageType;
|
|
114
114
|
(function (MessageType) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@routr/common",
|
|
3
|
-
"version": "2.0.8-alpha.
|
|
3
|
+
"version": "2.0.8-alpha.28",
|
|
4
4
|
"description": "Common package",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/routr#readme",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/js-yaml": "^4.0.5"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "d28aabb2fce0600aaae94aa37709e89ed7112c99"
|
|
57
57
|
}
|