Skip to content

Commit b00550b

Browse files
Return TransferSIPParticipantResponse on TransferSIPParticipantRequests
1 parent 8d73982 commit b00550b

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

livekit-api/livekit/api/sip_service.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
DeleteSIPDispatchRuleRequest,
3232
CreateSIPParticipantRequest,
3333
TransferSIPParticipantRequest,
34+
TransferSIPParticipantResponse,
3435
SIPParticipantInfo,
3536
SIPTransport,
3637
SIPMediaConfig,
@@ -832,8 +833,8 @@ async def transfer_sip_participant(
832833
transfer: TransferSIPParticipantRequest,
833834
*,
834835
timeout: Optional[float] = None,
835-
) -> SIPParticipantInfo:
836-
"""Transfer a SIP participant to a different room.
836+
) -> TransferSIPParticipantResponse:
837+
"""Transfer a SIP participant to another number or SIP endpoint.
837838
838839
Args:
839840
transfer: Request containing transfer details
@@ -842,7 +843,10 @@ async def transfer_sip_participant(
842843
longer timeout when unset.
843844
844845
Returns:
845-
Updated SIP participant information
846+
The outcome of the transfer: its id, status, reason, and the SIP
847+
status when the outcome came from a SIP response. A status other
848+
than successful means the transfer did not complete, even when no
849+
error was raised.
846850
"""
847851
# Transferring a call dials a phone, which takes longer than a normal
848852
# call, so keep the request alive past ringing. Pin the ring window so the
@@ -861,7 +865,7 @@ async def transfer_sip_participant(
861865
),
862866
sip=SIPGrants(call=True),
863867
),
864-
SIPParticipantInfo,
868+
TransferSIPParticipantResponse,
865869
timeout=client_timeout,
866870
)
867871
except ServerError as e:

0 commit comments

Comments
 (0)