livekit-server-sdk 2.13.0 → 2.13.2

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/src/SipClient.ts CHANGED
@@ -81,6 +81,7 @@ export interface CreateSipInboundTrunkOptions {
81
81
  export interface CreateSipOutboundTrunkOptions {
82
82
  metadata?: string;
83
83
  transport: SIPTransport;
84
+ destinationCountry?: string;
84
85
  /** @deprecated - use `authUsername` instead */
85
86
  auth_username?: string;
86
87
  authUsername?: string;
@@ -146,7 +147,7 @@ export interface CreateSipParticipantOptions {
146
147
  krispEnabled?: boolean;
147
148
  /** If `true`, this will wait until the call is answered before returning. */
148
149
  waitUntilAnswered?: boolean;
149
- /** Optional request timeout in seconds. */
150
+ /** Optional request timeout in seconds. default 60 seconds if waitUntilAnswered is true, otherwise 10 seconds */
150
151
  timeout?: number;
151
152
  }
152
153
 
@@ -176,7 +177,7 @@ export interface SipDispatchRuleUpdateOptions {
176
177
  attributes?: { [key: string]: string };
177
178
  }
178
179
 
179
- export interface SipTrunkUpdateOptions {
180
+ export interface SipInboundTrunkUpdateOptions {
180
181
  numbers?: ListUpdate;
181
182
  allowedAddresses?: ListUpdate;
182
183
  allowedNumbers?: ListUpdate;
@@ -186,6 +187,17 @@ export interface SipTrunkUpdateOptions {
186
187
  metadata?: string;
187
188
  }
188
189
 
190
+ export interface SipOutboundTrunkUpdateOptions {
191
+ numbers?: ListUpdate;
192
+ allowedAddresses?: ListUpdate;
193
+ allowedNumbers?: ListUpdate;
194
+ authUsername?: string;
195
+ authPassword?: string;
196
+ destinationCountry?: string;
197
+ name?: string;
198
+ metadata?: string;
199
+ }
200
+
189
201
  export interface TransferSipParticipantOptions {
190
202
  playDialtone?: boolean;
191
203
  headers?: { [key: string]: string };
@@ -331,6 +343,7 @@ export class SipClient extends ServiceBase {
331
343
  headers: opts.headers,
332
344
  headersToAttributes: opts.headersToAttributes,
333
345
  includeHeaders: opts.includeHeaders,
346
+ destinationCountry: opts.destinationCountry,
334
347
  }),
335
348
  }).toJson();
336
349
 
@@ -562,7 +575,7 @@ export class SipClient extends ServiceBase {
562
575
  */
563
576
  async updateSipInboundTrunkFields(
564
577
  sipTrunkId: string,
565
- fields: SipTrunkUpdateOptions,
578
+ fields: SipInboundTrunkUpdateOptions,
566
579
  ): Promise<SIPInboundTrunkInfo> {
567
580
  const req = new UpdateSIPInboundTrunkRequest({
568
581
  sipTrunkId,
@@ -621,7 +634,7 @@ export class SipClient extends ServiceBase {
621
634
  */
622
635
  async updateSipOutboundTrunkFields(
623
636
  sipTrunkId: string,
624
- fields: SipTrunkUpdateOptions,
637
+ fields: SipOutboundTrunkUpdateOptions,
625
638
  ): Promise<SIPOutboundTrunkInfo> {
626
639
  const req = new UpdateSIPOutboundTrunkRequest({
627
640
  sipTrunkId,
@@ -695,6 +708,10 @@ export class SipClient extends ServiceBase {
695
708
  opts = {};
696
709
  }
697
710
 
711
+ if (opts.timeout === undefined) {
712
+ opts.timeout = opts.waitUntilAnswered ? 60 : 10;
713
+ }
714
+
698
715
  const req = new CreateSIPParticipantRequest({
699
716
  sipTrunkId: sipTrunkId,
700
717
  sipCallTo: number,
package/src/grants.ts CHANGED
@@ -103,11 +103,17 @@ export interface SIPGrant {
103
103
  call?: boolean;
104
104
  }
105
105
 
106
+ export interface InferenceGrant {
107
+ /** perform inference */
108
+ perform?: boolean;
109
+ }
110
+
106
111
  /** @internal */
107
112
  export interface ClaimGrants extends JWTPayload {
108
113
  name?: string;
109
114
  video?: VideoGrant;
110
115
  sip?: SIPGrant;
116
+ inference?: InferenceGrant;
111
117
  kind?: string;
112
118
  metadata?: string;
113
119
  attributes?: Record<string, string>;
package/src/index.ts CHANGED
@@ -51,6 +51,7 @@ export {
51
51
  TrackType,
52
52
  WebEgressRequest,
53
53
  VideoCodec,
54
+ WebhookConfig,
54
55
  } from '@livekit/protocol';
55
56
  export * from './AccessToken.js';
56
57
  export * from './AgentDispatchClient.js';