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

# Phone Number

> Connect your agent to a phone number

To receive calls, your agent needs a phone number. This page covers provisioning, importing, and assigning phone numbers.

## Overview

Phone numbers connect your voice agent to the telephone network. Callers dial the number, and the call routes to your agent.

## Getting a Phone Number

### Option 1: Provision New

Get a new number directly in Retone:

1. Go to **Phone Numbers** in the sidebar
2. Click **Provision New**
3. Select country and area code
4. Choose from available numbers
5. Click **Provision**

### Option 2: Import Existing

Bring your own Twilio number:

1. Go to **Phone Numbers**
2. Click **Import Existing**
3. Enter your Twilio credentials
4. Select the number to import
5. Click **Import**

### Option 3: Manual Entry

Add any SIP-compatible number:

1. Go to **Phone Numbers**
2. Click **Manual Entry**
3. Enter the phone number
4. Configure SIP credentials
5. Click **Add**

## Assigning to an Agent

Connect a phone number to your agent:

<Steps>
  <Step title="Go to Phone Numbers">
    Navigate to **Phone Numbers** in the sidebar
  </Step>

  <Step title="Select a Number">
    Click on the phone number you want to assign
  </Step>

  <Step title="Choose Agent">
    In the configuration panel, select your flow agent from the dropdown
  </Step>

  <Step title="Configure Settings">
    Set any number-specific options (see below)
  </Step>

  <Step title="Activate">
    Click **Activate** to enable the number
  </Step>
</Steps>

## Phone Number Settings

When assigning a number, configure:

| Setting            | Description                              |
| ------------------ | ---------------------------------------- |
| **Agent**          | Which agent handles calls to this number |
| **Call Direction** | Inbound, outbound, or both               |
| **Business Hours** | When calls are accepted                  |
| **After Hours**    | What happens outside business hours      |
| **Recording**      | Enable/disable call recording            |

### Business Hours

Set when the agent accepts calls:

```yaml theme={null}
Business Hours:
  Timezone: "America/New_York"
  Days: [Monday, Tuesday, Wednesday, Thursday, Friday]
  Start: "09:00"
  End: "17:00"
```

### After Hours Handling

What happens outside business hours:

| Option                  | Behavior                   |
| ----------------------- | -------------------------- |
| **Voicemail**           | Caller leaves a message    |
| **After-hours message** | Play recording and hang up |
| **Forward**             | Route to another number    |
| **Always on**           | Agent available 24/7       |

## Managing Phone Numbers

### Viewing Numbers

The Phone Numbers page shows:

* Phone number
* Assigned agent
* Status (active/inactive)
* Call statistics

### Changing Assignment

To reassign a number:

1. Click on the number
2. Select a different agent
3. Save changes

The change takes effect immediately.

### Deactivating

To stop receiving calls:

1. Click on the number
2. Toggle **Active** off
3. Calls to this number won't be answered

## Multiple Numbers

You can have multiple phone numbers:

| Use Case               | Setup                                      |
| ---------------------- | ------------------------------------------ |
| **Department routing** | Different numbers for Sales, Support, etc. |
| **Regional presence**  | Local numbers for different areas          |
| **Marketing tracking** | Unique numbers for each campaign           |
| **Separate agents**    | Each agent has its own number              |

## SIP Configuration

For advanced users bringing their own SIP trunk:

```yaml theme={null}
SIP Settings:
  Server: sip.provider.com
  Username: your_username
  Password: your_password
  Port: 5060
  Transport: UDP/TCP
```

### Testing SIP

After configuration:

1. Click **Test SIP**
2. The system attempts a connection
3. Success/failure status displayed
4. Fix any issues and retest

## Phone Number Best Practices

<CardGroup cols={2}>
  <Card title="Use Local Numbers" icon="location-dot">
    Local area codes increase answer rates.
  </Card>

  <Card title="Set Business Hours" icon="clock">
    Match your actual availability.
  </Card>

  <Card title="Test Before Launch" icon="vial">
    Call the number yourself to verify it works.
  </Card>

  <Card title="Monitor Usage" icon="chart-line">
    Track call volume and patterns.
  </Card>
</CardGroup>

## Troubleshooting

| Issue                | Solution                            |
| -------------------- | ----------------------------------- |
| Calls not connecting | Check SIP credentials and status    |
| Agent not responding | Verify agent is assigned and active |
| Wrong agent answers  | Check number assignment             |
| No audio             | Test SIP connection                 |

## Related

<CardGroup cols={2}>
  <Card title="Publishing" icon="rocket" href="/publish/publishing">
    Activate your agent
  </Card>

  <Card title="Test Call" icon="phone" href="/test-agent/test-call">
    Test before going live
  </Card>

  <Card title="Flow Canvas" icon="diagram-project" href="/agent-builder/flow-canvas">
    Build your agent flow
  </Card>
</CardGroup>
