This question originally came up in our Slack community and the thread has been consolidated here for long-term reference.
I’ve configured my outbound trunk with attributesToHeaders to pass custom SIP headers, but I can’t see them in the call logs or participant attributes.
The configuration:
{
"headersToAttributes": {
"xCompanyId": "company_id"
},
"attributesToHeaders": {
"companyId": "X-CompanyId"
},
"includeHeaders": "SIP_ALL_HEADERS"
}
Is there something I’m missing?
For outbound calls, passing custom SIP headers works by including them directly in the CreateSIPParticipantRequest headers field.
The trunk-level attributesToHeaders may not work as expected due to a known issue:
opened 06:13PM - 14 May 25 UTC
Hello, I am able to make calls in to LLM agent without issue. The livekit ecosys… tem is really great. However, I am having a problem passing the INVITE headers along to the participant attributes.
inbound-trunk.json
`
{
"trunk": {
"include_headers": 2,
"headers_to_attributes: {
"X-Test": "xTest"
},
"name": "{REDACTED} inbound trunk",
"numbers": ["+1{REDACTED}"]
}
}
`
I have tested using the v1.0.0 tag of the SIP service and v1.8.4 of livekit-server. I have tried various permutations and combinations of include_headers values along with or without headers_to_attributes and attributes_to_headers. I have used the python SDK as well as the lk-cIi to create the inbound trunk. I apologize if I am missing something or have something misconfigured. Any suggestions on how to get this working or is this feature not yet implemented?
Thanks
Pass the headers manually in the CreateSIPParticipantRequest to work around this.