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

# Inbound Calls

> Connect phone numbers to AI agents with dispatch rules so your agents automatically answer incoming calls.

The **Inbound Calls** page in the **Campaigns** section is where you connect the phone numbers you own to the AI agents you have built. By creating **Dispatch Rules**, you dictate exactly which agent answers the phone when a customer dials a specific number.

<Frame>
  <img src="https://mintcdn.com/agni/wGEXRTXXwORCEgLm/images/image_a8a7d1.png?fit=max&auto=format&n=wGEXRTXXwORCEgLm&q=85&s=c5441207b6e06db67c871d5eb124ca60" alt="Agni Inbound Calls Dashboard" width="1919" height="1079" data-path="images/image_a8a7d1.png" />
</Frame>

***

## Prerequisites

Before creating dispatch rules, make sure you have:

<CardGroup cols={2}>
  <Card title="At least one agent" icon="robot" href="/guides/agents">
    You need an active, configured agent to answer the phone.
  </Card>

  <Card title="At least one phone number" icon="phone" href="/guides/phone-numbers">
    You must have a purchased or imported phone number available in your workspace.
  </Card>
</CardGroup>

***

## Create an Inbound Campaign

Setting up a new inbound campaign (dispatch rule) takes only a few clicks. Once configured, the route becomes **live immediately** after creation.

<Steps>
  <Step title="Select Phone Number" icon="phone">
    Under **Incoming Calls To**, click the dropdown and select the phone number the public will dial. If you have no numbers yet, follow the **buy one first** link.
  </Step>

  <Step title="Route to Agent" icon="robot">
    Under **Routed To Agent**, click the dropdown and select the AI agent you want to handle the incoming calls.
  </Step>

  <Step title="Configure Schedule & Rules" icon="calendar-days">
    Expand the **Schedule & Rules** section to control when and how inbound calls are handled:

    | Setting                     | Description                                                                                                |
    | --------------------------- | ---------------------------------------------------------------------------------------------------------- |
    | **Timezone**                | The timezone used to interpret all time-window settings.                                                   |
    | **Max Concurrent Calls**    | Maximum simultaneous live calls for this route (Range: 1–10).                                              |
    | **Start Date**              | The date from which this inbound route starts accepting calls.                                             |
    | **End Date**                | The date on which this route stops accepting calls.                                                        |
    | **Call Window Start / End** | Restrict calls to a specific daily time range (e.g., 09:00–18:00). Leave blank to allow calls at any time. |
    | **Active Days**             | Toggle individual days of the week (Mon–Sun) on which the route is active.                                 |
  </Step>

  <Step title="Create Route" icon="bolt">
    Click the **+ Create Route** button to activate the campaign. Your agent is now live and will start handling inbound calls immediately.
  </Step>
</Steps>

<Warning>
  **Strict 1-to-1 Mapping:** You can only create **one** inbound call route per phone number. If you want to assign a new agent to a number that is already in use, you must first complete or delete the previous inbound call rule.
</Warning>

***

## Inbound Route Detail View

Once a dispatch rule is created, it will appear in your **Inbound Call Rules** list. Clicking on a specific active rule opens the detailed Route Dashboard. This gives you a comprehensive overview of how that specific number is performing.

<Frame>
  <img src="https://mintcdn.com/agni/tftxfe3ZDLj3PsLA/images/image_a8a71c.png?fit=max&auto=format&n=tftxfe3ZDLj3PsLA&q=85&s=ec4f107c9ef1e4708b93df80b95ab6ee" alt="Inbound Route Detailed Overview showing metrics and schedule" width="1377" height="765" data-path="images/image_a8a71c.png" />
</Frame>

The detail view provides several key pieces of information:

* **Identity & Routing:** Quickly verify the **Assigned Agent**, the specific **Agent ID**, and the designated **Phone Number**.
* **Performance Metrics:** Monitor volume at a glance with counters for **Total Completed** calls, calls currently **Live In Progress**, and the total number of **Recent Calls**.
* **Schedule & Status:** The Schedule block confirms when the route was **Created**, when it ended (or if it is **Still active**), and provides the unique **Dispatch Rule ID**.
* **Recent Calls Log:** A dedicated table at the bottom of the page displays a live feed of all the calls that have recently come through this specific inbound route.

***

## Common Routing Patterns

<AccordionGroup>
  <Accordion title="One agent, one number" icon="phone">
    The simplest setup. Buy a number, assign it to an agent, and you're live. Ideal for a single product line or department.
  </Accordion>

  <Accordion title="Multiple numbers, different agents" icon="phone-volume">
    Buy separate numbers for sales, support, and billing. Create a dispatch rule for each, routing to specialized agents with different prompts and tools.
  </Accordion>

  <Accordion title="Business-hours only routing" icon="clock">
    Use the **Call Window Start/End** and **Active Days** settings to restrict when your agent answers calls. For example, set window 09:00–18:00 on Mon–Fri to only route calls during business hours.
  </Accordion>

  <Accordion title="Campaign-specific numbers" icon="bullhorn">
    Use unique phone numbers for different marketing campaigns or ad channels. Route each to the same agent but use dynamic variables to track which campaign the caller came from.
  </Accordion>
</AccordionGroup>

***

## API Reference

To manage phone numbers and agents programmatically, refer to the following API endpoints:

<CardGroup cols={2}>
  <Card title="Telephony API" icon="phone" href="/api-reference/telephony/list-purchased-numbers">
    List, buy, and manage the phone numbers available for routing.
  </Card>

  <Card title="Agent API" icon="robot" href="/api-reference/agents/list">
    Retrieve the list of your configured AI agents to use in dispatch rules.
  </Card>
</CardGroup>
