> ## 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.

# PBX Extensions: connect your phone system to SmartAlex

> Connect your PBX or SIP carrier so your AI agent answers an extension or the calls your system forwards. Works with 3CX, Yeastar, Teams, FreePBX and more.

**PBX Extensions** connects SmartAlex to the phone system your business already runs, so your agent can answer calls without a new number. Your PBX can forward calls to SmartAlex over a SIP trunk. Or SmartAlex signs in to your PBX as an extension that staff dial or transfer to. You set it up once on **Calls → PBX Extensions**, then link the connection to an agent.

> [!NOTE]
>
> In the app: **Calls → PBX Extensions** (`/settings/pbx`), titled **PBX extensions**: "Manage call routes and team extensions." **Connect a PBX** opens **Add connection** (`/phone/connect`). It needs the free trial or a paid plan.

## Works with

> [card] [Yeastar](https://docs.getsmartalex.com/telephony/yeastar.md)
>
> P-Series and S-Series, guided

> [card] [3CX](https://docs.getsmartalex.com/telephony/3cx.md)
>
> Self-hosted or partner-hosted

> [card] [Microsoft Teams](https://docs.getsmartalex.com/telephony/microsoft-teams.md)
>
> Through a session border controller

> [card] [RingCentral](https://docs.getsmartalex.com/telephony/ringcentral.md)
>
> Through a SIP gateway

> [card] [FreePBX](https://docs.getsmartalex.com/telephony/freepbx.md)
>
> The open-source Asterisk GUI

> [card] [Asterisk](https://docs.getsmartalex.com/telephony/asterisk.md)
>
> Raw Asterisk or a custom PBX

> [card] [Porta](https://docs.getsmartalex.com/telephony/generic-sip.md)
>
> A hosted PortaOne extension

> [card] [Other](https://docs.getsmartalex.com/telephony/generic-sip.md)
>
> Any SIP-compatible system

## Two ways to connect

| | **Forward calls** | **Use as PBX extension** |
| - | - | - |
| What happens | "Your PBX sends incoming calls to SmartAlex. Best for dedicated AI phone numbers." | "Dial or transfer calls to this extension to reach your AI agent." |
| Good for | A number that the agent answers every time | A receptionist or a menu that passes some calls to the agent |
| You give SmartAlex | Your PBX's SIP domain and IP addresses | The extension's number, username and password on your PBX |
| SmartAlex gives you | SIP server, port, transport and sign-in details to put on your PBX | Two SmartAlex addresses to allow on your PBX firewall |

```mermaid theme={null}
sequenceDiagram
    participant C as Caller
    participant P as Your PBX
    participant S as SmartAlex
    participant A as Your agent
    participant T as Your team
    C->>P: Calls your main number
    P->>S: Forwards the call, or a person transfers it to the AI extension
    S->>A: The agent answers
    A-->>C: Helps the caller
    A->>T: Transfers to a person on your PBX when needed
```

## Connect your PBX

**1. Open Add connection**

In the sidebar, click **Calls**, then **PBX Extensions** (`/settings/pbx`), and click **Connect a PBX**. Choose **PBX platform**.

![Add connection page with PBX platform choices](https://mintcdn.com/smartalex/W83SmqMCqKwQyJ4e/images/screens/calls-numbers/pbx-add-connection.webp?fit=max\&auto=format\&n=W83SmqMCqKwQyJ4e\&q=85\&s=397ac17db486cf35bafccd6666e47fc0)

Connect your own phone system

**2. Choose your platform**

Pick Yeastar, Porta, 3CX, FreePBX, Asterisk, Microsoft Teams, RingCentral or **Other**.

![PBX platform choices with logos](https://mintcdn.com/smartalex/W83SmqMCqKwQyJ4e/images/screens/calls-numbers/pbx-platform.webp?fit=max\&auto=format\&n=W83SmqMCqKwQyJ4e\&q=85\&s=a1563b7f117e00b5cef053c3be314444)

Pick the phone system you use

**3. Choose the connection type**

Pick **Forward calls** or **Use as PBX extension**.

**4. Fill in the details**

For **Forward calls**: a **Trunk Name**, your **PBX SIP Domain**, the **Authentication Method** (**Credentials**, **IP Whitelist** or **Both**) and your **PBX IP Address(es)**. **SIP Username** and **SIP Password** are made for you if you leave them blank.

For **Use as PBX extension**: your PBX's SIP domain, the extension number for SmartAlex, and the username and password your PBX gave that extension. On Yeastar, add the API **Client ID** and **Client Secret** from **Integrations > API** on your PBX and pick the extension from the list instead.

**5. Create it**

Click **Create SIP Trunk** (forward calls) or **Connect to PBX** (extension). For a trunk you see "SIP trunk created. Configure your PBX with these details." and **Your SIP connection details**. Give them to whoever runs your phone system.

**6. Link it to an agent**

Under **Finish the connection**, answer **Which agent answers?** and click **Link agent**, then **Which number rings it?** and **Set up the inbound route**. The agent can then transfer callers to your team and look up people on your PBX.

Each system has its own step-by-step guide in [Telephony](https://docs.getsmartalex.com/telephony/overview.md), with the exact menus on your PBX.

### Advanced settings for a trunk

![Advanced settings for a SIP trunk](https://mintcdn.com/smartalex/W83SmqMCqKwQyJ4e/images/screens/calls-numbers/pbx-advanced.webp?fit=max\&auto=format\&n=W83SmqMCqKwQyJ4e\&q=85\&s=73aaf2b3995200b88dd6a4b66bbf0154)

Advanced settings, for when your PBX needs them

| Setting | What it does | Default | When to change it |
| - | - | - | - |
| **Transport** | How the connection talks to your PBX: auto, UDP, TCP or TLS | Set by the PBX you chose: UDP for Yeastar, Porta, 3CX, FreePBX and Asterisk; TLS for Microsoft Teams and RingCentral; auto for Other | Only if your PBX needs TCP or TLS |
| **Port** | The port your PBX listens on | 5060. TLS usually uses 5061 | When your PBX uses another port |
| **Media Encryption (SRTP)** | Encrypts the call audio: **Off**, **Allow** or **Require** | Off for most PBXes; Require for Microsoft Teams; Allow for RingCentral | Require when your PBX only accepts encrypted audio |
| **Codecs** | The audio formats offered: G.711 u-law, G.711 A-law and G.722 HD | G.711 u-law and A-law. Microsoft Teams also gets G.722 HD | Add G.722 HD if your PBX supports it, for clearer audio |
| **Noise cancellation** | Removes background noise from the caller's side | Off | Switch on when callers are often somewhere noisy |
| **Concurrent Calls** | How many calls the trunk carries at once | 10 | Raise it if your lines are busy |
| **Ring Timeout (s)** | How long a call rings before it stops | 30 | Raise it if your team needs longer to answer |
| **Max Duration (s)** | The longest one call can last | 3600, one hour | Raise it if your calls run longer |

## Connect a carrier instead

On **Add connection**, choose **Phone carrier** to keep your carrier account and its numbers. One carrier you set up yourself on the page. The others show **Set up with our team**: email [support@getsmartalex.com](mailto:support@getsmartalex.com) and the team switches it on for your account.

## Manage a connection

The PBX Extensions page shows each connection with a status badge and its **Connection activity**: **Last attempt**, **Last success** and **Last error**. With more than one, pick it from the **PBX connection** list.

| Action | What it does |
| - | - |
| **Route to agent** | Links an extension on this connection to an agent and the number callers dial |
| **Force re-register** | Signs in to your PBX again now, instead of waiting for the next automatic retry. Also re-syncs call routing. It will not fix wrong credentials or a firewall block |
| **Edit connection** | Changes the name, extension, username, domain, port or transport |
| **Rotate password** | Sets a new SIP password |
| **Show diagnostics** | Shows exactly what SmartAlex sends and what your PBX answered, and **Copy support report** for your PBX support team |
| **Delete** | Removes the connection |

## What the status means

| Status | What it means | What to do |
| - | - | - |
| **Connected** or **Connected as ext …** | Signed in and ready | Nothing |
| **Active** | The trunk is set up | Nothing |
| **Connecting…** or **Awaiting status** | SmartAlex is signing in | Wait about 30 seconds |
| **Not answering calls yet** | Connected, but no agent or number is linked | Use **Route to agent** |
| **Registered: routing not linked** | Signed in, but routing is out of step | **Force re-register** |
| **Auth failed** | Your PBX refused the username or password | Check the extension's SIP username and password, and that it allows remote registration |
| **Sign-in paused** | Your PBX refused the sign-in, so SmartAlex stopped trying to keep the address from being blocked | Fix the credentials, then **Force re-register** |
| **Unreachable** | No reply from your PBX | Allow SmartAlex's addresses on your PBX firewall, then **Force re-register** |
| **Password missing** or **Misconfigured** | A required field is empty | **Edit connection** or **Rotate password** |
| **Not registered** or **Failed** | The last sign-in did not work | **Force re-register**, then **Show diagnostics** |
| **Voice platform link down** | The link inside SmartAlex dropped | **Force re-register** |
| **Suspended** | The connection is paused | Contact our support team |

## If a connection is not working

**1. Read the badge**

Use the table above for the first fix.

**2. Open Show diagnostics**

It shows the **Connection target**, **Our IP - allowlist this**, the **SIP response code** and **SIP reason**. Click **Run diagnostics** to test again.

**3. Send the report**

Click **Copy support report** and paste it into a ticket with whoever runs your PBX. It says what SmartAlex sent, from which address, and what to check on your side.

More fixes are in [Telephony troubleshooting](https://docs.getsmartalex.com/telephony/troubleshooting.md).

## Questions people ask

> [accordion] Do I need a SmartAlex number if I connect my PBX?
>
> No. Your PBX sends calls to SmartAlex over the trunk, or staff transfer them to the AI extension. Your existing numbers stay on your PBX.

> [accordion] Can the agent transfer a caller back to my team?
>
> Yes. Once the connection is linked to an agent, it can transfer callers to people on your PBX and look them up by name.

> [accordion] Which firewall addresses do I allow?
>
> The page shows SmartAlex's two addresses when you connect, and **Show diagnostics** shows them again under **Our IP - allowlist this**. Allow both, or calls cannot get through.

> [accordion] Why does my PBX keep blocking SmartAlex?
>
> Many PBXes block an address after a few failed sign-ins. Fix the username and password first, remove SmartAlex's address from the PBX's block list, then click **Force re-register**.

> [accordion] Is 3CX supported?
>
> Yes, a 3CX you run yourself or one a partner hosts. It is marked early access on the page.

> [accordion] Can I connect more than one PBX?
>
> Yes. Each connection appears in the **PBX connection** list on the page.

## Related

> [card] [Telephony overview](https://docs.getsmartalex.com/telephony/overview.md)
>
> Guides for every phone system.

> [card] [Use your own number](https://docs.getsmartalex.com/how-to/use-your-own-number.md)
>
> All three ways to keep your number.

> [card] [Inbound calls and business hours](https://docs.getsmartalex.com/how-to/inbound-calls-and-business-hours.md)
>
> Transfers and what callers hear.

> [card] [Number health](https://docs.getsmartalex.com/how-to/number-health-and-caller-id.md)
>
> Check a connected number.


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