@fonoster/sipnet 0.8.36 → 0.8.40
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.
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.convertToFonosterNumber = convertToFonosterNumber;
|
|
4
|
-
|
|
4
|
+
/*
|
|
5
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
6
|
+
* http://github.com/fonoster/fonoster
|
|
7
|
+
*
|
|
8
|
+
* This file is part of Fonoster
|
|
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("@fonoster/common");
|
|
5
23
|
function convertToFonosterNumber(number) {
|
|
6
24
|
var _a, _b;
|
|
7
|
-
const appRef = (_b = (_a = number.extraHeaders) === null || _a === void 0 ? void 0 : _a.find((header) => header.name ===
|
|
25
|
+
const appRef = (_b = (_a = number.extraHeaders) === null || _a === void 0 ? void 0 : _a.find((header) => header.name === common_1.APP_REF_HEADER)) === null || _b === void 0 ? void 0 : _b.value;
|
|
8
26
|
return {
|
|
9
27
|
ref: number.ref,
|
|
10
28
|
name: number.name,
|
|
@@ -2,9 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.convertToRoutrNumber = convertToRoutrNumber;
|
|
4
4
|
exports.convertToRoutrNumberUpdate = convertToRoutrNumberUpdate;
|
|
5
|
-
|
|
5
|
+
/*
|
|
6
|
+
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
7
|
+
* http://github.com/fonoster/fonoster
|
|
8
|
+
*
|
|
9
|
+
* This file is part of Fonoster
|
|
10
|
+
*
|
|
11
|
+
* Licensed under the MIT License (the "License");
|
|
12
|
+
* you may not use this file except in compliance with
|
|
13
|
+
* the License. You may obtain a copy of the License at
|
|
14
|
+
*
|
|
15
|
+
* https://opensource.org/licenses/MIT
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
+
* See the License for the specific language governing permissions and
|
|
21
|
+
* limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
const common_1 = require("@fonoster/common");
|
|
6
24
|
function convertToRoutrNumber(number, accessKeyId) {
|
|
7
|
-
const aorLink = number.appRef ?
|
|
25
|
+
const aorLink = number.appRef ? common_1.ROUTR_DEFAULT_PEER_AOR : number.agentAor;
|
|
8
26
|
return {
|
|
9
27
|
name: number.name,
|
|
10
28
|
telUrl: number.telUrl,
|
|
@@ -15,7 +33,7 @@ function convertToRoutrNumber(number, accessKeyId) {
|
|
|
15
33
|
extraHeaders: number.appRef
|
|
16
34
|
? [
|
|
17
35
|
{
|
|
18
|
-
name:
|
|
36
|
+
name: common_1.APP_REF_HEADER,
|
|
19
37
|
value: number.appRef
|
|
20
38
|
}
|
|
21
39
|
]
|
|
@@ -28,9 +46,9 @@ function convertToRoutrNumberUpdate(number) {
|
|
|
28
46
|
let aorLink;
|
|
29
47
|
let extraHeaders = [];
|
|
30
48
|
if (number.appRef) {
|
|
31
|
-
aorLink =
|
|
49
|
+
aorLink = common_1.ROUTR_DEFAULT_PEER_AOR;
|
|
32
50
|
extraHeaders.push({
|
|
33
|
-
name:
|
|
51
|
+
name: common_1.APP_REF_HEADER,
|
|
34
52
|
value: number.appRef
|
|
35
53
|
});
|
|
36
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/sipnet",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.40",
|
|
4
4
|
"description": "Routr-based SIP stack",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"fonoster": "./dist/index.js"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@fonoster/common": "^0.8.
|
|
24
|
-
"@fonoster/identity": "^0.8.
|
|
25
|
-
"@fonoster/logger": "^0.8.
|
|
26
|
-
"@fonoster/types": "^0.8.
|
|
23
|
+
"@fonoster/common": "^0.8.40",
|
|
24
|
+
"@fonoster/identity": "^0.8.40",
|
|
25
|
+
"@fonoster/logger": "^0.8.40",
|
|
26
|
+
"@fonoster/types": "^0.8.40",
|
|
27
27
|
"@grpc/grpc-js": "~1.10.6",
|
|
28
28
|
"@routr/sdk": "2.13.1",
|
|
29
29
|
"zod": "^3.23.8"
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"bugs": {
|
|
42
42
|
"url": "https://github.com/fonoster/fonoster/issues"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "2bbf3dadb6e1e178c4eefdeb4291a2e05eef0f2b"
|
|
45
45
|
}
|
package/dist/constants.d.ts
DELETED
package/dist/constants.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ROUTR_DEFAULT_PEER_AOR = exports.APP_REF_HEADER = void 0;
|
|
4
|
-
/*
|
|
5
|
-
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
6
|
-
* http://github.com/fonoster/fonoster
|
|
7
|
-
*
|
|
8
|
-
* This file is part of Fonoster
|
|
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 APP_REF_HEADER = "x-app-ref";
|
|
23
|
-
exports.APP_REF_HEADER = APP_REF_HEADER;
|
|
24
|
-
const ROUTR_DEFAULT_PEER_AOR = "sip:voice@default";
|
|
25
|
-
exports.ROUTR_DEFAULT_PEER_AOR = ROUTR_DEFAULT_PEER_AOR;
|