green-electrician-12072
09/09/2025, 5:14 PMtall-airline-16756
09/09/2025, 5:14 PMtall-airline-16756
09/09/2025, 5:15 PMX-* headers, which can be really helpful for integrations with systems like Vicidial.
To pass specific SIP headers during a REFER transfer to Vicidial, here are a couple of friendly options you can try:
1. You can use the headers field in the TransferSIPParticipant API request to inject headers directly. This way, you can include headers like P-Asserted-Identity, Remote-Party-ID, P-Preferred-Identity, History-Info, Diversion, or any custom X-* headers you might need.
2. Another approach is to pre-configure attribute-to-header mappings using attributes_to_headers. This helps ensure that relevant participant attributes are automatically included as X-* headers in the REFER request, making things smoother for you.
If you’d like, I’m here to help guide you through configuring these headers or using the API—just let me know!
Sources: SIP overview | LiveKit Docs | livekit/livekit_sip.pb.go | pkg/sip/inbound.gosilly-house-98558
10/18/2025, 1:20 PMtall-airline-16756
10/18/2025, 1:21 PMTransferSIPParticipant API, you can conveniently add headers directly to the REFER request like this:
{
"headers": {
"X-Transfer-Reason": "customer-request",
"X-Original-Caller": "+15551234567"
}
}
2. Attribute-to-Header Mapping
Another great option is mapping LiveKit participant attributes to SIP headers by using the attributes_to_headers field in your trunk or participant configuration:
{
"attributes_to_headers": {
"customer_id": "X-Customer-ID",
"call_priority": "X-Call-Priority",
"department": "X-Department"
}
}
This way, participant attributes like customer_id are automatically included as X-Customer-ID headers in REFER requests, which can be really handy.
3. Automatic Header Mapping
LiveKit also offers automatic header mapping using SIPHeaderOptions, giving you flexible control:
• SIP_NO_HEADERS: Only headers you explicitly define are mapped.
• SIP_X_HEADERS: Maps all X-* headers to sip.h.x-* attributes.
• SIP_ALL_HEADERS: Maps all headers to sip.h.* attributes.
If you’d like, I’m here to help you design a configuration that fits your specific needs or to clarify any part of these examples. Just let me know!
Sources: rpc/sip.pb.go | SIP participant | LiveKit Docs