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

# Answer phone calls with your AI agent using a SIP trunk

> Connect a number you already own from a PBX, SIP provider, or GSM gateway so your AI agent can answer its calls

The Chatbase **SIP trunk** phone method connects a phone number you already own, on your own PBX, SIP provider or GSM gateway, to a Chatbase AI agent. You enter the number, Chatbase generates a SIP URI, and you route the number's inbound calls to that URI. Your AI agent then answers those calls with its configured voice, instructions and data sources.

> [card] What you can do:
>
> Keep the number your customers already call, and route its inbound calls to your AI agent instead of buying a new one.

> [!NOTE]
>
> Use this method when you already own numbers with a carrier or run your own telephony. If you'd rather buy and manage numbers through Twilio, see the [Twilio method](https://chatbase.co/docs/user-guides/integrations/twilio.md).

## Before you start

* An existing phone number on a PBX, SIP provider, or GSM gateway.
* The ability to configure that trunk's inbound call routing (origination) to point at an external SIP URI. Where this setting lives depends on your carrier or telephony provider.
* A Chatbase AI agent set up with the voice settings you want callers to hear. Configure voice, language, and greeting on your AI agent's **Build > Voice** page.
* The Basic plan or higher.

## How to connect a SIP trunk

**1. Open the Phone channel**

1. Navigate to your [Chatbase dashboard](https://www.chatbase.co/dashboard/) and select the AI agent you want to enable phone calls for.
2. Click **Channels** in the sidebar and open the **Phone** channel.
3. Go to the **Connections** tab. This is where you assign phone numbers to the AI agent.

**2. Choose the SIP trunk method**

1. Under **Assign phone numbers**, click **Assign a new number**.
2. In the dialog, choose **SIP trunk**: *"Connect an existing number from your PBX, SIP provider or GSM gateway."*
3. Click **Continue**.

> [!NOTE]
>
> If you don't have a Twilio account connected, **SIP trunk** is already selected for you. The **Twilio number** option only becomes available once a Twilio account is connected to the AI agent.

**3. Enter the number details**

In the **Connect SIP trunk** dialog:

1. Enter a **Name**, a friendly label to help you identify this number later, for example "Main office trunk".
2. Enter the **Phone number** in E.164 format, including the country code, for example `+15550000000`.
3. Click **Connect SIP trunk**.

If the number isn't valid E.164, the form shows "Enter a valid phone number in E.164 format (e.g. +15550000000)".

**4. Copy the SIP URI**

The **SIP trunk created** dialog shows the SIP URI Chatbase generated. Click the **copy** icon to copy it. It looks like this:

```
sip:+15550000000@sip.chatbase.co:5061;transport=tls
```

Then click **Done**.

> [!WARNING]
>
> Copy the SIP URI **exactly** as shown, including the port and transport (for example, `;transport=tls`). You can copy it again at any time from the number's menu. See [Managing phone numbers](#managing-phone-numbers).

**5. Point your carrier at the SIP URI**

In your carrier, PBX, SIP provider, or GSM gateway configuration, route inbound calls for this number to the SIP URI you copied. This is usually configured as the trunk's **origination**, **outbound routing**, or **SIP destination** for the number.

The exact steps vary by provider, but in general you will:

1. Open your provider's trunk or number settings.
2. Set the inbound call destination (origination URI / SIP endpoint) to the copied Chatbase SIP URI.
3. Turn off any digest authentication or registration for this destination. Chatbase doesn't use either.
4. Save the configuration.

> [!TIP]
>
> A new SIP trunk number is **Active** as soon as you create it. In the **Connections** tab it shows the phone number, **Active** with the toggle on, its friendly name, and a **SIP trunk** provider badge. Place a test call to the number and confirm your AI agent answers with the greeting from its voice settings.

## How calls work

Once a SIP trunk number is connected and enabled for an AI agent:

* **Inbound calls** to that number are routed through your carrier to Chatbase and answered by the assigned AI agent.
* The AI agent uses its configured **voice settings** (voice provider, model, and language) to speak with the caller.
* The AI agent greets the caller with the **first message** defined in its voice settings.
* The conversation follows the AI agent's instructions, knowledge base, and Actions, just like a chat conversation.
* Each call creates a conversation entry in **Activity > Conversations** with the source marked as **Phone**.

## Managing phone numbers

### Copy the SIP URI again

1. On the **Connections** tab, find the number's card and click the **menu** icon (**⋯**).
2. Select **Copy SIP URI**.

The SIP URI is copied to your clipboard.

### Enable or disable a number

Use the toggle on the number's card. New SIP trunk numbers start turned on. A disabled number stops receiving calls but stays connected to the AI agent, so you can re-enable it at any time without reconfiguring your carrier.

### Delete a number

1. On the number's card, click the **menu** icon (**⋯**) and select **Delete**.
2. Confirm in the **Delete phone number?** dialog.

> [!WARNING]
>
> Deleting a number permanently removes it from this AI agent and detaches it from your SIP trunk. This can't be undone. The number itself remains with your carrier, and you can connect it again later using the same SIP URI.

## Limitations

* **Routing happens at your carrier.** Chatbase generates the SIP URI, but calls only reach your AI agent once your provider is configured to send them there.
* **The SIP URI must match exactly,** including port, transport and the `+` in the number, or calls won't connect.
* **No keypad input.** The AI agent isn't set up to act on keypad presses (DTMF), so don't rely on "press 1" style menus after the call reaches it.
* **Basic plan or higher.** The Phone channel isn't available on other plans.

## Troubleshooting

> [accordion] Calls ring but the AI agent never answers
>
> Check that:
>
> 1. The number's toggle is on.
> 2. Your workspace is on the Basic plan or higher.
> 3. Your workspace has more than 6 message credits left, or auto-recharge is on.
> 4. No concurrent or daily call limit has been reached. See [Limits](https://chatbase.co/docs/user-guides/chatbot/voice.md#limits).

## Frequently asked questions

> [accordion] Does Chatbase need SIP credentials or registration?
>
> No. There's no digest authentication and no registration. Calls are accepted only for numbers registered in Chatbase.

> [accordion] Is a new SIP number active right away?
>
> Yes. New SIP trunk numbers start **Active**. Turn off the toggle if you want to stop calls while you finish configuring your carrier.

> [accordion] How much does a SIP call cost in Chatbase?
>
> 6 message credits per minute, plus the AI model's message credits for each reply. The first minute is billed when the call starts. Your carrier bills you separately for the line.

## Next steps

> [card] [Twilio](https://chatbase.co/docs/user-guides/integrations/twilio.md)
>
> Buy and manage numbers through Twilio instead.

> [card] [Transfer to phone number](https://chatbase.co/docs/user-guides/chatbot/actions/transfer-to-phone.md)
>
> Let the AI agent hand a live call to a human.


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