From 85db026f2c15dbf7a1e8abf76868d616f34a8b5b Mon Sep 17 00:00:00 2001 From: cloudwebrtc Date: Fri, 31 Oct 2025 22:26:53 +0800 Subject: [PATCH 1/3] feat: add outbound trunk config for createSipParticipant. --- packages/livekit-server-sdk/src/SipClient.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/livekit-server-sdk/src/SipClient.ts b/packages/livekit-server-sdk/src/SipClient.ts index 2b8003ec..bee0cd38 100644 --- a/packages/livekit-server-sdk/src/SipClient.ts +++ b/packages/livekit-server-sdk/src/SipClient.ts @@ -29,6 +29,7 @@ import { SIPDispatchRuleIndividual, SIPDispatchRuleInfo, SIPInboundTrunkInfo, + SIPOutboundConfig, SIPOutboundTrunkInfo, SIPParticipantInfo, SIPTransport, @@ -698,6 +699,7 @@ export class SipClient extends ServiceBase { * @param number - number to dial * @param roomName - room to attach the call to * @param opts - CreateSipParticipantOptions + * @param outbound_trunk - Optional outbound trunk configuration for sip participant. * @returns Created SIP participant */ async createSipParticipant( @@ -705,6 +707,7 @@ export class SipClient extends ServiceBase { number: string, roomName: string, opts?: CreateSipParticipantOptions, + outbound_trunk?: SIPOutboundConfig, ): Promise { if (opts === undefined) { opts = {}; @@ -716,6 +719,7 @@ export class SipClient extends ServiceBase { const req = new CreateSIPParticipantRequest({ sipTrunkId: sipTrunkId, + trunk: outbound_trunk, sipCallTo: number, sipNumber: opts.fromNumber, roomName: roomName, From 7fdd50a287314fb1d8cda5d45058726fac28a1ea Mon Sep 17 00:00:00 2001 From: cloudwebrtc Date: Fri, 31 Oct 2025 22:41:54 +0800 Subject: [PATCH 2/3] changeset. --- .changeset/four-spoons-smell.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/four-spoons-smell.md diff --git a/.changeset/four-spoons-smell.md b/.changeset/four-spoons-smell.md new file mode 100644 index 00000000..4875164d --- /dev/null +++ b/.changeset/four-spoons-smell.md @@ -0,0 +1,5 @@ +--- +'livekit-server-sdk': major +--- + +Add outbound trunk configuration for sip participant. From 1961cdbbfe6c312ba117599d1703471379c27fba Mon Sep 17 00:00:00 2001 From: cloudwebrtc Date: Mon, 3 Nov 2025 10:49:49 +0800 Subject: [PATCH 3/3] rename. --- packages/livekit-server-sdk/src/SipClient.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/livekit-server-sdk/src/SipClient.ts b/packages/livekit-server-sdk/src/SipClient.ts index bee0cd38..7e369c4f 100644 --- a/packages/livekit-server-sdk/src/SipClient.ts +++ b/packages/livekit-server-sdk/src/SipClient.ts @@ -699,7 +699,7 @@ export class SipClient extends ServiceBase { * @param number - number to dial * @param roomName - room to attach the call to * @param opts - CreateSipParticipantOptions - * @param outbound_trunk - Optional outbound trunk configuration for sip participant. + * @param outboundTrunkConfig - Optional outbound trunk configuration for sip participant. * @returns Created SIP participant */ async createSipParticipant( @@ -707,7 +707,7 @@ export class SipClient extends ServiceBase { number: string, roomName: string, opts?: CreateSipParticipantOptions, - outbound_trunk?: SIPOutboundConfig, + outboundTrunkConfig?: SIPOutboundConfig, ): Promise { if (opts === undefined) { opts = {}; @@ -719,7 +719,7 @@ export class SipClient extends ServiceBase { const req = new CreateSIPParticipantRequest({ sipTrunkId: sipTrunkId, - trunk: outbound_trunk, + trunk: outboundTrunkConfig, sipCallTo: number, sipNumber: opts.fromNumber, roomName: roomName,