> For the complete documentation index, see [llms.txt](https://dataqueue.gitbook.io/voicehub-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/private-registration.md). Agents can also search and read this documentation through its [MCP server](https://dataqueue.gitbook.io/voicehub-docs/~gitbook/mcp).

# Private (VPN) — SIP Registration

Connect a SIP trunk to VoiceHub over a private IPSec VPN (site-to-site) using SIP registration.

**Use this when:** your trunk connects over a **private IPSec VPN (site‑to‑site)** **and** requires **SIP registration** — VoiceHub `REGISTER`s to your SIP server (with a username & password you issue) over the tunnel. SIP and RTP travel inside the VPN.

Other scenarios: [Private — IP / Username & Password](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/private-ip-auth.md) · [Public — SIP Registration](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/public-registration.md) · [index & ports](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk.md).

## How it connects

```mermaid
flowchart LR
    reg["Your SIP registrar / SBC"]
    ike["IPSec tunnel<br/>IKEv2 · UDP 500/4500 · ESP"]
    dq["VoiceHub in-tunnel endpoint<br/>10.33.0.3"]
    ai["AI voice agent"]
    dq -->|"REGISTER + INVITE (digest)"| ike <--> reg
    dq --> ai
```

## 1. What to exchange

| VoiceHub gives you                                    | You give VoiceHub                                         |
| ----------------------------------------------------- | --------------------------------------------------------- |
| VoiceHub VPN endpoint IP *(at onboarding)*            | Your VPN endpoint IP + IKE parameters                     |
| In‑tunnel source `10.33.0.3`                          | Pre‑shared key + your registrar subnet (remote selector)  |
| Re‑registration interval; codecs G.711; DTMF RFC 2833 | Registrar hostname + SIP **username & password** + DID(s) |

## 2. Connectivity (IPSec VPN, site‑to‑site)

1. Build an **IPSec site‑to‑site tunnel** to the VoiceHub VPN endpoint (IKEv2; open UDP 500, UDP 4500, and ESP). The pre‑shared key and endpoint IP are exchanged at onboarding.
2. Set **traffic selectors** so your registrar/SBC subnet ↔ the VoiceHub host **`10.33.0.3`** route over the tunnel.
3. Allow **SIP 5060 (+5061 TLS) + RTP 10000–20000** across the tunnel.

## 3. Authentication (registration)

1. Create a SIP trunk **account with a username & password** for VoiceHub, reachable over the tunnel.
2. Allow the VoiceHub in‑tunnel source **`10.33.0.3`** to register and exchange calls.
3. VoiceHub registers to your hostname over the VPN and keeps the registration refreshed.

## 4. Add your trunk in the dashboard

In **Channels → SIP Trunking → Add SIP Trunk**, enter your **Hostname**, **Phone Number**, and the **Auth Username / Password**. Full steps: [**Add Your SIP Trunk**](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/sip-trunk-setup.md).

## 5. Configure calls

Finish with [Configure inbound calls](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/configuring-inbound-calls.md) and [Configure outbound calls](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/configuring-outbound-calls.md).

## Test & troubleshoot

1. Tunnel **established**; selectors cover both your registrar and `10.33.0.3`.
2. VoiceHub shows as **registered** on your platform (from `10.33.0.3`).
3. Inbound: dial your DID → the agent answers; Outbound: VoiceHub places a test call.

| Symptom                      | Fix                                                           |
| ---------------------------- | ------------------------------------------------------------- |
| Registration never completes | Tunnel down, or `10.33.0.3` not in selectors.                 |
| `401` loop                   | Re‑issue username/password; confirm realm/registrar.          |
| No audio                     | Allow RTP `10000–20000` (UDP) inside the tunnel; offer G.711. |
