many-forest-60185
11/03/2025, 6:44 PMtall-airline-16756
11/03/2025, 6:44 PMtall-airline-16756
11/03/2025, 6:44 PMmany-forest-60185
11/03/2025, 6:46 PMtall-airline-16756
11/03/2025, 6:46 PMX-Twilio-CallSid SIP header to the participant attribute sip.twilio.callSid. You can easily find this attribute in the participant_attributes map, which is accessible either during dispatch rule evaluation or by checking participant information after your SIP participant joins a room.
Here’s a simple way to retrieve it:
• Use a LiveKit server SDK or make a direct RPC call to get participant or dispatch rule data.
• Look into the participant_attributes map.
• Grab the value of sip.twilio.callSid.
For instance, in a Node.js agent, you could do something like this:
// Check if the participant is a SIP participant and log the Twilio Call SID
if (participant.kind === Participant.Kind.SIP) {
const callSid = participant.attributes['sip.twilio.callSid'];
console.log('Twilio Call SID:', callSid);
}
Just a quick note: make sure you're using Twilio SIP Trunking, as this header is only available in those scenarios. If you have any questions or need a hand, feel free to reach out—I’m here to help!
Sources: pkg/sip/participant.go | protobufs/rpc/sip.proto | README.md | packages/sip--um-actually/README.md | Create and configure a Twilio SIP trunk | LiveKit Docs