Skip to content
Open
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/afraid-garlics-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'livekit-server-sdk': patch
---

Add ringingTimeout option to transferSipParticipant
5 changes: 5 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 "SIPMediaEncryption" and "SIPOutboundConfig" are only used as type
CreateSIPDispatchRuleRequest,
CreateSIPInboundTrunkRequest,
CreateSIPOutboundTrunkRequest,
Expand Down Expand Up @@ -210,6 +210,8 @@
export interface TransferSipParticipantOptions {
playDialtone?: boolean;
headers?: { [key: string]: string };
/** Maximum time for the transfer destination to answer the call, in seconds. */
ringingTimeout?: number;
}

/**
Expand Down Expand Up @@ -789,6 +791,9 @@
transferTo: transferTo,
playDialtone: opts.playDialtone,
headers: opts.headers,
ringingTimeout: opts.ringingTimeout
? new Duration({ seconds: BigInt(opts.ringingTimeout) })
: undefined,
}).toJson();

await this.rpc.request(
Expand Down
Loading