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

# Connect a Dinstar SIP Gateway to VoiceInfra

> Step-by-step guide to connecting a Dinstar SIP gateway (DAG, MTG, UC or C60 series) to VoiceInfra for inbound and outbound AI calling over your existing PSTN lines.

A Dinstar gateway lets your existing phone lines reach VoiceInfra without changing carriers. The gateway bridges your FXO/FXS ports to VoiceInfra over SIP, so an AI agent can answer incoming calls and place outgoing ones.

This guide covers **two-way calling** — inbound and outbound.

<Tip>
  **Menu names vary by Dinstar model and firmware.** DAG, MTG, UC, and C60 series all label things slightly differently. The steps below follow the common pattern; if a menu name differs, look for the nearest equivalent.
</Tip>

## Prerequisites

| Requirement | Why |
| - | - |
| A VoiceInfra workspace on an active subscription | Agents and numbers need a plan. |
| **Workspace Admin** role | Only an admin can add phone numbers. |
| Access to the Dinstar web admin panel | Default login is usually `admin` / `admin`. |
| Your numbers in **E.164** format | For example `+1234567890`. |

## Before you configure either side

You will need three values that VoiceInfra provides: the **SIP host**, the **firewall whitelist IP**, and the **recommended codecs**.

<Warning>
  **Copy these from the portal, not from this page.** The SIP host and whitelist IP are **region-scoped** — they differ depending on which region your workspace lives in. The authoritative values are shown in your portal on **Phone Numbers → your number → Connection details**, and each row has a copy button.
</Warning>

There is more detail on this in [PBX Extensions](/docs/channels/pbx-extensions).

## Step 1: Configure your Dinstar

### 1.1 Set the routing parameter

Go to **Call & Routing → Routing Parameter** and set:

* **Calls from IP** → **Route before manipulation**
* **Calls from Tel** → **Route before manipulation**

### 1.2 Create an IP trunk

Go to **Call & Routing → IP Trunk** and click **Add**:

| Field | Value |
| - | - |
| Description | VoiceInfra |
| Trunk Status | Enable |
| Register | **Enable** — so the Dinstar registers with VoiceInfra |
| Address / Server IP | `sip.voiceinfra.ai` |
| Port | `5060` (UDP/TCP) or `5061` (TLS) |
| Transport | UDP, TCP, or TLS — **must match what you choose on VoiceInfra** |
| Username | The inbound auth username you set on VoiceInfra (step 2.4) |
| Auth Username | The same as Username, unless your provider requires otherwise |
| Password | The inbound auth password you set on VoiceInfra (step 2.4) |
| Outbound Proxy | Leave blank unless your network needs a specific SIP proxy |
| Registration Expires | 300 seconds |

<Note>
  If your Dinstar sits behind NAT, also enable **NAT Traversal** and set **External IP** to the gateway's public IP. Skipping this is the most common cause of one-way audio.
</Note>

### 1.3 Set codecs

Set the codec priority for this trunk, under **IP Profile** or **Codec Settings**:

| Priority | Codec |
| - | - |
| 1st | G.722 |
| 2nd | G.711 A-law |
| 3rd | G.711 μ-law |

### 1.4 Configure call routing

You need one rule in each direction.

**Inbound — PSTN → Dinstar → VoiceInfra**

Go to **Call & Routing → Tel → IP/Tel Routing** and create a rule:

* **Calls From** — your FXO port or port group (where the PSTN lines connect)
* **Calls To** — the VoiceInfra IP trunk you just created
* **Caller/Called Prefix** — any, or restrict by prefix if you need to

**Outbound — VoiceInfra → Dinstar → PSTN**

Go to **Call & Routing → IP → Tel Routing** and create a rule:

* **Calls From** — the VoiceInfra IP trunk
* **Calls To** — your FXO port or port group
* **Caller/Called Prefix** — any

<Note>
  A **lower index number means higher priority**, so priority 0 runs first.
</Note>

### 1.5 Save and verify

Click **OK** or **Apply**, then check **Status → SIP Trunk**. The VoiceInfra trunk should show **Registered**.

