> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Geo Fencing

> Implement geographic content restrictions with Zero Runtime's Geo Fencing feature. Essential for compliance and tailored content delivery based on user location.

Geo‑fencing allows you to restrict inbound and outbound calls based on the caller's geographic location. It ensures that SIP traffic is routed only through approved geographic regions, helping maintain compliance, security, and regional telephony rules.

Users connect to a specific regional Zero Runtime server based on the geoRegion value they set. In this example, even though some users are located in India, a user who sets geoRegion to 'US' is routed through the US server, and all users are then bridged together inside the same Zero Runtime room.

<Note>
  **`videosdk.live` is expected here.** Zero Runtime runs on VideoSDK's real-time infrastructure, so its SIP, media, and API endpoints are served from the `videosdk.live` domain. Use the hostnames and URLs exactly as shown.
</Note>

<img src="https://mintcdn.com/zeroruntime/uUss70BCrqiRaHBD/telephony/diagrams/geo-fencing.svg?fit=max&auto=format&n=uUss70BCrqiRaHBD&q=85&s=63f5255f6b48e4fb3a9df8a6908464e0" className="block w-full my-4" width="1400" height="580" data-path="telephony/diagrams/geo-fencing.svg" />

## Inbound Calls

For inbound calls, Geo-fencing lets you choose which regional SIP server should handle the call. This can be configured using the SIP URI or through the Zero Runtime Dashboard.

<Tabs>
  <Tab title="Via SIP URI">
    You can specify the region directly in the SIP Inbound Gateway URI:

    ```text theme={null}
    sip:$YOUR_ORG_ID.<region>.sip.videosdk.live
    ```

    Replace `$YOUR_ORG_ID` with your actual Zero Runtime organization ID and `<region>` with one of the supported region codes.

    **Available region codes:**

    * `in001` → India
    * `us002` → United States
  </Tab>

  <Tab title="Via Dashboard">
    Configure the geo region in the [Zero Runtime dashboard](https://app.zeroruntime.ai/telephony/inbound-gateways).

    <Frame>
      <img src="https://assets.videosdk.live/images/inbound1.png" alt="Zero Runtime Inbound Gateway" />
    </Frame>
  </Tab>
</Tabs>

## Outbound Calls

When making outbound calls, you can control the SIP server region via the Dashboard or the API Request.

<Tabs>
  <Tab title="Via API">
    You can control the SIP server region via the `geoRegion` property in the API request. If `geoRegion` is omitted, Zero Runtime selects the region automatically based on the dialed number's location.

    ```bash theme={null}
    curl --request POST \
      --url https://api.videosdk.live/v2/sip/outbound-gateways \
      --header 'Authorization: YOUR_ZRT_AUTH_TOKEN' \
      --header 'Content-Type: application/json' \
      --data '{
        "name": "My Outbound Gateway",
        "numbers": ["+1234567890"],
        "address": "sip.provider.com",
        "geoRegion" : "us002",
        "auth": {
          "username": "sip_username",
          "password": "sip_password"
        }
      }'
    ```
  </Tab>

  <Tab title="Via Dashboard">
    Set the desired region in the [Zero Runtime dashboard](https://app.zeroruntime.ai/telephony/outbound-gateways).

    <Frame>
      <img src="https://assets.videosdk.live/images/outbound.png" alt="Zero Runtime Outbound Gateway" />
    </Frame>
  </Tab>
</Tabs>
