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

# Telnyx SIP Integration Guide

> Step-by-step guide to integrating Telnyx as a SIP provider with Zero Runtime, including SIP connection setup, FQDN configuration, gateway setup, and routing rules.

This guide walks you through connecting Telnyx as your SIP provider to Zero Runtime for both inbound and outbound calling.

## Configuring Telnyx

### 1. Purchase a Number and Create a SIP Connection in Telnyx

* Log in to your Telnyx Console.
* Purchase a phone number if you don't already have one.
* Go to **Connections** and create a new SIP Connection.
  * Enter a name for your connection.
  * Set the type as **FQDN**.

### 2. Configure SIP Connection (FQDN, Auth, and Routing)

* In the SIP Connection settings:
  * Under **FQDN**, add the Zero Runtime Inbound Gateway URI (found in the Zero Runtime dashboard under Inbound Gateways).
  * Under **Inbound Call Routing**, set up the domain and set the **Primary FQDN** to the one you just added.
  * Under **Outbound Authentication**, add the username and password you want to use for authentication.
  * Click **Next**.
  * On the configuration step, no changes are required. Click **Next**.

### 3. Inbound and Outbound Settings

* On the inbound screen:
  * Choose **Opus** as your codec and set it as the first priority.
  * Click **Next**.
* On the outbound screen:
  * Select the **Default Voice Profile**.
  * Click **Next**.
* On the last screen, assign the number you purchased to this SIP connection.

## Configuring Zero Runtime

### 1. Configure Inbound Gateway in Zero Runtime

* In the Zero Runtime Dashboard, go to **Telephony > Inbound Gateway**.
* Create a new inbound gateway using the number you purchased from Telnyx.

### 2. Configure Outbound Gateway in Zero Runtime

* In the Zero Runtime Dashboard, go to **Telephony > Outbound Gateway**.
* Create a new outbound gateway using the domain address you configured in Telnyx and the authentication credentials you set up.

### 3. Set Up Routing Rules

* In the Zero Runtime Dashboard, go to **Telephony > Routing Rules**.
* Create routing rules for inbound and outbound calls, selecting the appropriate gateways and numbers.

### Video Walkthrough

<Frame>
  <video autoPlay muted loop controls className="w-full aspect-video rounded-xl" src="https://cdn.zeroruntime.ai/zrt/website-content/telephony/setup-routing-rule.mp4" />
</Frame>