If it shows unregistered, jump to [Troubleshooting](#troubleshooting) before continuing — nothing downstream will work until registration succeeds.

## Step 2: Configure VoiceInfra

<Steps>
  <Step title="Add a custom SIP number">
    Go to **Phone Numbers → Add Phone Number** and select **Custom SIP Number** from the wizard.
  </Step>

  <Step title="Choose the trunk type">
    * **Inbound Only** — receive calls from Dinstar only
    * **Outbound Only** — place calls through Dinstar only
    * **Both** — full two-way calling **(recommended)**

    Your choice here must match the routing rules you configured in step 1.4. If you picked **Both**, you need both rules.
  </Step>

  <Step title="Enter the basic details">
    | Field | Value |
    | - | - |
    | Phone Number | Your number in E.164, for example `+1234567890` |
    | Friendly Name | A label you will recognise, for example "Main Office Dinstar" |
    | Noise cancellation | **Enable** — recommended for AI agents |
  </Step>

  <Step title="Configure inbound">
    Shown when you chose **Inbound Only** or **Both**.

    | Field | Value |
    | - | - |
    | Allowed IP Addresses | Your Dinstar's public IP in CIDR notation, for example `203.0.113.50/32` |
    | Allowed Numbers | Optional — restrict inbound calls to specific caller numbers in E.164 |
    | Username | Create one, for example `dinstar-main`. **Must match the Dinstar.** |
    | Password | Create a strong one. **Must match the Dinstar.** |

    <Warning>
      The username and password here are the same ones you entered on the Dinstar in step 1.2. If they do not match exactly, the trunk will not register.
    </Warning>
  </Step>

  <Step title="Configure outbound">
    Shown when you chose **Outbound Only** or **Both**.

    | Field | Value |
    | - | - |
    | SIP URI | Your Dinstar's public IP or FQDN, for example `203.0.113.50` or `203.0.113.50:5060` |
    | Username | The SIP username configured on your Dinstar |
    | Password | The SIP password configured on your Dinstar |
    | Transport Protocol | UDP, TCP, TLS, or AUTO — **must match the Dinstar** |
  </Step>

  <Step title="Set media encryption">
    Leave **Disabled** unless your Dinstar supports SRTP. **Require** rejects any call that cannot be encrypted, so only select it if both sides are configured for it.
  </Step>

  <Step title="Create and assign">
    Click **Create**. Then select the new number in the list and assign an **Inbound AI Assistant** and/or an **Outbound AI Assistant**. A number with no assistant assigned will connect but nothing will answer.
  </Step>
</Steps>

## Step 3: Test

| Direction | How to test | What should happen |
| - | - | - |
| **Inbound** | Call your number from an external phone | Your AI assistant answers |
| **Outbound** | Trigger an outbound call from your AI assistant | The destination phone rings |

<Note>
  A number with no assistant assigned will connect but nothing will answer. If calls reach VoiceInfra and then go silent, that is the first thing to check.
</Note>

Recordings, transcripts, and AI summaries work on gateway calls exactly as on any other channel, so they appear in Call Logs alongside everything else.

## Troubleshooting

| Symptom | What to check |
| - | - |
| Dinstar trunk shows **Unregistered** | SIP host is `sip.voiceinfra.ai`; the port is correct; **Register** is enabled; credentials match on both sides; outbound SIP (5060/5061) is allowed through your firewall |
| Inbound calls never reach VoiceInfra | The **Tel → IP/Tel Routing** rule exists: Calls From your FXO port → Calls To the VoiceInfra IP trunk |
| Inbound calls arrive but no agent answers | An AI assistant is assigned to the number for inbound calls |
| Outbound calls fail | The **IP → Tel Routing** rule exists: Calls From the VoiceInfra IP trunk → Calls To your FXO port. Your firewall must allow inbound SIP from the whitelist IP shown in the portal. Credentials must match. |
| One-way or no audio | RTP ports (typically `10000–20000`) are open; **NAT Traversal** is enabled and **External IP** is set on the Dinstar |
| Poor call quality | G.722 and G.711 are enabled on both sides; network latency to the SIP host is acceptable |
| Calls drop quickly | **Registration Expires** is at least 300 seconds; session timers are enabled |

## Quick reference

**VoiceInfra**

| Parameter | Value |
| - | - |
| SIP host | `sip.voiceinfra.ai` |
| Firewall whitelist IP | **Copy from the portal** — it is region-scoped |
| Supported transports | UDP, TCP, TLS |
| Supported codecs | G.722, G.711 A-law, G.711 μ-law |

**Dinstar**

| Parameter | Value |
| - | - |
| SIP server | `sip.voiceinfra.ai` |
| SIP port | `5060` (UDP/TCP) or `5061` (TLS) |
| Codecs, in priority order | 1. G.722 2. G.711 A-law 3. G.711 μ-law |
| Registration expires | 300 seconds |
| NAT traversal | Enable if behind NAT |

## Setup checklist

* [ ] Dinstar trunk created, pointing at `sip.voiceinfra.ai`
* [ ] Codecs set to G.722, G.711 A-law, G.711 μ-law
* [ ] Routing rules configured in both directions
* [ ] Custom SIP number created on VoiceInfra with **matching** credentials
* [ ] AI assistant assigned for inbound and/or outbound
* [ ] Dinstar shows **Registered**
* [ ] Inbound and outbound test calls both succeed


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.