Skip to content

Commit 69f0624

Browse files
TEL-912: Return TransferSIPParticipantResponse on TransferSIPParticipantRequests (#786)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent b176202 commit 69f0624

7 files changed

Lines changed: 360 additions & 269 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:

livekit-protocol/livekit/protocol/agent_dispatch.py

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)