# Routing

**Telephony - Routing** is the override layer. The trunk default already sends unrouted calls somewhere. Open this tab only when *one* number (or *one* outbound prefix) should not follow that default.

If every inbound DID on the trunk lands on the same agent, skip this page. Adding a route "just in case" is how the wrong agent answers.

Two sub-tabs sit under Routing: **Inbound** and **Outbound**. You cannot add either until **Trunks** has a SIP trunk (and, for most routes, numbers on that trunk).

  <ShotPlaceholder
    src="/assets/telephony/routing.png"
    name="tel-routing"
    alt="Telephony Routing Inbound empty state"
    capture="Telephony Routing Inbound."
  />

When there is no trunk yet, the page shows a banner: **Add a trunk first. Inbound and outbound routes need a SIP trunk before you can add them.** with **+ Add trunk**. **+ Add Inbound Route** stays disabled. The empty list says **No inbound overrides — every number follows its trunk default.**

## Which sub-tab

- **This DID should not follow the trunk default** — turn on **Inbound** (needs **+ Add Inbound Route**. Skip this if every number on the trunk already lands on the right agent.)
- **This prefix / caller-ID pool must leave on that trunk** — turn on **Outbound** (needs **+ Add Outbound Route**. With one trunk, outbound already uses it. You need numbers on the trunk before you can add a route.)

You can also add a route from the agent's **Channels - Telephony** tab when that control is available. That creates an inbound route pointed at *this* agent - the same object as **Telephony - Routing - Inbound**.

## On the agent

| Agent place | What this tab supplied |
|-------------|------------------------|
| **Channels - Telephony** (add route, when shown) | An inbound override locked to *this* agent. Same row you see under **Inbound**. |
| **Call handling - Outgoing** | How the agent *behaves* on an outbound call - [Outgoing](https://docs.voicelogica.ai/outbound-calls/outgoing/). Which **trunk** and **caller ID** carry the call is the **Outbound** sub-tab here. |
| Trunk default | If you never add a route, [Your own carrier](https://docs.voicelogica.ai/telephony/your-own-carrier/) destination is what answers. |

## Time-based inbound (later)

On **Add Inbound Route** you can set office-hours rules and after-hours / holiday destinations (AI agent, user, user group, conference room, external number / bridge), when those controls appear. Skip this until one DID should land somewhere else after close.

## First setup - only when a second number needs a different landing

1. **Confirm the trunk default is right for most numbers**

   [Your own carrier](https://docs.voicelogica.ai/telephony/your-own-carrier/) - destination = the usual agent. Call one DID. If that already works, you do not need a route.

2. **Open Telephony - Routing - Inbound**

   If you see **Add a trunk first**, create the trunk and add numbers, then come back. You cannot put the same DID on two inbound routes.

3. **+ Add Inbound Route**

   Pick the number(s) that should *not* follow the default. Pick the destination (this AI agent, a user, a group, a conference, or an external number / bridge). Save.

   Until a trunk exists, the form is blocked. The banner and disabled **+ Add Inbound Route** look like this:

     <ShotPlaceholder
       src="/assets/telephony/routing-form.png"
       name="routing-form"
       alt="Add Inbound Route disabled until a trunk exists"
       capture="Routing banner Add a trunk first."
     />

4. **Call that DID**

   Open **Calls**. If the default agent still answers, the route is inactive, the numbers bypass it, or you dialed a different DID.

5. **Outbound only when two trunks exist**

   **+ Add Outbound Route** - which trunk carries the call, which trunk numbers can be caller IDs. Leave this until prefixes or caller-ID pools actually differ.

## What "broken" looks like

- **+ Add Inbound Route** disabled with **Add a trunk first** - no SIP trunk yet.
- **+ Add Inbound Route** disabled after a trunk exists - every inbound number is already on a route, or the trunk has no free numbers.
- **+ Add Outbound Route** disabled - the trunk has no numbers yet.
- The route exists but callers still hit the default - the route is inactive, or the trunk is disabled.

A disabled inbound route is not a delete. Calls fall through to the trunk default.

## Troubleshooting

**I cannot add an inbound or outbound route**

There is no trunk yet (banner: **Add a trunk first**), the trunk has no numbers, or every inbound number is already on a route. Add or free a number on the trunk first.

**I added an inbound route and the default agent still answers**

The route is off, the DID is not on that route, or you dialed a different number. Check the route row status and chips.

**Do I need routing for my first Voice Logica number?**

No. Assign the DID, confirm it rings this agent, stop. Routing is for a second landing place.

## Next Steps

[Your own carrier](https://docs.voicelogica.ai/telephony/your-own-carrier/) - trunk default, before you override it.  
[User Groups](https://docs.voicelogica.ai/telephony/user-groups/) / [Conference Rooms](https://docs.voicelogica.ai/telephony/conference-rooms/) - destinations a route can point at.  
[Transfer](https://docs.voicelogica.ai/telephony/transfer/) - handoff after the DID answers.
