Skip to content

Commit 7754b88

Browse files
authored
feat: add outbound trunk config for createSipParticipant. (#563)
* feat: add outbound trunk config for createSipParticipant. * changeset. * rename.
1 parent f38174e commit 7754b88

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/four-spoons-smell.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'livekit-server-sdk': major
3+
---
4+
5+
Add outbound trunk configuration for sip participant.

packages/livekit-server-sdk/src/SipClient.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import {
2929
SIPDispatchRuleIndividual,
3030
SIPDispatchRuleInfo,
3131
SIPInboundTrunkInfo,
32+
SIPOutboundConfig,
3233
SIPOutboundTrunkInfo,
3334
SIPParticipantInfo,
3435
SIPTransport,
@@ -698,13 +699,15 @@ export class SipClient extends ServiceBase {
698699
* @param number - number to dial
699700
* @param roomName - room to attach the call to
700701
* @param opts - CreateSipParticipantOptions
702+
* @param outboundTrunkConfig - Optional outbound trunk configuration for sip participant.
701703
* @returns Created SIP participant
702704
*/
703705
async createSipParticipant(
704706
sipTrunkId: string,
705707
number: string,
706708
roomName: string,
707709
opts?: CreateSipParticipantOptions,
710+
outboundTrunkConfig?: SIPOutboundConfig,
708711
): Promise<SIPParticipantInfo> {
709712
if (opts === undefined) {
710713
opts = {};
@@ -716,6 +719,7 @@ export class SipClient extends ServiceBase {
716719

717720
const req = new CreateSIPParticipantRequest({
718721
sipTrunkId: sipTrunkId,
722+
trunk: outboundTrunkConfig,
719723
sipCallTo: number,
720724
sipNumber: opts.fromNumber,
721725
roomName: roomName,

0 commit comments

Comments
 (0)