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

# SIP Trunk (Phone)

The **SIP trunk** phone method lets you connect an existing phone number from your own PBX, SIP provider, or GSM gateway to your Chatbase agent. You give the number a name, Chatbase generates a SIP URI, and you point your carrier or telephony provider at that URI. Inbound calls to the number are then answered by your AI agent using its configured voice, personality, and data sources.

Use this method when you already own numbers with a carrier or run your own telephony (PBX / SIP provider / GSM gateway) and want to route their inbound calls to Chatbase.

<Info>
  Make sure the phone channel is supported on your plan. Check the [pricing page](https://www.chatbase.co/pricing) for details.
</Info>

## 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.
* Make sure your Chatbase agent is set up with the voice settings you want callers to hear. You can configure voice, language, and greeting under your agent's **Settings > Voice** tab.

## Step 1: Open the Phone channel

1\. Navigate to your [Chatbase dashboard](https://www.chatbase.co/dashboard/) and select the agent you want to enable phone calls for.

2\. Open the **Phone** channel from the **Deploy** (Channels) section.

3\. Go to the **Connections** tab. This is where you assign phone numbers to the agent.

## Step 2: Choose the SIP trunk method

1\. Under **Assign phone numbers**, click **Assign a new number**.

2\. In the **Assign a new number** dialog, choose **SIP trunk**: *"Connect an existing number from your PBX, SIP provider or GSM gateway."*

3\. Click **Continue**.

<Info>
  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 agent.
</Info>

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

## Step 4: Copy the SIP URI

Once the number is connected, the **SIP trunk created** dialog shows the SIP URI Chatbase generated for it.

1\. Click the **copy** icon to copy the SIP URI. It looks like this:

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

2\. Click **Done**.

<Info>
  Copy the SIP URI **exactly** as shown in the dialog, 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)).
</Info>

## Step 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\. Save the configuration and place a test call to the number.

Once your provider is routing calls to the SIP URI, the number is ready to receive calls. In the **Connections** tab, the number appears as a card showing the phone number, a green **Active** badge, its friendly name, and a **SIP trunk** provider badge.

## How calls work

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

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

## Managing phone numbers

### Copy the SIP URI again

If you need the SIP URI after closing the created dialog:

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 to enable or disable it. A disabled number stops receiving calls but stays connected to the 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 dialog.

<Info>
  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.
</Info>
