# Retell agents on Voice Logica

Your Retell agent answers your number through Voice Logica, calls out from it, and transfers callers to your team, blind or warm. Every call is recorded in Voice Logica and can be analysed next to your team's calls.

> **Being rolled out:** If you don't see **Connect an AI agent (ElevenLabs, Vapi, Retell)** on your line, ask us in **Support** and we set it up for you.
## Before you start

- Your own line in **Telephony**: a SIP trunk from [your own carrier](https://docs.voicelogica.ai/telephony/your-own-carrier/) or your [office PBX](https://docs.voicelogica.ai/telephony/connect-your-pbx/). Voice Logica's own numbers can't carry an outside agent.
- Your agent in Retell.
- Trunk minutes on your plan (see [What is charged](https://docs.voicelogica.ai/integrations/ai-platforms/#what-is-charged)).

A Retell API key is optional. With a key, **Connect** sets up the Retell side in one click. Without one, you copy a few values into Retell yourself ([Set it up without an API key](#set-it-up-without-an-api-key)).

## 1. Send your number's calls to the agent

1. **Open the line**

   **Telephony - Trunks**, open the line that has your number.

2. **Choose the destination**

   Under **Default Inbound Destination**, set **Destination Type** to **SIP URI (AI platform or SIP system)** and pick the **Retell** preset.

3. **Connect the agent**

   **With an API key:** in **AI agent on this line**, click **Connect an AI agent (ElevenLabs, Vapi, Retell)**, choose **Retell**, paste your key if none is saved yet, pick the **Agent** and click **Connect**.

   **Without a key:** follow [Set it up without an API key](#set-it-up-without-an-api-key) below.

4. **Call your number**

   Your Retell agent answers. The call appears in **Calls**.

**Connect** does the Retell side for you: it imports your number in Retell with this line's address and a login only Retell uses, and assigns your agent. The same number in Retell is now set up to call out through your Voice Logica line too (section 3). The key is in **Retell dashboard - Settings - API Keys**.

### Set it up without an API key

1. **Open Set it up by hand**

   On the line, in **AI agent on this line**, open **Set it up by hand**. It shows the **Number to import** and the line's **SIP address**.

2. **Create a login, for outgoing calls only**

   If your agent will also call out, click **Create login** and copy the **Username** and **Password**. The password is shown only once. Incoming calls and transfers work without a login.

3. **Connect the number in Retell**

   In Retell, **Phone Numbers**, add a number with **Connect to your number via SIP trunking**, and fill in:

   | Field in Retell | Value |
   |---|---|
   | Phone number | The **Number to import**, exactly as shown (for example `+302101234567`) |
   | Termination URI | The **SIP address** (`<line ID>.sip.voicelogica.ai`) |
   | Transport, if asked | TCP |
   | SIP trunk username and password | The **Username** and **Password** from step 2 (leave empty if you skipped it) |

4. **Assign your agent**

   On the number in Retell, choose your agent for inbound calls, and for outbound calls if it will call out. Then call your number.

To send only some numbers to the agent, use an [inbound route](https://docs.voicelogica.ai/telephony/routing/) with the same **SIP URI** destination.

## 2. Transfers to your team

In Retell, add the **Transfer Call** function to the agent and use a **cold transfer** sent as **SIP REFER**. Voice Logica then rings the destination. Retell's own warm transfer places a separate new call instead; on Voice Logica you get a warm transfer with the `warm-` prefix below.

Your line's address is `<line ID>.sip.voicelogica.ai`: Retell shows it on your imported number as its termination address.

| You want | Transfer to |
|---|---|
| Blind transfer to a person | `sip:108@<line ID>.sip.voicelogica.ai` (108 = their extension) |
| Blind transfer to a team | `sip:<group extension>@<line ID>.sip.voicelogica.ai` |
| Blind transfer to an outside number | `+302101234567` |
| Warm transfer to a person | `sip:warm-108@<line ID>.sip.voicelogica.ai` |
| Warm transfer to an outside number | `sip:warm-+302101234567@<line ID>.sip.voicelogica.ai` |

**Blind:** the caller is passed straight on and the agent leaves the call.

**Warm:** the caller hears hold music while the person rings. When they answer, they are connected and the agent leaves.

**Tell your team why they get the call.** If your transfer settings allow custom SIP headers, add `X-VL-Summary` with a short summary. Voice Logica saves it with the call as the transfer reason.

Use full numbers or Voice Logica extensions. Short service numbers, emergency, premium-rate, shared-cost and satellite numbers are refused.

## 3. Outgoing calls from your agent

After **Connect**, or with the login set up by hand, your number in Retell places its calls through your Voice Logica line.

- Start them from Retell as usual: a phone call from the number, a batch call, or the Retell API.
- The person you call sees your number.
- The calls appear in **Calls** as outgoing, with recording and analysis.

**Outgoing only.** A line can be connected for outgoing calls only: your agent calls out through it and incoming calls keep going where they go today. The line then shows that your agent *places its calls through this line* and that *incoming calls are not affected*. Ask us in **Support** to connect it this way.

## 4. Transfers during outgoing calls

The same transfers work when your agent placed the call. They move **the person you called**:

- **Blind:** the person is passed on and the agent leaves.
- **Warm:** the person hears hold music while we ring your colleague, who sees **the customer's number**. When your colleague answers, the two are connected and the agent leaves.

## 5. See every call analysed

- Every call, incoming and outgoing, is in **Calls**, including the part your team handled after a transfer.
- Each call has its **recording**. With analysis on, also the **transcript** by speaker, a **summary** and your **call results**.
- Callers are matched to your **contacts**, with their history, and **workflows** can run when a call ends.
- Your team's own calls are analysed with the same results, so you compare the agent and your people on the same scale.

Each connected line has an **Analysis** switch, on by default. While it is on, each call is transcribed and, at the end, analysed by the default analysis agent in [Call settings](https://docs.voicelogica.ai/telephony/call-settings/): the summary and whatever else that agent is set up to produce. That uses analysis minutes as well as trunk minutes. If you have no analysis minutes left, calls still go through, without a transcript, on trunk minutes only. Turned off, the line's calls are never transcribed. While the connection is being rolled out, we set the switch for you.

## 6. Try the same agent on Voice Logica

Click **Import agent** on the line (or **API Keys** - **AI platforms** - **Import an agent**). Voice Logica copies the prompt, greeting, voice, model, transfers, tools and knowledge. Your custom functions become workflows that run during the call. Compare both in **Calls**, and use **Update agent** when you change the original. More in [Try a Voice Logica agent](https://docs.voicelogica.ai/integrations/ai-platforms/#try-a-voice-logica-agent).

## If something doesn't work

| What you see | What to do |
|---|---|
| The transfer places a new call instead of passing the caller | Use a cold transfer sent as **SIP REFER**. |
| A transfer to a short number is refused | Use the full number, or the Voice Logica extension of the person or team. |
| Outgoing calls end at once, without ringing | Your carrier must allow this line to call out. Connect the agent to a line that can call out. |
| Calls are refused before they ring | Your plan has no trunk minutes left. See **Billing**. |
| Connect says the line is a Voice Logica number | Outside agents run on your own SIP trunk or office PBX. Connect that line instead. |
