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

> ## Agent Instructions
> For short, quotable answers about SmartAlex (what it is, who it is for, what it costs, where it runs, how it keeps data safe, which apps it connects to), read the facts page at /ai/facts on this site first, then the page it links to. Its last table maps every section of these docs.
> For how to do something, use the step-by-step pages: /learn for whole paths, and each section's first-time pages such as /calls/buy-your-first-number, /agents/create-an-agent or /campaigns/import-your-first-contacts. Give the click path exactly as written there, for example Calls, then Numbers, then Buy number, with the bold button labels unchanged.
> Prices come from the Pricing page at /pricing and the pages under /pricing. Quote a price exactly as written there, with its currency and unit.
> Short answers to common questions are under /help, grouped by section. Legal documents are summarised under /legal; each summary links to the binding text, which prevails over the summary.
> If a feature or screen is not described in these docs, say that you could not find it rather than guessing.
> Pages under /comparisons describe other companies' products as of the date on each page. For SmartAlex's own features and prices, use the product pages.
> The MCP server at /mcp on this site only searches this documentation. To work inside your own SmartAlex workspace (agents, calls, campaigns, contacts), use the SmartAlex MCP server described at /mcp/overview.

# Connect your first phone system

> Put your SmartAlex agent on your business phone system as an extension, from Calls → PBX Extensions to your first test call, in about 20 minutes.

By the end of this tutorial your SmartAlex agent answers calls as an extension on your own phone system. It can also put callers through to your team. It takes about 20 minutes once you have an extension and its password from your PBX.

