how can I add headers to CreateSIPParticipantReque...
# ask-ai
m
how can I add headers to CreateSIPParticipantRequest for outbound call
t
Thanks for reaching out, Extra. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To add headers to a
CreateSIPParticipantRequest
for an outbound call, you can use the
headers
property in your request. This allows you to include custom SIP headers when making outbound calls. Here’s an example of how you can structure your request:
Copy code
{
  "sip_trunk_id": "<your-trunk-id>",
  "sip_call_to": "<phone-number-to-dial>",
  "room_name": "my-sip-room",
  "participant_identity": "sip-test",
  "participant_name": "Test Caller",
  "headers": {
    "X-Custom-Header": "custom-value",
    "Another-Header": "another-value"
  }
}
The
headers
property accepts an object where each key-value pair represents a SIP header name and its value that will be included in the outbound call request. Sources: CreateSipParticipantOptions | LiveKit JS Server SDK - v2.9.7
m
what can I do with the include_headers parameter
t
The
include_headers
parameter in the
CreateSIPParticipantRequest
allows you to specify how SIP headers should be mapped to attributes. It accepts a
SIPHeaderOptions
type and is an optional parameter. This parameter can be used when creating a SIP participant to make outgoing calls, enabling you to control how SIP headers are handled and mapped to participant attributes. Sources: SIP APIs | LiveKit Docs
m
can you give me an example of how they are set
t
I'm sorry, but I don't have the information you need at the moment. If you would like a member of the LiveKit team to respond, please ask your question in one of the other channels.
m
what does this do:
Copy code
include_headers=SIP_NO_HEADERS