> 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-ip-auth.md). Agents can also search and read this documentation through its [MCP server](https://dataqueue.gitbook.io/voicehub-docs/~gitbook/mcp).

# Private (VPN) — IP / Username & Password

Connect a SIP trunk to VoiceHub over a private IPSec VPN (site-to-site) using IP authentication or a static username & password — no SIP registration.

**Use this when:** your trunk connects over a **private IPSec VPN (site‑to‑site)** and authenticates **without SIP registration** — either by **source IP / selector** (IP authentication) or by a **static username & password** (SIP digest per call, no `REGISTER`). SIP and RTP travel inside the tunnel.

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

## How it connects

```mermaid
flowchart LR
    sbc["Your SBC<br/>(private)"]
    ike["IPSec tunnel<br/>IKEv2 · UDP 500/4500 · ESP"]
    dq["VoiceHub in-tunnel endpoint<br/>10.50.0.9"]
    sbc <--> ike <--> dq
```

## 1. What to exchange

| VoiceHub gives you                         | You give VoiceHub                                  |
| ------------------------------------------ | -------------------------------------------------- |
| VoiceHub VPN endpoint IP *(at onboarding)* | Your VPN endpoint IP + IKE parameters              |
| In‑tunnel endpoint `10.50.0.9`             | Pre‑shared key + your SBC subnet (remote selector) |
| Codecs G.711; DTMF RFC 2833                | DID number(s); IP or username/password auth        |

## 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 SBC subnet ↔ the VoiceHub host **`10.50.0.9`** route over the tunnel.
3. Route inbound calls to the in‑tunnel endpoint **`10.50.0.9`** (port 5060), and allow **SIP 5060 + RTP 10000–20000** across the tunnel.

## 3. Authentication

* **IP authentication** – we authorize by selector/source address inside the tunnel; no credentials.
* **Username & password (no registration)** – set the SIP username & password exchanged with VoiceHub on your trunk; calls authenticate per‑INVITE with no `REGISTER`.

## 4. Add your trunk in the dashboard

In **Channels → SIP Trunking → Add SIP Trunk**, enter your **Hostname** and **Phone Number** (and **Auth Username / Password** if using credentials). 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 SBC and `10.50.0.9`.
2. Inbound: dial your DID → the agent answers with two‑way audio.
3. Outbound: VoiceHub places a test call → rings with the agreed caller ID.

| Symptom                       | Fix                                                                                                                          |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| Nothing connects              | Tunnel down or selector mismatch — confirm selectors cover both ends.                                                        |
| `403 Forbidden`               | Source address outside the agreed selector, or wrong credentials.                                                            |
| No audio                      | Allow RTP `10000–20000` (UDP) inside the tunnel.                                                                             |
| Carrier requires registration | Use [Private — SIP Registration](https://dataqueue.gitbook.io/voicehub-docs/integrations/sip-trunk/private-registration.md). |
