is there any way to know if the participant joined...
# ask-ai
l
is there any way to know if the participant joined the room through sip or web based call?
t
Thanks for reaching out, Parva. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You can determine if a participant joined a LiveKit room through SIP or a web-based call by checking the
Participant.Kind
property: • If the
kind
property is set to
SIP
, the participant joined via SIP. • You can also inspect the
attributes
field for SIP-specific attributes like
sip.callID
and
sip.callIDFull
. For example:
Copy code
// JavaScript example
if (participant.attributes['sip.callID']) {
    // Participant joined via SIP
}
Let me know if you need further assistance! Sources: Sources/LiveKit/Participant/Participant+Kind.swift | SIP participant | LiveKit Docs
l
any other way?
t
Besides checking the
Participant.Kind
property and SIP-specific attributes, you can also try these: • Listen to participant events: Keep an ear out for events like
participant_joined
or
participant_connected
. They’re great for checking the participant's properties and figuring out how they joined. • Monitor call status: For SIP participants, tracking call statuses like
SCS_CALL_INCOMING
,
SCS_PARTICIPANT_JOINED
, or
SCS_ACTIVE
can help you spot their connection type. If you want, I’m here to help with more details or walk you through these methods! Sources: Rooms, participants, and tracks | LiveKit Docs | SIP participant | LiveKit Docs | Making outbound calls | LiveKit Docs | livekit-protocol/src/livekit.rs