@unboundcx/sdk-internal 1.0.9 → 1.0.10
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/package.json +1 -1
- package/services/sip.js +11 -10
package/package.json
CHANGED
package/services/sip.js
CHANGED
|
@@ -3,7 +3,7 @@ export class InternalSipService {
|
|
|
3
3
|
this.sdk = sdk;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
async router(to, from, callId, auth, peerDirection) {
|
|
6
|
+
async router(to, from, callId, auth, peerDirection, contact) {
|
|
7
7
|
this.sdk.validateParams(
|
|
8
8
|
{ to, from, callId, auth, peerDirection },
|
|
9
9
|
{
|
|
@@ -12,11 +12,12 @@ export class InternalSipService {
|
|
|
12
12
|
callId: { type: 'string', required: false },
|
|
13
13
|
auth: { type: 'object', required: false },
|
|
14
14
|
peerDirection: { type: 'string', required: false },
|
|
15
|
+
contact: { type: 'string', required: false },
|
|
15
16
|
},
|
|
16
17
|
);
|
|
17
18
|
|
|
18
19
|
const options = {
|
|
19
|
-
body: { to, from, callId, auth, peerDirection },
|
|
20
|
+
body: { to, from, callId, auth, peerDirection, contact },
|
|
20
21
|
};
|
|
21
22
|
const result = await this.sdk._fetch(
|
|
22
23
|
`/internal/sip/router/${to}?from=${from}&callId=${callId}`,
|
|
@@ -65,7 +66,7 @@ export class InternalSipService {
|
|
|
65
66
|
userId,
|
|
66
67
|
clientIp,
|
|
67
68
|
isWebRtc = false,
|
|
68
|
-
|
|
69
|
+
connectionId,
|
|
69
70
|
transport,
|
|
70
71
|
contact,
|
|
71
72
|
domain,
|
|
@@ -83,7 +84,7 @@ export class InternalSipService {
|
|
|
83
84
|
userId,
|
|
84
85
|
clientIp,
|
|
85
86
|
isWebRtc,
|
|
86
|
-
|
|
87
|
+
connectionId,
|
|
87
88
|
transport,
|
|
88
89
|
contact,
|
|
89
90
|
domain,
|
|
@@ -100,7 +101,7 @@ export class InternalSipService {
|
|
|
100
101
|
userId: { type: 'string', required: false },
|
|
101
102
|
clientIp: { type: 'string', required: true },
|
|
102
103
|
isWebRtc: { type: 'boolean', required: true },
|
|
103
|
-
|
|
104
|
+
connectionId: { type: 'string', required: false },
|
|
104
105
|
transport: { type: 'string', required: true },
|
|
105
106
|
contact: { type: 'string', required: true },
|
|
106
107
|
domain: { type: 'string', required: true },
|
|
@@ -120,7 +121,7 @@ export class InternalSipService {
|
|
|
120
121
|
clientIp,
|
|
121
122
|
isWebRtc,
|
|
122
123
|
contact,
|
|
123
|
-
|
|
124
|
+
connectionId,
|
|
124
125
|
transport,
|
|
125
126
|
host,
|
|
126
127
|
port,
|
|
@@ -133,8 +134,6 @@ export class InternalSipService {
|
|
|
133
134
|
`/internal/sip/register`,
|
|
134
135
|
'POST',
|
|
135
136
|
options,
|
|
136
|
-
true,
|
|
137
|
-
false,
|
|
138
137
|
);
|
|
139
138
|
return result;
|
|
140
139
|
}
|
|
@@ -160,8 +159,6 @@ export class InternalSipService {
|
|
|
160
159
|
`/internal/sip/register/`,
|
|
161
160
|
'DELETE',
|
|
162
161
|
options,
|
|
163
|
-
true,
|
|
164
|
-
false,
|
|
165
162
|
);
|
|
166
163
|
return result;
|
|
167
164
|
}
|
|
@@ -180,6 +177,7 @@ export class InternalSipService {
|
|
|
180
177
|
ip,
|
|
181
178
|
peerDirection,
|
|
182
179
|
location,
|
|
180
|
+
connectionType,
|
|
183
181
|
}) {
|
|
184
182
|
this.sdk.validateParams(
|
|
185
183
|
{
|
|
@@ -196,6 +194,7 @@ export class InternalSipService {
|
|
|
196
194
|
ip,
|
|
197
195
|
peerDirection,
|
|
198
196
|
location,
|
|
197
|
+
connectionType,
|
|
199
198
|
},
|
|
200
199
|
{
|
|
201
200
|
method: { type: 'string', required: false },
|
|
@@ -211,6 +210,7 @@ export class InternalSipService {
|
|
|
211
210
|
ip: { type: 'string', required: false },
|
|
212
211
|
peerDirection: { type: 'string', required: false },
|
|
213
212
|
location: { type: 'string', required: false },
|
|
213
|
+
connectionType: { type: 'string', required: false },
|
|
214
214
|
},
|
|
215
215
|
);
|
|
216
216
|
|
|
@@ -229,6 +229,7 @@ export class InternalSipService {
|
|
|
229
229
|
ip,
|
|
230
230
|
peerDirection,
|
|
231
231
|
location,
|
|
232
|
+
connectionType,
|
|
232
233
|
},
|
|
233
234
|
};
|
|
234
235
|
const result = await this.sdk._fetch(
|