busy-lunch-15701
10/22/2025, 11:14 AMtall-airline-16756
10/22/2025, 11:15 AMtall-airline-16756
10/22/2025, 11:16 AMsip_call_incoming event. This event is part of the SIP analytics system and gets triggered whenever an inbound SIP call comes in. To get this set up smoothly, here’s what you can do:
• First, set up your webhook endpoint to handle SIP-related events.
• Then, configure your LiveKit server to send webhooks to your endpoint.
• Finally, make sure to handle the incoming webhook payload, which follows the sip:<call_id> pattern.
If you’d like, I’m here to help with any more details or walk you through the setup. Just let me know!
Sources: livekit/livekit_analytics.pb.go | Webhook & Event System | livekit/livekit_composite | DeepWiki | Accepting inbound calls | LiveKit Docs | livekit-protocol/livekit/protocol/sip.pybusy-lunch-15701
10/22/2025, 12:03 PMsame => n,Set(PJSIP_HEADER(add,X-SIP-Call-Received)=${NOW})
i have this line on my asterisk server before dialing to livekit.
on livekit how can i access this header?tall-airline-16756
10/22/2025, 12:04 PMX-SIP-Call-Received header in LiveKit! You can do this by mapping it to a participant attribute. Here’s a simple way to get started:
1. Explicit Header Mapping: Set up your SIP trunk to map the header like this:
{
"headers_to_attributes": {
"X-SIP-Call-Received": "call_received_timestamp"
}
}
1. Automatic Header Mapping: Alternatively, you can use the include_headers option to automatically map all X-* headers. This will make the header available as sip.h.x-sip-call-received.
2. Then, you can access the mapped attribute directly through the participant’s attributes in your application.
If you’d like, I’m here to guide you through configuring this or help you access these attributes in your SDK—just let me know!
Sources: protobufs/livekit_sip.proto | SIP participant | LiveKit Docs | SIP APIs | LiveKit Docsbusy-lunch-15701
10/22/2025, 12:06 PMtall-airline-16756
10/22/2025, 12:06 PMheaders_to_attributes parameter is explained—it lets you map custom SIP headers (such as X-SIP-Call-Received) to participant attributes. This can be super helpful for routing calls or grabbing custom data.
If you'd like, I’m here to help you find the exact part or walk you through how to set it up. Just let me know!
Sources: SIP APIs | LiveKit Docs | livekit-protocol/src/livekit.rs | SIP overview | LiveKit Docsbusy-lunch-15701
10/22/2025, 12:08 PMtall-airline-16756
10/22/2025, 12:08 PMbusy-lunch-15701
10/22/2025, 12:12 PMtall-airline-16756
10/22/2025, 12:14 PMtrunk-config.json) where you’ll put your header mapping. For example:
{
"name": "trunk-with-header-mapping",
"headers_to_attributes": {
"X-SIP-Call-Received": "call_received_timestamp"
}
}
1. Next, run the CLI command to update your SIP trunk like this:
# For inbound trunk
lk sip inbound update --id your-trunk-id trunk-config.json
# For outbound trunk
lk sip outbound update --id your-trunk-id trunk-config.json
If you’d like, I’m here to help you create that JSON file or walk you through the command—just let me know!
Sources: cmd/lk/examples/rtmp-ingress.json | SIP APIs | LiveKit Docs | livekit-protocol/src/livekit.rs