how can i set the Region pinning
# ask-ai
s
how can i set the Region pinning
t
Thanks for reaching out, Mostafa. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To set up Region Pinning in LiveKit, here’s a friendly guide to help you through the process: For Inbound Calls: • Start by using a region-based endpoint when you configure your SIP trunking provider. The endpoint format looks like this:
{sip_subdomain}.{region_name}.sip.livekit.cloud
. • Just replace
{sip_subdomain}
with your LiveKit project ID (without the
p_
prefix) and
{region_name}
with one of the supported regions:
eu
,
india
,
sa
, or
us
. • For example, if you want to pin to India, your endpoint would be:
bwwn08a2m4o.india.sip.livekit.cloud
. • Don’t forget to update your SIP provider’s Origination URI with this region-based endpoint. For Outbound Calls: • When creating an outbound SIP trunk via the API or CLI, use the
destination_country
parameter. • Set this parameter to the two-letter ISO 3166-1 alpha-2 country code that matches your target (for example,
"in"
for India). • Here’s an example JSON configuration to guide you:
Copy code
{
  "trunk": {
    "name": "My outbound trunk",
    "phone_number": "+15105550100",
    "username": "myusername",
    "password": "mypassword",
    "destination_country": "in"
  }
}
• Then, create the trunk with this command:
lk sip outbound create outbound-trunk.json
. If you have any questions or need a hand with any step, feel free to reach out—I’m here to help! Sources: SIP cloud and region pinning | LiveKit Docs | Create and configure a Twilio SIP trunk | LiveKit Docs | Create and configure a Plivo SIP trunk | LiveKit Docs | Create and configure Telnyx SIP trunk | LiveKit Docs | SIP outbound trunk | LiveKit Docs
s
is that availbe for for sip only not for the normal meetings at livekit?
t
I'm happy to share that region pinning isn't just for SIP—it’s also available for regular meetings in LiveKit! For meetings, we use protocol-based region pinning, which helps keep your network traffic within specific geographical regions. This is especially helpful if you’re aiming to meet data residency requirements like GDPR. This protocol-based region pinning is available for customers on the Scale plan or higher. If you’d like to enable it, you can simply request it through the LiveKit Cloud support option in the menu. Please feel free to reach out if you’d like more details or need any help getting this set up—I’m here for you! Sources: Region pinning | LiveKit Docs | src/room/RegionUrlProvider.ts | livekit-android-sdk/src/main/java/io/livekit/android/room/RegionUrlProvider...