diff --git a/.changeset/lemon-ducks-smoke.md b/.changeset/lemon-ducks-smoke.md new file mode 100644 index 00000000..724f68df --- /dev/null +++ b/.changeset/lemon-ducks-smoke.md @@ -0,0 +1,6 @@ +--- +"agent-dispatch": patch +"livekit-server-sdk": patch +--- + +Add support for destination_country in outbound trunk diff --git a/examples/agent-dispatch/package.json b/examples/agent-dispatch/package.json index 40ed26c1..4fe1706e 100644 --- a/examples/agent-dispatch/package.json +++ b/examples/agent-dispatch/package.json @@ -14,7 +14,7 @@ "dependencies": { "dotenv": "^16.4.5", "livekit-server-sdk": "workspace:*", - "@livekit/protocol": "^1.30.0" + "@livekit/protocol": "^1.39.0" }, "devDependencies": { "@types/node": "^20.10.4", diff --git a/packages/livekit-server-sdk/package.json b/packages/livekit-server-sdk/package.json index d0497266..fdc7c2db 100644 --- a/packages/livekit-server-sdk/package.json +++ b/packages/livekit-server-sdk/package.json @@ -43,7 +43,7 @@ }, "dependencies": { "@bufbuild/protobuf": "^1.7.2", - "@livekit/protocol": "^1.38.0", + "@livekit/protocol": "^1.39.0", "camelcase-keys": "^9.0.0", "jose": "^5.1.2" }, diff --git a/packages/livekit-server-sdk/src/SipClient.ts b/packages/livekit-server-sdk/src/SipClient.ts index 77094429..5f1d3a61 100644 --- a/packages/livekit-server-sdk/src/SipClient.ts +++ b/packages/livekit-server-sdk/src/SipClient.ts @@ -81,6 +81,7 @@ export interface CreateSipInboundTrunkOptions { export interface CreateSipOutboundTrunkOptions { metadata?: string; transport: SIPTransport; + destinationCountry?: string; /** @deprecated - use `authUsername` instead */ auth_username?: string; authUsername?: string; @@ -176,7 +177,7 @@ export interface SipDispatchRuleUpdateOptions { attributes?: { [key: string]: string }; } -export interface SipTrunkUpdateOptions { +export interface SipInboundTrunkUpdateOptions { numbers?: ListUpdate; allowedAddresses?: ListUpdate; allowedNumbers?: ListUpdate; @@ -186,6 +187,17 @@ export interface SipTrunkUpdateOptions { metadata?: string; } +export interface SipOutboundTrunkUpdateOptions { + numbers?: ListUpdate; + allowedAddresses?: ListUpdate; + allowedNumbers?: ListUpdate; + authUsername?: string; + authPassword?: string; + destinationCountry?: string; + name?: string; + metadata?: string; +} + export interface TransferSipParticipantOptions { playDialtone?: boolean; headers?: { [key: string]: string }; @@ -331,6 +343,7 @@ export class SipClient extends ServiceBase { headers: opts.headers, headersToAttributes: opts.headersToAttributes, includeHeaders: opts.includeHeaders, + destinationCountry: opts.destinationCountry, }), }).toJson(); @@ -562,7 +575,7 @@ export class SipClient extends ServiceBase { */ async updateSipInboundTrunkFields( sipTrunkId: string, - fields: SipTrunkUpdateOptions, + fields: SipInboundTrunkUpdateOptions, ): Promise { const req = new UpdateSIPInboundTrunkRequest({ sipTrunkId, @@ -621,7 +634,7 @@ export class SipClient extends ServiceBase { */ async updateSipOutboundTrunkFields( sipTrunkId: string, - fields: SipTrunkUpdateOptions, + fields: SipOutboundTrunkUpdateOptions, ): Promise { const req = new UpdateSIPOutboundTrunkRequest({ sipTrunkId, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 44323453..a1096046 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -75,8 +75,8 @@ importers: examples/agent-dispatch: dependencies: '@livekit/protocol': - specifier: ^1.30.0 - version: 1.35.0 + specifier: ^1.39.0 + version: 1.39.0 dotenv: specifier: ^16.4.5 version: 16.4.5 @@ -270,8 +270,8 @@ importers: specifier: ^1.7.2 version: 1.10.0 '@livekit/protocol': - specifier: ^1.38.0 - version: 1.38.0 + specifier: ^1.39.0 + version: 1.39.0 camelcase-keys: specifier: ^9.0.0 version: 9.1.3 @@ -1161,11 +1161,8 @@ packages: '@livekit/mutex@1.1.1': resolution: {integrity: sha512-EsshAucklmpuUAfkABPxJNhzj9v2sG7JuzFDL4ML1oJQSV14sqrpTYnsaOudMAw9yOaW53NU3QQTlUQoRs4czw==} - '@livekit/protocol@1.35.0': - resolution: {integrity: sha512-uVVfQQr9JlsE+WBKbMgMdsxuVCG2zYkcE52bOjRQiGQvdbj9dm90A7sy+G7Vrb0QPGaN30xlI7nvtKpcGqw9Nw==} - - '@livekit/protocol@1.38.0': - resolution: {integrity: sha512-XX6ulvsE1XCN18LVf3ydHN7Ri1Z1M1P5dQdjnm5nVDsSqUL12Vbo/4RKcRlCEXAg2qB62mKjcaVLXVwkfXggkg==} + '@livekit/protocol@1.39.0': + resolution: {integrity: sha512-Zar6711kJk1MjI+63DJoyCxv8deNphIIan7tK9C5f+Zy3v2Pvjs6Yz7cFoOeDK/rY7b7deA2wfYxUi2S5XLp7w==} '@livekit/typed-emitter@3.0.0': resolution: {integrity: sha512-9bl0k4MgBPZu3Qu3R3xy12rmbW17e3bE9yf4YY85gJIQ3ezLEj/uzpKHWBsLaDoL5Mozz8QCgggwIBudYQWeQg==} @@ -4982,11 +4979,7 @@ snapshots: '@livekit/mutex@1.1.1': {} - '@livekit/protocol@1.35.0': - dependencies: - '@bufbuild/protobuf': 1.10.0 - - '@livekit/protocol@1.38.0': + '@livekit/protocol@1.39.0': dependencies: '@bufbuild/protobuf': 1.10.0