livekit-server-sdk 2.11.0 → 2.13.0
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/EgressClient.cjs +4 -1
- package/dist/EgressClient.cjs.map +1 -1
- package/dist/EgressClient.d.cts +6 -2
- package/dist/EgressClient.d.ts +6 -2
- package/dist/EgressClient.d.ts.map +1 -1
- package/dist/EgressClient.js +5 -1
- package/dist/EgressClient.js.map +1 -1
- package/dist/RoomServiceClient.cjs +20 -1
- package/dist/RoomServiceClient.cjs.map +1 -1
- package/dist/RoomServiceClient.d.cts +12 -0
- package/dist/RoomServiceClient.d.ts +12 -0
- package/dist/RoomServiceClient.d.ts.map +1 -1
- package/dist/RoomServiceClient.js +21 -1
- package/dist/RoomServiceClient.js.map +1 -1
- package/dist/SipClient.cjs +196 -14
- package/dist/SipClient.cjs.map +1 -1
- package/dist/SipClient.d.cts +150 -9
- package/dist/SipClient.d.ts +150 -9
- package/dist/SipClient.d.ts.map +1 -1
- package/dist/SipClient.js +200 -15
- package/dist/SipClient.js.map +1 -1
- package/dist/TwirpRPC.cjs +14 -6
- package/dist/TwirpRPC.cjs.map +1 -1
- package/dist/TwirpRPC.d.cts +7 -3
- package/dist/TwirpRPC.d.ts +7 -3
- package/dist/TwirpRPC.d.ts.map +1 -1
- package/dist/TwirpRPC.js +14 -6
- package/dist/TwirpRPC.js.map +1 -1
- package/dist/grants.cjs.map +1 -1
- package/dist/grants.d.cts +2 -0
- package/dist/grants.d.ts +2 -0
- package/dist/grants.d.ts.map +1 -1
- package/dist/grants.js.map +1 -1
- package/dist/index.d.cts +1 -1
- package/package.json +2 -2
- package/src/EgressClient.ts +10 -0
- package/src/RoomServiceClient.ts +22 -1
- package/src/SipClient.ts +298 -26
- package/src/TwirpRPC.ts +37 -9
- package/src/grants.ts +3 -0
package/dist/SipClient.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SIPHeaderOptions, SIPTransport, RoomConfiguration, SIPTrunkInfo, SIPInboundTrunkInfo, SIPOutboundTrunkInfo, SIPDispatchRuleInfo, SIPParticipantInfo } from '@livekit/protocol';
|
|
1
|
+
import { SIPHeaderOptions, SIPTransport, RoomConfiguration, Pagination, ListUpdate, SIPDispatchRule, SIPTrunkInfo, SIPInboundTrunkInfo, SIPOutboundTrunkInfo, SIPDispatchRuleInfo, SIPParticipantInfo } from '@livekit/protocol';
|
|
2
2
|
import { ServiceBase } from './ServiceBase.cjs';
|
|
3
3
|
import './grants.cjs';
|
|
4
4
|
import 'jose';
|
|
@@ -79,25 +79,76 @@ interface CreateSipDispatchRuleOptions {
|
|
|
79
79
|
roomConfig?: RoomConfiguration;
|
|
80
80
|
}
|
|
81
81
|
interface CreateSipParticipantOptions {
|
|
82
|
+
/** Optional SIP From number to use. If empty, trunk number is used. */
|
|
82
83
|
fromNumber?: string;
|
|
84
|
+
/** Optional identity of the SIP participant */
|
|
83
85
|
participantIdentity?: string;
|
|
86
|
+
/** Optional name of the participant */
|
|
84
87
|
participantName?: string;
|
|
88
|
+
/** Optional metadata to attach to the participant */
|
|
85
89
|
participantMetadata?: string;
|
|
90
|
+
/** Optional attributes to attach to the participant */
|
|
86
91
|
participantAttributes?: {
|
|
87
92
|
[key: string]: string;
|
|
88
93
|
};
|
|
94
|
+
/** Optionally send following DTMF digits (extension codes) when making a call.
|
|
95
|
+
* Character 'w' can be used to add a 0.5 sec delay. */
|
|
89
96
|
dtmf?: string;
|
|
90
|
-
/** @deprecated
|
|
97
|
+
/** @deprecated use `playDialtone` instead */
|
|
91
98
|
playRingtone?: boolean;
|
|
99
|
+
/** If `true`, the SIP Participant plays a dial tone to the room until the phone is picked up. */
|
|
92
100
|
playDialtone?: boolean;
|
|
101
|
+
/** These headers are sent as-is and may help identify this call as coming from LiveKit for the other SIP endpoint. */
|
|
93
102
|
headers?: {
|
|
94
103
|
[key: string]: string;
|
|
95
104
|
};
|
|
105
|
+
/** Map SIP response headers from INVITE to sip.h.* participant attributes automatically. */
|
|
96
106
|
includeHeaders?: SIPHeaderOptions;
|
|
97
107
|
hidePhoneNumber?: boolean;
|
|
108
|
+
/** Maximum time for the call to ring in seconds. */
|
|
98
109
|
ringingTimeout?: number;
|
|
110
|
+
/** Maximum call duration in seconds. */
|
|
99
111
|
maxCallDuration?: number;
|
|
112
|
+
/** If `true`, Krisp noise cancellation will be enabled for the caller. */
|
|
100
113
|
krispEnabled?: boolean;
|
|
114
|
+
/** If `true`, this will wait until the call is answered before returning. */
|
|
115
|
+
waitUntilAnswered?: boolean;
|
|
116
|
+
/** Optional request timeout in seconds. */
|
|
117
|
+
timeout?: number;
|
|
118
|
+
}
|
|
119
|
+
interface ListSipDispatchRuleOptions {
|
|
120
|
+
/** Pagination options. */
|
|
121
|
+
page?: Pagination;
|
|
122
|
+
/** Rule IDs to list. If this option is set, the response will contains rules in the same order. If any of the rules is missing, a nil item in that position will be sent in the response. */
|
|
123
|
+
dispatchRuleIds?: string[];
|
|
124
|
+
/** Only list rules that contain one of the Trunk IDs, including wildcard rules. */
|
|
125
|
+
trunkIds?: string[];
|
|
126
|
+
}
|
|
127
|
+
interface ListSipTrunkOptions {
|
|
128
|
+
/** Pagination options. */
|
|
129
|
+
page?: Pagination;
|
|
130
|
+
/** Trunk IDs to list. If this option is set, the response will contains trunks in the same order. If any of the trunks is missing, a nil item in that position will be sent in the response. */
|
|
131
|
+
trunkIds?: string[];
|
|
132
|
+
/** Only list trunks that contain one of the numbers, including wildcard trunks. */
|
|
133
|
+
numbers?: string[];
|
|
134
|
+
}
|
|
135
|
+
interface SipDispatchRuleUpdateOptions {
|
|
136
|
+
trunkIds?: ListUpdate;
|
|
137
|
+
rule?: SIPDispatchRule;
|
|
138
|
+
name?: string;
|
|
139
|
+
metadata?: string;
|
|
140
|
+
attributes?: {
|
|
141
|
+
[key: string]: string;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
interface SipTrunkUpdateOptions {
|
|
145
|
+
numbers?: ListUpdate;
|
|
146
|
+
allowedAddresses?: ListUpdate;
|
|
147
|
+
allowedNumbers?: ListUpdate;
|
|
148
|
+
authUsername?: string;
|
|
149
|
+
authPassword?: string;
|
|
150
|
+
name?: string;
|
|
151
|
+
metadata?: string;
|
|
101
152
|
}
|
|
102
153
|
interface TransferSipParticipantOptions {
|
|
103
154
|
playDialtone?: boolean;
|
|
@@ -123,51 +174,141 @@ declare class SipClient extends ServiceBase {
|
|
|
123
174
|
*/
|
|
124
175
|
createSipTrunk(number: string, opts?: CreateSipTrunkOptions): Promise<SIPTrunkInfo>;
|
|
125
176
|
/**
|
|
177
|
+
* Create a new SIP inbound trunk.
|
|
178
|
+
*
|
|
126
179
|
* @param name - human-readable name of the trunk
|
|
127
180
|
* @param numbers - phone numbers of the trunk
|
|
128
181
|
* @param opts - CreateSipTrunkOptions
|
|
182
|
+
* @returns Created SIP inbound trunk
|
|
129
183
|
*/
|
|
130
184
|
createSipInboundTrunk(name: string, numbers: string[], opts?: CreateSipInboundTrunkOptions): Promise<SIPInboundTrunkInfo>;
|
|
131
185
|
/**
|
|
186
|
+
* Create a new SIP outbound trunk.
|
|
187
|
+
*
|
|
132
188
|
* @param name - human-readable name of the trunk
|
|
133
189
|
* @param address - hostname and port of the SIP server to dial
|
|
134
190
|
* @param numbers - phone numbers of the trunk
|
|
135
191
|
* @param opts - CreateSipTrunkOptions
|
|
192
|
+
* @returns Created SIP outbound trunk
|
|
136
193
|
*/
|
|
137
194
|
createSipOutboundTrunk(name: string, address: string, numbers: string[], opts?: CreateSipOutboundTrunkOptions): Promise<SIPOutboundTrunkInfo>;
|
|
138
195
|
/**
|
|
139
196
|
* @deprecated use `listSipInboundTrunk` or `listSipOutboundTrunk`
|
|
140
197
|
*/
|
|
141
198
|
listSipTrunk(): Promise<Array<SIPTrunkInfo>>;
|
|
142
|
-
listSipInboundTrunk(): Promise<Array<SIPInboundTrunkInfo>>;
|
|
143
|
-
listSipOutboundTrunk(): Promise<Array<SIPOutboundTrunkInfo>>;
|
|
144
199
|
/**
|
|
145
|
-
*
|
|
200
|
+
* List SIP inbound trunks with optional filtering.
|
|
201
|
+
*
|
|
202
|
+
* @param list - Request with optional filtering parameters
|
|
203
|
+
* @returns Response containing list of SIP inbound trunks
|
|
204
|
+
*/
|
|
205
|
+
listSipInboundTrunk(list?: ListSipTrunkOptions): Promise<Array<SIPInboundTrunkInfo>>;
|
|
206
|
+
/**
|
|
207
|
+
* List SIP outbound trunks with optional filtering.
|
|
208
|
+
*
|
|
209
|
+
* @param list - Request with optional filtering parameters
|
|
210
|
+
* @returns Response containing list of SIP outbound trunks
|
|
211
|
+
*/
|
|
212
|
+
listSipOutboundTrunk(list?: ListSipTrunkOptions): Promise<Array<SIPOutboundTrunkInfo>>;
|
|
213
|
+
/**
|
|
214
|
+
* Delete a SIP trunk.
|
|
215
|
+
*
|
|
216
|
+
* @param sipTrunkId - ID of the SIP trunk to delete
|
|
217
|
+
* @returns Deleted trunk information
|
|
146
218
|
*/
|
|
147
219
|
deleteSipTrunk(sipTrunkId: string): Promise<SIPTrunkInfo>;
|
|
148
220
|
/**
|
|
149
|
-
*
|
|
221
|
+
* Create a new SIP dispatch rule.
|
|
222
|
+
*
|
|
223
|
+
* @param rule - SIP dispatch rule to create
|
|
150
224
|
* @param opts - CreateSipDispatchRuleOptions
|
|
225
|
+
* @returns Created SIP dispatch rule
|
|
151
226
|
*/
|
|
152
227
|
createSipDispatchRule(rule: SipDispatchRuleDirect | SipDispatchRuleIndividual, opts?: CreateSipDispatchRuleOptions): Promise<SIPDispatchRuleInfo>;
|
|
153
|
-
listSipDispatchRule(): Promise<Array<SIPDispatchRuleInfo>>;
|
|
154
228
|
/**
|
|
155
|
-
*
|
|
229
|
+
* Updates an existing SIP dispatch rule by replacing it entirely.
|
|
230
|
+
*
|
|
231
|
+
* @param sipDispatchRuleId - ID of the SIP dispatch rule to update
|
|
232
|
+
* @param rule - new SIP dispatch rule
|
|
233
|
+
* @returns Updated SIP dispatch rule
|
|
234
|
+
*/
|
|
235
|
+
updateSipDispatchRule(sipDispatchRuleId: string, rule: SIPDispatchRuleInfo): Promise<SIPDispatchRuleInfo>;
|
|
236
|
+
/**
|
|
237
|
+
* Updates specific fields of an existing SIP dispatch rule.
|
|
238
|
+
* Only provided fields will be updated.
|
|
239
|
+
*
|
|
240
|
+
* @param sipDispatchRuleId - ID of the SIP dispatch rule to update
|
|
241
|
+
* @param fields - Fields of the dispatch rule to update
|
|
242
|
+
* @returns Updated SIP dispatch rule
|
|
243
|
+
*/
|
|
244
|
+
updateSipDispatchRuleFields(sipDispatchRuleId: string, fields?: SipDispatchRuleUpdateOptions): Promise<SIPDispatchRuleInfo>;
|
|
245
|
+
/**
|
|
246
|
+
* Updates an existing SIP inbound trunk by replacing it entirely.
|
|
247
|
+
*
|
|
248
|
+
* @param sipTrunkId - ID of the SIP inbound trunk to update
|
|
249
|
+
* @param trunk - SIP inbound trunk to update with
|
|
250
|
+
* @returns Updated SIP inbound trunk
|
|
251
|
+
*/
|
|
252
|
+
updateSipInboundTrunk(sipTrunkId: string, trunk: SIPInboundTrunkInfo): Promise<SIPInboundTrunkInfo>;
|
|
253
|
+
/**
|
|
254
|
+
* Updates specific fields of an existing SIP inbound trunk.
|
|
255
|
+
* Only provided fields will be updated.
|
|
256
|
+
*
|
|
257
|
+
* @param sipTrunkId - ID of the SIP inbound trunk to update
|
|
258
|
+
* @param fields - Fields of the inbound trunk to update
|
|
259
|
+
* @returns Updated SIP inbound trunk
|
|
260
|
+
*/
|
|
261
|
+
updateSipInboundTrunkFields(sipTrunkId: string, fields: SipTrunkUpdateOptions): Promise<SIPInboundTrunkInfo>;
|
|
262
|
+
/**
|
|
263
|
+
* Updates an existing SIP outbound trunk by replacing it entirely.
|
|
264
|
+
*
|
|
265
|
+
* @param sipTrunkId - ID of the SIP outbound trunk to update
|
|
266
|
+
* @param trunk - SIP outbound trunk to update with
|
|
267
|
+
* @returns Updated SIP outbound trunk
|
|
268
|
+
*/
|
|
269
|
+
updateSipOutboundTrunk(sipTrunkId: string, trunk: SIPOutboundTrunkInfo): Promise<SIPOutboundTrunkInfo>;
|
|
270
|
+
/**
|
|
271
|
+
* Updates specific fields of an existing SIP outbound trunk.
|
|
272
|
+
* Only provided fields will be updated.
|
|
273
|
+
*
|
|
274
|
+
* @param sipTrunkId - ID of the SIP outbound trunk to update
|
|
275
|
+
* @param fields - Fields of the outbound trunk to update
|
|
276
|
+
* @returns Updated SIP outbound trunk
|
|
277
|
+
*/
|
|
278
|
+
updateSipOutboundTrunkFields(sipTrunkId: string, fields: SipTrunkUpdateOptions): Promise<SIPOutboundTrunkInfo>;
|
|
279
|
+
/**
|
|
280
|
+
* List SIP dispatch rules with optional filtering.
|
|
281
|
+
*
|
|
282
|
+
* @param list - Request with optional filtering parameters
|
|
283
|
+
* @returns Response containing list of SIP dispatch rules
|
|
284
|
+
*/
|
|
285
|
+
listSipDispatchRule(list?: ListSipDispatchRuleOptions): Promise<Array<SIPDispatchRuleInfo>>;
|
|
286
|
+
/**
|
|
287
|
+
* Delete a SIP dispatch rule.
|
|
288
|
+
*
|
|
289
|
+
* @param sipDispatchRuleId - ID of the SIP dispatch rule to delete
|
|
290
|
+
* @returns Deleted rule information
|
|
156
291
|
*/
|
|
157
292
|
deleteSipDispatchRule(sipDispatchRuleId: string): Promise<SIPDispatchRuleInfo>;
|
|
158
293
|
/**
|
|
294
|
+
* Create a new SIP participant.
|
|
295
|
+
*
|
|
159
296
|
* @param sipTrunkId - sip trunk to use for the call
|
|
160
297
|
* @param number - number to dial
|
|
161
298
|
* @param roomName - room to attach the call to
|
|
162
299
|
* @param opts - CreateSipParticipantOptions
|
|
300
|
+
* @returns Created SIP participant
|
|
163
301
|
*/
|
|
164
302
|
createSipParticipant(sipTrunkId: string, number: string, roomName: string, opts?: CreateSipParticipantOptions): Promise<SIPParticipantInfo>;
|
|
165
303
|
/**
|
|
304
|
+
* Transfer a SIP participant to a different room.
|
|
305
|
+
*
|
|
166
306
|
* @param roomName - room the SIP participant to transfer is connectd to
|
|
167
307
|
* @param participantIdentity - identity of the SIP participant to transfer
|
|
168
308
|
* @param transferTo - SIP URL to transfer the participant to
|
|
309
|
+
* @param opts - TransferSipParticipantOptions
|
|
169
310
|
*/
|
|
170
311
|
transferSipParticipant(roomName: string, participantIdentity: string, transferTo: string, opts?: TransferSipParticipantOptions): Promise<void>;
|
|
171
312
|
}
|
|
172
313
|
|
|
173
|
-
export { type CreateSipDispatchRuleOptions, type CreateSipInboundTrunkOptions, type CreateSipOutboundTrunkOptions, type CreateSipParticipantOptions, type CreateSipTrunkOptions, SipClient, type SipDispatchRuleDirect, type SipDispatchRuleIndividual, type TransferSipParticipantOptions };
|
|
314
|
+
export { type CreateSipDispatchRuleOptions, type CreateSipInboundTrunkOptions, type CreateSipOutboundTrunkOptions, type CreateSipParticipantOptions, type CreateSipTrunkOptions, type ListSipDispatchRuleOptions, type ListSipTrunkOptions, SipClient, type SipDispatchRuleDirect, type SipDispatchRuleIndividual, type SipDispatchRuleUpdateOptions, type SipTrunkUpdateOptions, type TransferSipParticipantOptions };
|
package/dist/SipClient.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RoomConfiguration, SIPHeaderOptions } from '@livekit/protocol';
|
|
2
|
-
import { SIPDispatchRuleInfo, SIPInboundTrunkInfo, SIPOutboundTrunkInfo, SIPParticipantInfo, SIPTransport, SIPTrunkInfo } from '@livekit/protocol';
|
|
1
|
+
import type { ListUpdate, Pagination, RoomConfiguration, SIPHeaderOptions } from '@livekit/protocol';
|
|
2
|
+
import { SIPDispatchRule, SIPDispatchRuleInfo, SIPInboundTrunkInfo, SIPOutboundTrunkInfo, SIPParticipantInfo, SIPTransport, SIPTrunkInfo } from '@livekit/protocol';
|
|
3
3
|
import { ServiceBase } from './ServiceBase.js';
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated use CreateSipInboundTrunkOptions or CreateSipOutboundTrunkOptions
|
|
@@ -77,25 +77,76 @@ export interface CreateSipDispatchRuleOptions {
|
|
|
77
77
|
roomConfig?: RoomConfiguration;
|
|
78
78
|
}
|
|
79
79
|
export interface CreateSipParticipantOptions {
|
|
80
|
+
/** Optional SIP From number to use. If empty, trunk number is used. */
|
|
80
81
|
fromNumber?: string;
|
|
82
|
+
/** Optional identity of the SIP participant */
|
|
81
83
|
participantIdentity?: string;
|
|
84
|
+
/** Optional name of the participant */
|
|
82
85
|
participantName?: string;
|
|
86
|
+
/** Optional metadata to attach to the participant */
|
|
83
87
|
participantMetadata?: string;
|
|
88
|
+
/** Optional attributes to attach to the participant */
|
|
84
89
|
participantAttributes?: {
|
|
85
90
|
[key: string]: string;
|
|
86
91
|
};
|
|
92
|
+
/** Optionally send following DTMF digits (extension codes) when making a call.
|
|
93
|
+
* Character 'w' can be used to add a 0.5 sec delay. */
|
|
87
94
|
dtmf?: string;
|
|
88
|
-
/** @deprecated
|
|
95
|
+
/** @deprecated use `playDialtone` instead */
|
|
89
96
|
playRingtone?: boolean;
|
|
97
|
+
/** If `true`, the SIP Participant plays a dial tone to the room until the phone is picked up. */
|
|
90
98
|
playDialtone?: boolean;
|
|
99
|
+
/** These headers are sent as-is and may help identify this call as coming from LiveKit for the other SIP endpoint. */
|
|
91
100
|
headers?: {
|
|
92
101
|
[key: string]: string;
|
|
93
102
|
};
|
|
103
|
+
/** Map SIP response headers from INVITE to sip.h.* participant attributes automatically. */
|
|
94
104
|
includeHeaders?: SIPHeaderOptions;
|
|
95
105
|
hidePhoneNumber?: boolean;
|
|
106
|
+
/** Maximum time for the call to ring in seconds. */
|
|
96
107
|
ringingTimeout?: number;
|
|
108
|
+
/** Maximum call duration in seconds. */
|
|
97
109
|
maxCallDuration?: number;
|
|
110
|
+
/** If `true`, Krisp noise cancellation will be enabled for the caller. */
|
|
98
111
|
krispEnabled?: boolean;
|
|
112
|
+
/** If `true`, this will wait until the call is answered before returning. */
|
|
113
|
+
waitUntilAnswered?: boolean;
|
|
114
|
+
/** Optional request timeout in seconds. */
|
|
115
|
+
timeout?: number;
|
|
116
|
+
}
|
|
117
|
+
export interface ListSipDispatchRuleOptions {
|
|
118
|
+
/** Pagination options. */
|
|
119
|
+
page?: Pagination;
|
|
120
|
+
/** Rule IDs to list. If this option is set, the response will contains rules in the same order. If any of the rules is missing, a nil item in that position will be sent in the response. */
|
|
121
|
+
dispatchRuleIds?: string[];
|
|
122
|
+
/** Only list rules that contain one of the Trunk IDs, including wildcard rules. */
|
|
123
|
+
trunkIds?: string[];
|
|
124
|
+
}
|
|
125
|
+
export interface ListSipTrunkOptions {
|
|
126
|
+
/** Pagination options. */
|
|
127
|
+
page?: Pagination;
|
|
128
|
+
/** Trunk IDs to list. If this option is set, the response will contains trunks in the same order. If any of the trunks is missing, a nil item in that position will be sent in the response. */
|
|
129
|
+
trunkIds?: string[];
|
|
130
|
+
/** Only list trunks that contain one of the numbers, including wildcard trunks. */
|
|
131
|
+
numbers?: string[];
|
|
132
|
+
}
|
|
133
|
+
export interface SipDispatchRuleUpdateOptions {
|
|
134
|
+
trunkIds?: ListUpdate;
|
|
135
|
+
rule?: SIPDispatchRule;
|
|
136
|
+
name?: string;
|
|
137
|
+
metadata?: string;
|
|
138
|
+
attributes?: {
|
|
139
|
+
[key: string]: string;
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
export interface SipTrunkUpdateOptions {
|
|
143
|
+
numbers?: ListUpdate;
|
|
144
|
+
allowedAddresses?: ListUpdate;
|
|
145
|
+
allowedNumbers?: ListUpdate;
|
|
146
|
+
authUsername?: string;
|
|
147
|
+
authPassword?: string;
|
|
148
|
+
name?: string;
|
|
149
|
+
metadata?: string;
|
|
99
150
|
}
|
|
100
151
|
export interface TransferSipParticipantOptions {
|
|
101
152
|
playDialtone?: boolean;
|
|
@@ -121,49 +172,139 @@ export declare class SipClient extends ServiceBase {
|
|
|
121
172
|
*/
|
|
122
173
|
createSipTrunk(number: string, opts?: CreateSipTrunkOptions): Promise<SIPTrunkInfo>;
|
|
123
174
|
/**
|
|
175
|
+
* Create a new SIP inbound trunk.
|
|
176
|
+
*
|
|
124
177
|
* @param name - human-readable name of the trunk
|
|
125
178
|
* @param numbers - phone numbers of the trunk
|
|
126
179
|
* @param opts - CreateSipTrunkOptions
|
|
180
|
+
* @returns Created SIP inbound trunk
|
|
127
181
|
*/
|
|
128
182
|
createSipInboundTrunk(name: string, numbers: string[], opts?: CreateSipInboundTrunkOptions): Promise<SIPInboundTrunkInfo>;
|
|
129
183
|
/**
|
|
184
|
+
* Create a new SIP outbound trunk.
|
|
185
|
+
*
|
|
130
186
|
* @param name - human-readable name of the trunk
|
|
131
187
|
* @param address - hostname and port of the SIP server to dial
|
|
132
188
|
* @param numbers - phone numbers of the trunk
|
|
133
189
|
* @param opts - CreateSipTrunkOptions
|
|
190
|
+
* @returns Created SIP outbound trunk
|
|
134
191
|
*/
|
|
135
192
|
createSipOutboundTrunk(name: string, address: string, numbers: string[], opts?: CreateSipOutboundTrunkOptions): Promise<SIPOutboundTrunkInfo>;
|
|
136
193
|
/**
|
|
137
194
|
* @deprecated use `listSipInboundTrunk` or `listSipOutboundTrunk`
|
|
138
195
|
*/
|
|
139
196
|
listSipTrunk(): Promise<Array<SIPTrunkInfo>>;
|
|
140
|
-
listSipInboundTrunk(): Promise<Array<SIPInboundTrunkInfo>>;
|
|
141
|
-
listSipOutboundTrunk(): Promise<Array<SIPOutboundTrunkInfo>>;
|
|
142
197
|
/**
|
|
143
|
-
*
|
|
198
|
+
* List SIP inbound trunks with optional filtering.
|
|
199
|
+
*
|
|
200
|
+
* @param list - Request with optional filtering parameters
|
|
201
|
+
* @returns Response containing list of SIP inbound trunks
|
|
202
|
+
*/
|
|
203
|
+
listSipInboundTrunk(list?: ListSipTrunkOptions): Promise<Array<SIPInboundTrunkInfo>>;
|
|
204
|
+
/**
|
|
205
|
+
* List SIP outbound trunks with optional filtering.
|
|
206
|
+
*
|
|
207
|
+
* @param list - Request with optional filtering parameters
|
|
208
|
+
* @returns Response containing list of SIP outbound trunks
|
|
209
|
+
*/
|
|
210
|
+
listSipOutboundTrunk(list?: ListSipTrunkOptions): Promise<Array<SIPOutboundTrunkInfo>>;
|
|
211
|
+
/**
|
|
212
|
+
* Delete a SIP trunk.
|
|
213
|
+
*
|
|
214
|
+
* @param sipTrunkId - ID of the SIP trunk to delete
|
|
215
|
+
* @returns Deleted trunk information
|
|
144
216
|
*/
|
|
145
217
|
deleteSipTrunk(sipTrunkId: string): Promise<SIPTrunkInfo>;
|
|
146
218
|
/**
|
|
147
|
-
*
|
|
219
|
+
* Create a new SIP dispatch rule.
|
|
220
|
+
*
|
|
221
|
+
* @param rule - SIP dispatch rule to create
|
|
148
222
|
* @param opts - CreateSipDispatchRuleOptions
|
|
223
|
+
* @returns Created SIP dispatch rule
|
|
149
224
|
*/
|
|
150
225
|
createSipDispatchRule(rule: SipDispatchRuleDirect | SipDispatchRuleIndividual, opts?: CreateSipDispatchRuleOptions): Promise<SIPDispatchRuleInfo>;
|
|
151
|
-
listSipDispatchRule(): Promise<Array<SIPDispatchRuleInfo>>;
|
|
152
226
|
/**
|
|
153
|
-
*
|
|
227
|
+
* Updates an existing SIP dispatch rule by replacing it entirely.
|
|
228
|
+
*
|
|
229
|
+
* @param sipDispatchRuleId - ID of the SIP dispatch rule to update
|
|
230
|
+
* @param rule - new SIP dispatch rule
|
|
231
|
+
* @returns Updated SIP dispatch rule
|
|
232
|
+
*/
|
|
233
|
+
updateSipDispatchRule(sipDispatchRuleId: string, rule: SIPDispatchRuleInfo): Promise<SIPDispatchRuleInfo>;
|
|
234
|
+
/**
|
|
235
|
+
* Updates specific fields of an existing SIP dispatch rule.
|
|
236
|
+
* Only provided fields will be updated.
|
|
237
|
+
*
|
|
238
|
+
* @param sipDispatchRuleId - ID of the SIP dispatch rule to update
|
|
239
|
+
* @param fields - Fields of the dispatch rule to update
|
|
240
|
+
* @returns Updated SIP dispatch rule
|
|
241
|
+
*/
|
|
242
|
+
updateSipDispatchRuleFields(sipDispatchRuleId: string, fields?: SipDispatchRuleUpdateOptions): Promise<SIPDispatchRuleInfo>;
|
|
243
|
+
/**
|
|
244
|
+
* Updates an existing SIP inbound trunk by replacing it entirely.
|
|
245
|
+
*
|
|
246
|
+
* @param sipTrunkId - ID of the SIP inbound trunk to update
|
|
247
|
+
* @param trunk - SIP inbound trunk to update with
|
|
248
|
+
* @returns Updated SIP inbound trunk
|
|
249
|
+
*/
|
|
250
|
+
updateSipInboundTrunk(sipTrunkId: string, trunk: SIPInboundTrunkInfo): Promise<SIPInboundTrunkInfo>;
|
|
251
|
+
/**
|
|
252
|
+
* Updates specific fields of an existing SIP inbound trunk.
|
|
253
|
+
* Only provided fields will be updated.
|
|
254
|
+
*
|
|
255
|
+
* @param sipTrunkId - ID of the SIP inbound trunk to update
|
|
256
|
+
* @param fields - Fields of the inbound trunk to update
|
|
257
|
+
* @returns Updated SIP inbound trunk
|
|
258
|
+
*/
|
|
259
|
+
updateSipInboundTrunkFields(sipTrunkId: string, fields: SipTrunkUpdateOptions): Promise<SIPInboundTrunkInfo>;
|
|
260
|
+
/**
|
|
261
|
+
* Updates an existing SIP outbound trunk by replacing it entirely.
|
|
262
|
+
*
|
|
263
|
+
* @param sipTrunkId - ID of the SIP outbound trunk to update
|
|
264
|
+
* @param trunk - SIP outbound trunk to update with
|
|
265
|
+
* @returns Updated SIP outbound trunk
|
|
266
|
+
*/
|
|
267
|
+
updateSipOutboundTrunk(sipTrunkId: string, trunk: SIPOutboundTrunkInfo): Promise<SIPOutboundTrunkInfo>;
|
|
268
|
+
/**
|
|
269
|
+
* Updates specific fields of an existing SIP outbound trunk.
|
|
270
|
+
* Only provided fields will be updated.
|
|
271
|
+
*
|
|
272
|
+
* @param sipTrunkId - ID of the SIP outbound trunk to update
|
|
273
|
+
* @param fields - Fields of the outbound trunk to update
|
|
274
|
+
* @returns Updated SIP outbound trunk
|
|
275
|
+
*/
|
|
276
|
+
updateSipOutboundTrunkFields(sipTrunkId: string, fields: SipTrunkUpdateOptions): Promise<SIPOutboundTrunkInfo>;
|
|
277
|
+
/**
|
|
278
|
+
* List SIP dispatch rules with optional filtering.
|
|
279
|
+
*
|
|
280
|
+
* @param list - Request with optional filtering parameters
|
|
281
|
+
* @returns Response containing list of SIP dispatch rules
|
|
282
|
+
*/
|
|
283
|
+
listSipDispatchRule(list?: ListSipDispatchRuleOptions): Promise<Array<SIPDispatchRuleInfo>>;
|
|
284
|
+
/**
|
|
285
|
+
* Delete a SIP dispatch rule.
|
|
286
|
+
*
|
|
287
|
+
* @param sipDispatchRuleId - ID of the SIP dispatch rule to delete
|
|
288
|
+
* @returns Deleted rule information
|
|
154
289
|
*/
|
|
155
290
|
deleteSipDispatchRule(sipDispatchRuleId: string): Promise<SIPDispatchRuleInfo>;
|
|
156
291
|
/**
|
|
292
|
+
* Create a new SIP participant.
|
|
293
|
+
*
|
|
157
294
|
* @param sipTrunkId - sip trunk to use for the call
|
|
158
295
|
* @param number - number to dial
|
|
159
296
|
* @param roomName - room to attach the call to
|
|
160
297
|
* @param opts - CreateSipParticipantOptions
|
|
298
|
+
* @returns Created SIP participant
|
|
161
299
|
*/
|
|
162
300
|
createSipParticipant(sipTrunkId: string, number: string, roomName: string, opts?: CreateSipParticipantOptions): Promise<SIPParticipantInfo>;
|
|
163
301
|
/**
|
|
302
|
+
* Transfer a SIP participant to a different room.
|
|
303
|
+
*
|
|
164
304
|
* @param roomName - room the SIP participant to transfer is connectd to
|
|
165
305
|
* @param participantIdentity - identity of the SIP participant to transfer
|
|
166
306
|
* @param transferTo - SIP URL to transfer the participant to
|
|
307
|
+
* @param opts - TransferSipParticipantOptions
|
|
167
308
|
*/
|
|
168
309
|
transferSipParticipant(roomName: string, participantIdentity: string, transferTo: string, opts?: TransferSipParticipantOptions): Promise<void>;
|
|
169
310
|
}
|
package/dist/SipClient.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SipClient.d.ts","sourceRoot":"","sources":["../src/SipClient.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,
|
|
1
|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