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

# Route SIP Through a WireGuard Interface

> Carry a peer's SIP traffic to Telnyx inside its WireGuard tunnel by creating the interface with enable_sip_trunking.

With `enable_sip_trunking` set to `true`, a WireGuard Interface carries its peers' SIP traffic to Telnyx inside the tunnel. The peer configuration adds the Telnyx SIP prefixes to `AllowedIPs`, so traffic to `sip.telnyx.com` and `sip.telnyx.eu` goes via the interface instead of the peer's default route.

The diagram shows a PBX or SIP client at `172.27.0.2` sending SIP through its
WireGuard tunnel to a WireGuard Interface at `172.27.0.1` created with
`enable_sip_trunking` set to `true`. The interface forwards the SIP traffic
across the Telnyx backbone to Telnyx SIP, including `sip.telnyx.com` and
`sip.telnyx.eu`. Without the flag, the peer's SIP traffic goes via its default
route.

## Setup

1. Create the interface with `enable_sip_trunking` set to `true`. Interfaces have no update operation, so set the flag at creation:

   ```json theme={null}
   {
     "network_id": "91446ee3-9f6a-49ed-8d9b-1bd3e1529324",
     "name": "wg-sip-ashburn",
     "region_code": "ashburn-va",
     "enable_sip_trunking": true
   }
   ```

2. Wait for `provisioned`, create a peer, and retrieve its configuration, as in the [Quick Start](/docs/network/wireguard-interfaces/quick-start). `AllowedIPs` now lists the Telnyx SIP prefixes after the interface subnet:

   ```ini theme={null}
   [Peer]
   PublicKey = jSSaLXXVEzYUM8N8IM+65YuuScL+Sf2DytZCdLhFSGo=
   AllowedIPs = 172.27.0.0/24, 192.76.120.10/32, 185.246.41.140/32, ...
   Endpoint = 64.16.243.15:5016
   PersistentKeepalive = 1
   ```

   The list above is abbreviated. Load the configuration as returned.

## Verify

The first hop to `sip.telnyx.com` is the interface address:

```bash theme={null}
user@localhost ~ % traceroute sip.telnyx.com
traceroute to sip.telnyx.com (192.76.120.10), 64 hops max, 40 byte packets
 1  172.27.0.1 (172.27.0.1)  6.708 ms  7.726 ms  7.133 ms
```
