Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/four-spoons-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'livekit-server-sdk': major
---

Add outbound trunk configuration for sip participant.
4 changes: 4 additions & 0 deletions packages/livekit-server-sdk/src/SipClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
RoomConfiguration,
SIPHeaderOptions,
} from '@livekit/protocol';
import {

Check warning on line 11 in packages/livekit-server-sdk/src/SipClient.ts

View workflow job for this annotation

GitHub Actions / Formatting

Imports "SIPOutboundConfig" are only used as type
CreateSIPDispatchRuleRequest,
CreateSIPInboundTrunkRequest,
CreateSIPOutboundTrunkRequest,
Expand All @@ -29,6 +29,7 @@
SIPDispatchRuleIndividual,
SIPDispatchRuleInfo,
SIPInboundTrunkInfo,
SIPOutboundConfig,
SIPOutboundTrunkInfo,
SIPParticipantInfo,
SIPTransport,
Expand Down Expand Up @@ -698,13 +699,15 @@
* @param number - number to dial
* @param roomName - room to attach the call to
* @param opts - CreateSipParticipantOptions
* @param outboundTrunkConfig - Optional outbound trunk configuration for sip participant.
* @returns Created SIP participant
*/
async createSipParticipant(
sipTrunkId: string,
number: string,
roomName: string,
opts?: CreateSipParticipantOptions,
outboundTrunkConfig?: SIPOutboundConfig,
): Promise<SIPParticipantInfo> {
if (opts === undefined) {
opts = {};
Expand All @@ -716,6 +719,7 @@

const req = new CreateSIPParticipantRequest({
sipTrunkId: sipTrunkId,
trunk: outboundTrunkConfig,
sipCallTo: number,
sipNumber: opts.fromNumber,
roomName: roomName,
Expand Down