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

# Connect Telnyx to Bolna with a SIP trunk

> Bring your Telnyx numbers to Bolna: create an FQDN SIP connection and an Outbound Voice Profile in Telnyx, then a Telnyx SIP trunk in Bolna.

[Telnyx](https://telnyx.com/) connects your numbers to Bolna through a SIP connection. The connection sends calls to your numbers into Bolna and checks the calls Bolna places. An Outbound Voice Profile attached to it sets where those calls can go.

## Before you begin

* **A Telnyx account and at least one Telnyx phone number.** Telnyx needs Level 2 verification before many outbound destinations can be enabled.

## Set up Telnyx

**1. Create an FQDN SIP connection**

In the [Telnyx Mission Control Portal](https://portal.telnyx.com/), open **Voice Suite** → **SIP Trunking** and click **Create SIP Connection**. The wizard has these pages: **Details**, **Authentication and routing**, **Configuration**, **Inbound**, **Outbound** and **Numbers**. Click **Next** to move between them. Enter a name, for example `Bolna`, and select **FQDN** as the connection type.

**2. Add Bolna's address and outbound credentials**

On **Authentication and routing**, click **Add FQDN** and enter:

| Field | Value |
| - | - |
| DNS record type | `A` |
| FQDN | `trunk.bolna.ai` |
| Port | `5060` |

On the same page, set outbound calls authentication to **Credentials** and set a username and password. Save both, because you enter them in Bolna.

> [!WARNING]
>
> **Include your connection username in the first INVITE.** To make sure your calls are authenticated correctly and your connection's AnchorSite® preference is honored, include the connection's SIP username in the user part of the `Contact` header in the initial SIP INVITE. If that's not supported, include it in the custom SIP header `X-Telnyx-Username`. [Learn more](https://developers.telnyx.com/docs/voice/sip-trunking/routing/anchorsite-configuration)

**3. Set the inbound options**

On **Inbound**:

* **SIP region:** pick a region and note it. It starts empty. Telnyx sends inbound calls from that region's two IP addresses, and you add them in Bolna.
* **SIP transport protocol:** leave it at `UDP` or set `TCP`. Bolna does not accept TLS.
* **Destination number format:** leave it at `E.164` or set `+E.164`. Bolna matches both.
* **Codecs:** Telnyx turns on `G722`, `G711U`, `G711A` and `G729` by default. Turn off `G722` and `G729` so only `G711U` and `G711A` remain. Bolna accepts PCMU and PCMA only.

**4. Attach an Outbound Voice Profile**

On **Outbound**, pick a profile under **Outbound voice profile**, then finish the wizard. To create a profile or change where it can call, open **Voice Suite** → **Outbound Voice**, click **Create Profile** or open an existing profile, and under **Allowed Destinations** turn on the countries your agent calls.

**5. Assign your numbers**

Open **Voice Suite** → **Phone Numbers** → **My Numbers**. For each number you want on Bolna, pick the connection in the **Connection/Application** column and save.

## Create the trunk in Bolna

**1. Pick Telnyx**

In the sidebar, under **Deploy**, open **SIP Trunks** and click **Create trunk**. If your account still has legacy SIP trunks, click **Open new SIP trunks** first. On the **Provider** step, pick **Telnyx** and enter a **Trunk name** and the number of **Channels**. The preset fills in **Gateway we dial** with `sip.telnyx.com` on port `5060` and uses TCP. You can change the gateway, port and transport on the trunk's **Connection** tab later, and the channel count under **Connection** → **Advanced**. Click **Continue**.

**2. Add Telnyx's IPs and credentials**

On the **Carrier IPs** step, add the two IPs of the SIP region you picked on the connection's **Inbound** page. Telnyx [publishes](https://sip.telnyx.com/) them:

| Telnyx SIP region | IP address 1 | IP address 2 |
| - | - | - |
| US | `192.76.120.10` | `64.16.250.10` |
| Europe | `185.246.41.140` | `185.246.41.141` |
| Australia | `103.115.244.145` | `103.115.244.146` |
| Canada | `192.76.120.31` | `64.16.250.13` |
| Middle East | `185.246.42.128` | `185.246.42.129` |
| Asia (Beta) | `103.115.244.158` | `103.115.244.159` |

Under **Carrier credentials (optional)**, enter the **Username** and **Password** you set on the Telnyx connection. Click **Continue**.

**3. Add your Telnyx numbers**

On the **Numbers** step, enter each Telnyx number in E.164 format, for example `+14155550100`, and click **Add**. Click **Continue**, check the summary and click **Create trunk**.

**4. Turn on Dial with leading plus**

Telnyx accepts called numbers in `+E.164` format by default. Open the trunk's **Connection** tab and, under **Outbound: gateways**, turn on **Dial with leading plus**.

The caller ID on an outbound call must be a valid number; Telnyx rejects an invalid one with `403 Caller Origination Number is Invalid D35`. Use a Telnyx number on your account. For every field on these steps, see [Connect your carrier](https://www.bolna.ai/docs/sip-trunking/connect-carrier.md).

## Assign an agent and test

* **Inbound:** open the trunk's **Numbers** tab and, in the **Agent** column, pick an agent for your Telnyx number. Then call the number. See [Receive inbound calls](https://www.bolna.ai/docs/sip-trunking/inbound-calls.md).
* **Outbound:** on the agent's **Calling** tab, set **Telephony Provider** to **SIP Trunk**. Click **Get a call from agent**, pick your Telnyx number under **Call from**, enter the number to call under **Your phone number** and click **Place call**. See [Make outbound calls](https://www.bolna.ai/docs/sip-trunking/outbound-calls.md).

If a call does not connect, see [Troubleshooting](https://www.bolna.ai/docs/sip-trunking/troubleshooting.md).


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