From which IP is the livekit webhook sent? Is it t...
# ask-ai
s
From which IP is the livekit webhook sent? Is it the specific region into which user is connected to?
t
Thanks for reaching out, Jozef. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks for reaching out! I wanted to share some helpful info about LiveKit webhooks. They don’t come from static IP addresses, so the source IPs can change depending on how things are set up: • If you have a region-pinned setup, webhooks usually come from IPs linked to that specific region. • For global or self-hosted setups, webhooks might originate from any region where LiveKit nodes are running, depending on where the event happens. To keep things secure, it’s best to validate the JWT in the
Authorization
header of the webhook instead of relying solely on IP filtering. But if you do need to set IP restrictions, you can track the actual source IPs in your environment or feel free to reach out to LiveKit Cloud support—they’re happy to help guide you through it! Sources: Distributed Setup | LiveKit Docs | Docs::Telephony | SIP outbound trunk | LiveKit Docs | Configuring firewalls | LiveKit Docs | Webhooks | LiveKit Docs
s
The reason for the question is that when the user is connecting into Jerusalem livekit environment, I want to have our infrastructure to be triggered from the closest region. We are using AWS route53 to direct the traffic. Is it possible to use source IP from the webhook to determine the closes data center to serve it?
t
I understand you're looking to use the source IP of LiveKit webhooks to find the closest data center for routing, like with AWS Route53. I want to share that this approach might be a bit tricky since webhook source IPs aren’t documented as region-specific, and LiveKit doesn’t offer static IP ranges for webhooks. But don’t worry! Here are some friendly alternatives you might find helpful: • Take a look at the webhook payload to see if it includes any region or data center information. That can be a more reliable way to figure out where an event is coming from. • Consider using LiveKit’s API or SDKs to check the room or participant location if you need that info for your routing decisions. • If you’re working with SIP-related traffic, LiveKit does provide a documented IP range (
35.239.224.0/19
) and supports region pinning, which could be useful for similar needs. If you’d like, I’m here to help you explore these options further or assist with any other questions about detecting event origins or setting up routing. Just let me know! Sources: SIP outbound trunk | LiveKit Docs | Docs::Telephony | SIP inbound trunk | LiveKit Docs | Cloud Architecture | LiveKit Docs | Distributed Setup | LiveKit Docs