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

# Public — SIP Registration

Connect a public-internet SIP trunk to VoiceHub using SIP registration — VoiceHub registers to your SIP server with a username & password.

**Use this when:** your trunk connects over the **public internet** and requires **SIP registration** — VoiceHub `REGISTER`s to your SIP server with a username & password you issue (common for retail / hosted‑PBX trunks and dynamic source IPs).

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
    reg["Your SIP registrar / SBC<br/>(issues credentials)"]
    dq["VoiceHub<br/>registers to you · 34.18.158.117"]
    ai["AI voice agent"]
    dq -->|"REGISTER + INVITE (digest)<br/>5060 / 5061 TLS"| reg
    dq --> ai
```

## 1. What to exchange

| VoiceHub gives you                       | You give VoiceHub                                          |
| ---------------------------------------- | ---------------------------------------------------------- |
| Source IP `34.18.158.117` (allowlist it) | Registrar / SIP server hostname                            |
| Re‑registration interval (e.g. 60 s)     | SIP **username & password** for our trunk (+ realm if any) |
| Codecs G.711; DTMF RFC 2833              | DID number(s); transport (UDP/TCP or **TLS 5061**)         |

## 2. Connectivity (public internet)

1. Allow VoiceHub's source IP **`34.18.158.117`** through your firewall for **SIP 5060** (and **5061** for TLS) and **RTP 10000–20000**.
2. Route your DID(s) to the SIP account VoiceHub registers on.

## 3. Authentication (registration)

1. Create a SIP trunk **account with a username & password** for VoiceHub on your platform.
2. VoiceHub registers to your hostname with those credentials and keeps the registration refreshed.
3. For encrypted signaling, enable **TLS (5061)** and share your TLS details.

## 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. Confirm VoiceHub shows as **registered** on your platform (from `34.18.158.117`).
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                                                         |
| ---------------------------------- | ----------------------------------------------------------- |
| Registration `401` loop / rejected | Re‑issue username/password; confirm realm / registrar host. |
| Registered but inbound fails       | Route the DID to the account VoiceHub registers on.         |
| No audio                           | Open RTP `10000–20000` (UDP); offer G.711.                  |
| Want encryption                    | Enable TLS (5061) and share TLS details.                    |
