hundreds-rainbow-68836
02/25/2026, 7:19 AMtall-airline-16756
02/25/2026, 7:19 AMtall-airline-16756
02/25/2026, 7:19 AMTransferSIPParticipantRequest. The participant identity is the participant's identity field (not a separate numeric ID). You can retrieve it from the room's list of participants and then use that value in your transfer call.
Below are concise options and example code to get the participant_identity.
1) Get the identity by listing participants in a room
• Use room.list_participants and read participant.identity.
• Optionally filter by participant.kind to find SIP participants.
Example (async):
from livekit import api
async def get_participant_identity(room_name: str) -> str:
async with api.LiveKitAPI() as livekit_api:
resp = await livekit_api.room.list_participants(
api.ListParticipantsRequest(room=room_name)
)
# Find first SIP participant
for p in resp.participants:
if p.kind == api.ParticipantInfo.ParticipantKind.PARTICIPANT_KIND_SIP:
return p.identity
# Fallback: return first participant identity if any
if resp.participants:
return resp.participants[0].identity
raise Exception("No participants found in room")
2) Track identity at creation time (recommended when you control SIP creation)
• When you create a SIP participant, set and store the participant_identity you pass in.
• Reuse that stored identity later for transfer.
Example snippet when creating a SIP participant:
await livekit_api.sip.create_sip_participant(
api.CreateSIPParticipantRequest(
room_name="my-room",
participant_identity="caller-123", # choose and store this
sip_call_to="+15555555555",
sip_trunk_id="ST_..."
)
)
3) Use the identity in your transfer function
• Once you have the identity, plug it into TransferSIPParticipantRequest exactly as in your original transfer code.
If you want, tell me which room name you’re working with or whether you prefer to find the SIP participant by some property (caller number, metadata, or the first SIP participant). I can then show a tailored example that filters participants the way you need.
Sources: Preserve caller ID during SIP transfers with Twilio | LiveKit | How to do call transfers with Five9 | LiveKit | SIP Lifecycle Management Agent | LiveKit Documentation | Outbound Calling Script | LiveKit Documentation