narrow-laptop-64001
08/20/2025, 1:29 PMawait self.ctx.api.sip.create_sip_participant(
api.CreateSIPParticipantRequest(
room_name=self.ctx.room.name,
sip_trunk_id=outbound_trunk_id,
sip_call_to=phone_number,
participant_identity=user_identity,
)
)tall-airline-16756
08/20/2025, 1:29 PMtall-airline-16756
08/20/2025, 1:30 PMCreateSIPParticipantRequest method, the Twilio Call SID doesn’t pop up right away. Instead, it shows up as a participant attribute once the SIP participant has joined and connected to the room.
Here’s a simple way to grab that Twilio Call SID:
1. Create the SIP participant with CreateSIPParticipantRequest.
2. Wait for them to actually join the room.
3. Then, check out the participant’s attributes to find the Twilio Call SID under the key sip.twilio.callSid.
To make it clearer, here’s a quick example in Python:
from livekit import rtc
# Check if the participant is a SIP participant
if participant.kind == rtc.ParticipantKind.PARTICIPANT_KIND_SIP:
twilio_call_sid = participant.attributes.get('sip.twilio.callSid')
print(f"Twilio Call SID: {twilio_call_sid}")
If you have any questions or want me to walk you through it, just let me know—I’m here to help!
Sources: SIP participant | LiveKit Docs | SIP participant | LiveKit Docs | pkg/service/sip.go