> [!NOTE]
>
> In the app: **Sidebar → Calls → PBX Extensions** (`/settings/pbx`) → **Connect a PBX**. This tutorial uses **Use as PBX extension**, which works for most PBXs. For other options, see [Connection modes](https://docs.getsmartalex.com/telephony/connection-modes.md).

## What you need first

* A paid plan. On the Free plan, **PBX extensions** is locked.
* A role that can add PBX connections and phone numbers. To link the agent, it must also be able to edit agents; without that, the button reads "You don't have permission to edit agents".
* A SmartAlex agent that is ready to answer calls.
* An extension on your PBX kept for the AI, with its SIP username and password, and never use a person's extension.
* Someone who can allow `34.233.117.97` and `15.240.176.215` on your firewall and PBX.

## The steps at a glance

This diagram shows the whole tutorial, from opening the connect page to a test call.

```mermaid theme={null}
flowchart LR
  A["Connect a PBX"] --> B["Pick your PBX"]
  B --> C["Enter the extension"]
  C --> D["Link agent"]
  D --> E["Set up the inbound route"]
  E --> F["Route the number on your PBX"]
  F --> G["Test call"]
```

## Connect it

**1. Open PBX Extensions**

In the sidebar, click **Calls**, then **PBX Extensions** (`/settings/pbx`). The page is titled "PBX extensions". Click **Connect a PBX**.

![PBX extensions page with the Connect a PBX button](https://mintcdn.com/smartalex/kH_ICIPoijeWBR2w/images/screens/telephony-guides/pbx-extensions-empty.webp?fit=max\&auto=format\&n=kH_ICIPoijeWBR2w\&q=85\&s=1b9a0695bd4ba30cecff84fc19430de9)

Start on Calls, then PBX Extensions

**2. Choose your PBX**

On **Add connection** (`/phone/connect?type=pbx`), choose **PBX platform**. Under **Choose your PBX**, click your system's tile, or **Other** if it is not listed.

![Choose your PBX tiles with eight phone systems](https://mintcdn.com/smartalex/kH_ICIPoijeWBR2w/images/screens/telephony-guides/choose-your-pbx.webp?fit=max\&auto=format\&n=kH_ICIPoijeWBR2w\&q=85\&s=080bde7a1c7cc6601738932c1ca898c3)

Pick your phone system, or Other

**3. Choose Use as PBX extension**

Under **Connection Type**, choose **Use as PBX extension**. Yeastar and Porta always use it, and Yeastar then offers its guided setup, described in the [Yeastar guide](https://docs.getsmartalex.com/telephony/yeastar.md).

**4. Enter the extension**

Fill in the fields in the table below, then click **Connect to PBX**. The app shows "Connected. SmartAlex is registering to your PBX now."

![Use as PBX extension form with five fields and a Connect to PBX button](https://mintcdn.com/smartalex/kH_ICIPoijeWBR2w/images/screens/telephony-guides/extension-form.webp?fit=max\&auto=format\&n=kH_ICIPoijeWBR2w\&q=85\&s=635adb2777c4d2119bca769ed748be3c)

Enter the extension your PBX gave the AI

**5. Allow our addresses**

The connect screen shows both addresses with copy buttons, so allow them on your firewall and in your PBX's own block list or allowed hosts.

**6. Link the agent**

Under **Finish the connection**, find **Which agent answers?**, choose your agent and click **Link agent**.

**7. Set up the inbound route**

Under **Which number rings it?**, click **Set up the inbound route**. The **Connect a PBX Extension** dialog already knows the connection and the linked agent. It asks only for the **Extension**, the **Number callers dial** in full international form, such as `+27 11 555 1234`, and an optional **Label**. Click **Connect**.

**8. Send calls to the AI on your PBX**

On your PBX, point the number's inbound route, a ring group or an IVR option at the AI's extension. Your [PBX guide](https://docs.getsmartalex.com/telephony/overview.md#pick-your-phone-system) names the exact menu.

## Every field on the form

| Setting | What it does | Default | When to change it |
| - | - | - | - |
| **Trunk Name** | The name you see on the connection card | Empty | Always: use something like "Office PBX (ext 850)" |
| **Your PBX SIP Domain** | Where SmartAlex signs in. "Use the SIP hostname configured on your desk phones." | Empty | Always |
| **Extension number for SmartAlex** | The AI's extension on your PBX | Empty | Always |
| **Username from your PBX** | The extension's SIP username, such as the Yeastar Registration Name or the Grandstream Auth ID | Empty | Always. It is often not the extension number |
| **Password from your PBX** | The extension's SIP password, stored encrypted | Empty | Always |
| **Transport** (Advanced Settings) | How SIP travels: UDP, TCP or TLS. "UDP works for most PBXes." | UDP | Leave on UDP. Extension mode signs in over UDP only, and TCP or TLS is refused with "Only UDP is supported for this connection type." |
| **Port** (Advanced Settings) | Your PBX's SIP port | `5060` | When your PBX listens on another port |

## Check it worked

**1. The status turns green**

Under **Sidebar → Calls → PBX Extensions**, the card shows **Connected as ext N**. The first registration usually lands within a minute, and if it shows anything else, see [Connection status](https://docs.getsmartalex.com/telephony/connection-status.md).

**2. Diagnostics pass**

Open the card's menu, choose **Show diagnostics**, and check **Registration**, **PBX reachable** and **Inbound routing** all pass.

**3. A call reaches the AI**

Call the number from a mobile phone. Your agent answers.

## Next

> [card] [Fill the extension directory](https://docs.getsmartalex.com/telephony/call-routing-transfers.md#the-extension-directory)
>
> So the AI can put callers through to your team.

> [card] [Test before go-live](https://docs.getsmartalex.com/telephony/testing-validation.md)
>
> The full test plan.

## Questions people ask

> [accordion] Our PBX cannot take an outside extension
>
> Use a SIP trunk or number forwarding instead. See [Connection modes](https://docs.getsmartalex.com/telephony/connection-modes.md).

> [accordion] The status says Auth failed
>
> The username is usually wrong. Fix it with **Edit connection**. See [Connection status](https://docs.getsmartalex.com/telephony/connection-status.md).

> [accordion] Can I connect a second PBX later?
>
> Yes. Click **Connect a PBX** again, and each connection gets its own card, agent and directory.

## Related

> [card] [PBX extension mode](https://docs.getsmartalex.com/telephony/native-extension-mode.md)
>
> How extension mode works.

> [card] [Network requirements](https://docs.getsmartalex.com/telephony/network-requirements.md)
>
> Addresses, ports and the change request.


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