Does livekit have any params to support these data...
# ask-ai
g
Does livekit have any params to support these data requirements from Vicidial? Somehow in the outbound call the original customer number is not being passed in teh SIP refer. Are there any params vicidial except we can use in the transfer requet from lkivekit to vicidial from the below Which headers to mine (in this order) When a REFER creates a new call, different platforms populate different headers. The most useful—seen in the wild—are: 1. P-Asserted-Identity (PAI) – best chance for the real caller 2. Remote-Party-ID (RPID) 3. P-Preferred-Identity 4. History-Info (sometimes carries original caller/targets) 5. Diversion (often holds original called number, but some SBCs put caller here) 6. Any custom X- headers you can inject earlier (e.g. X-VICIdial-Caller-Id, X-Original-From, X-Call-From) 7. Fallback to From (last resort; with REFER it’s frequently “asterisk” or the trunk DID)
t
Thanks for reaching out, Snehaal. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm happy to share that LiveKit supports passing SIP headers in SIP REFER requests, including custom
X-*
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.go
s
can you provide examples of configuring these headers
t
I'm happy to share some examples of how you can configure SIP headers in LiveKit for integration with Vicidial. Let’s walk through them together: 1. Direct Header Configuration If you’re using the
TransferSIPParticipant
API, you can conveniently add headers directly to the REFER request like this:
Copy code
{
  "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:
Copy code
{
  "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