---
title: "Transfer a Phone Call to a Person, Cold or Warm | Micdrop"
description: "Let a Micdrop voice agent transfer a phone call to a person through Twilio, Vonage, Telnyx or Plivo: at once, or after briefing them with a summary of the call."
url: "https://micdrop.dev/docs/transports/call-transfer"
---

# Transfer a Phone Call to a Person, Cold or Warm

`transferCallTool()` lets the agent hand a phone call to a person or another line. The assistant says it transfers the caller, then the transport sends the call through the API of its provider and leaves.

```typescript
import { endCallTool, MicdropServer } from '@micdrop/server'
import { transferCallTool, TwilioTransport } from '@micdrop/telephony'

const transport = new TwilioTransport(socket, {
  accountSid: process.env.TWILIO_ACCOUNT_SID,
  authToken: process.env.TWILIO_AUTH_TOKEN,
})

new MicdropServer(transport, {
  turns: { vad: 'silero' },
  agent: new OpenaiAgent({
    apiKey,
    systemPrompt: 'You answer the phone for Acme...',
    tools: [endCallTool(), transferCallTool({ to: '+14155550100' })],
  }),
  stt,
  tts,
})
```

The transfer waits for the answer that announces it to be played, so the caller hears “I’m transferring you to a colleague” before the line moves. The [call transfer tutorial](/blog/ai-phone-call-transfer-nodejs) builds a complete Twilio receptionist around it.

## Cold and warm transfers

Mode

What happens

`cold`, the default

The call goes to the number at once, and the assistant leaves

`warm`

The assistant asks the caller to hold and calls the person. Once they pick up, they hear a summary of the call, then the caller joins them

In `warm` mode, the model writes the summary as a parameter of the tool: who calls and what for. The voice of the provider reads it to the person before the caller joins, so they start the conversation knowing the case.

```typescript
transferCallTool({ to: '+14155550100', mode: 'warm' })
```

While the phone rings, the caller stays on the line with the assistant. When nobody picks up, the line is busy or the person hangs up before joining, the assistant keeps the call and the model hears why, so it can tell the caller and offer another way to help.

## Several destinations

With `destinations`, the model picks one by name, guided by its description:

```typescript
transferCallTool({
  destinations: [
    { name: 'sales', to: '+14155550100', description: 'to buy or upgrade a plan' },
    { name: 'support', to: '+14155550199', description: 'for a problem with the service' },
    { name: 'desk', to: 'sip:desk@pbx.example.com' },
  ],
})
```

A destination is a phone number in E.164 format or a SIP URI. Anything else throws when the tool is created, so a typo shows at startup rather than during a call.

## Options

Option

Description

`to`

The one destination

`destinations`

Destinations the model picks from, by `name`, with an optional `description`

`mode`

`cold` (default) or `warm`

`from`

Number the person reached sees, one of your account

`timeout`

How long to let the phone ring, in seconds, 30 by default

`name`

Name of the tool, `transfer_call` by default

`description`

Tells the model when to transfer, in place of the default wording

## By provider

Each transport transfers through the API of its provider, with the credentials it was given. A transport without them throws a clear error when the agent tries.

Provider

Credentials

Cold

Warm

Twilio

`accountSid`, `authToken`

Updates the call with a `<Dial>`

The person is called into a conference with a `<Say>` of the summary, then the caller joins it

Vonage

`applicationId`, `privateKey`

Moves the call to a `connect` NCCO

The person is called into a named conversation after a `talk` of the summary, then the caller joins it

Telnyx

`apiKey`, and `connectionId` for warm

The `transfer` command of Call Control

The person is dialed, hears the summary with `speak`, then both calls are bridged

Plivo

`authId`, `authToken`, `transferUrl`

Transfers the call to the XML of `transferUrl`

Not available

### Twilio

`from` defaults to the caller ID of the caller for a cold transfer, and to the number of your account on the call for a warm one. While the person hears the summary, the caller hears the hold music of Twilio, or the `holdMusicUrl` of the transport (`''` for silence). If the person hangs up before joining, the caller hears `transferFallbackTwiml`, an apology and a hang up by default.

### Vonage

`from` defaults to the number of your account on the call, which Vonage requires to be one of yours. The transport has to know the call, which `vonageConnectNcco({ call })` or `vonageCall()` passes along. `holdMusicUrl` plays to the caller during the summary.

### Telnyx

Telnyx reports the steps of a call (picked up, summary spoken, hung up) to the webhook of the application only. Hand its events to a `TelephonyCalls`, which routes them to the transport:

```typescript
import { TelephonyCalls, TelnyxTransport } from '@micdrop/telephony'

const calls = new TelephonyCalls()

// The stream
calls.add(new TelnyxTransport(socket, { apiKey, connectionId }))

// The webhook of the Call Control application
app.post('/telnyx/webhook', async (request) => {
  if (calls.telnyxWebhook(request.body)) return
  // ... the events of your own application
})
```

`briefingVoice` and `briefingLanguage` choose the voice of the summary, `AWS.Polly.Joanna-Neural` by default.

### Plivo

Plivo transfers a call only to an XML it fetches. Give the transport a `transferUrl` that points to a route of your server, which answers with `plivoTransferXml()`:

```typescript
const transport = new PlivoTransport(socket, {
  authId,
  authToken,
  transferUrl: ({ to }) =>
    `https://example.com/plivo/transfer?to=${encodeURIComponent(to)}`,
})

app.post('/plivo/transfer', async (request, reply) => {
  reply.type('text/xml')
  return plivoTransferXml({ to: request.query.to })
})
```

## From your own code

The transport transfers without the tool too, for instance from a rule of your application:

```typescript
await transport.transfer({ to: '+14155550100' })

const result = await transport.warmTransfer({
  to: '+14155550100',
  briefing: 'Jane Doe, about a refund on order 1234.',
})
if (!result.transferred) console.log(result.reason) // busy, no-answer...
```

The transport emits `Transferred` with the destination, and the call ends for Micdrop: `MicdropServer` emits `End` while the caller goes on talking with the person.
