Skip to main content
When a caller needs a person, the agent can transfer the call. Configure one or more destinations, each a phone number or a SIP endpoint such as your PBX, and the agent gains a built-in _transfer_call tool it invokes when the caller asks for a human or the request clearly needs one. With several destinations, the agent picks the one whose name and description best match the conversation, so a single number can act as a switchboard. Transfers apply to phone calls only. Two modes decide what the handoff feels like:

Prerequisites

  • A phone number bound to your agent, answering inbound calls. See Inbound calls.
  • The number must support transfers. Numbers purchased from the platform inventory (provider: "twilio") do; see Phone numbers. Imported SIP numbers support cold transfers when the carrier honors SIP REFER to the destination (on Twilio, enable Call Transfer and allow PSTN transfers on the trunk), and warm transfers when a termination is configured.

Configure destinations

On the agent’s Phone page, under Inbound calls, turn on Call transfer and fill in each destination: a name, the phone number or SIP URI, when to transfer there, its announcement, and the mode. A Warm destination also gets a handoff choice and the warm transfer settings. With more than one destination, each needs a distinct name. Changes take effect on live calls after you publish.
A literal phone number must be E.164 and is limited to a set of supported countries. A number outside the list is rejected with 422 Unprocessable Entity and an error naming the allowed country codes. The transfer card in the console shows the current list. For a number that contains variables, see Choosing the number per call. A missing label, or two labels that differ only in case, is rejected the same way. There is no cap on the number of destinations, but every description is part of the agent’s tool instructions on every turn, so keep the list to what a receptionist could hold in their head.

How the agent decides to transfer

Configuring a destination is what enables the built-in _transfer_call tool: an empty destination list removes it. Unlike the toggled system tools, you won’t find it in the tools config section; it ships automatically on phone sessions whenever a valid destination exists. Your system prompt decides when the agent transfers. Only when it says nothing about transfers does the built-in default apply, which is conservative: the agent transfers when the caller asks for a person, or when the request clearly needs one and the agent cannot help further. A switchboard agent should say so plainly, for example “Route the caller to the right team as soon as you know what they need; do not try to answer billing or technical questions yourself.” With several destinations, the tool gains a destination argument listing every label, and its instructions carry each destination’s description. The agent picks the destination whose description matches what the caller needs based on the conversation so far, asks one short question when the need is unclear, and otherwise takes the closest match. Write descriptions the way you would brief a receptionist: what the team handles, in the caller’s words.
The prompt can loosen the policy as well as tighten it: “Transfer to a human whenever the caller mentions a refund” or “Never transfer before collecting the caller’s name and account number.” See Tools for how the agent chooses between its tools.

The transfer announcement

Right before a call is transferred, the agent says one short sentence so the caller knows what is happening, for example “One moment, I’m connecting you to billing.” The Transfer announcement setting on each destination chooses where that sentence comes from. These apply to every option:
  • The sentence is said only once. If the agent already spoke in the same reply as the transfer, nothing is added. For example, if your system prompt has the agent say “Thanks, connecting you now.” itself, the caller hears that line and the fixed message is skipped. With Fixed message or Off, remove any instruction in your system prompt about what to say when transferring.
  • The caller cannot interrupt the sentence.
  • Once the transfer starts, the caller can no longer answer, so the agent asks its questions before transferring (see Questions before transferring). Don’t put a question in a fixed message either.
On each destination card, the Transfer announcement control sits above the transfer mode. Choosing Fixed message shows a field for the line.
As with every config edit, the change takes effect on live calls after you publish.

Questions before transferring

If the agent tries to transfer while its announcement asks the caller something, for example “Before I connect you, what is your account number?”, the transfer is held back. The agent asks the question in its reply, waits for the answer, and transfers after that. This applies to every announcement option, since a question means the agent has not asked it yet. This is on by default. To let the agent transfer with a question, turn off Don’t transfer on a question on the Call transfer card, or set conversation.transfer_refuse_questions to false. It is one setting for the whole agent, not part of the destination list, so you can change it without resending your destinations.

Choosing the number per call

When the right person to call changes often, such as an on-call rotation, don’t republish the agent for every change. Put a dynamic variable in the destination’s phone_number and supply the number for each call:
A number with variables is saved as a template instead of being checked as a number. When you save, it is rejected with 422 Unprocessable Entity unless it follows these rules:
  • The whole number can be one variable ({{oncall_number}}), or digits, a leading + and variables combined (+1{{area}}{{local}}).
  • A variable name starts with a letter and uses only letters, digits and underscores, or is a {{system.*}} variable that exists. Spaces just inside the braces are allowed. Anything else, such as {{on-call}} or {{1st}}, is not a variable, so the value is checked as a literal number and rejected.
  • Besides the variables, only digits and a + at the very start are allowed. Spaces, dashes, brackets, extensions (+1 {{area}} 555 0199) and unmatched braces ({{oncall_number}}}) are rejected.
  • At most 100 characters.
The value comes from the call itself:
  • Inbound calls: your inbound call webhook returns it in dynamic_variables.
  • Outbound calls: pass it in dynamic_variables on the outbound call request.
  • Neither supplies it: the default value you set for that variable on the agent is used (see Default values). This is the fallback number: it applies when the webhook times out, fails, or leaves the variable out. There is no separate fallback field.
Inbound call webhook response
In an agent test, no inbound call webhook is called. The test uses its own dynamic variables and the agent’s default values, so to try a transfer to a destination whose number is a variable, give that variable a value in the test’s dynamic variables (dynamic_variables over the API) or set a default for it on the agent. Otherwise the destination does not exist in that test. The value must be an E.164 string with the leading +. Only surrounding whitespace is trimmed; the number is not reformatted. "+14155550199" works, while "(415) 555-0199", "415-555-0199" and the JSON number 14155550199 (which renders without the +) do not.

When no valid number can be filled in

The number is checked after it is filled in, with the same rules as a literal one: it must be E.164, and its country must be in the same supported list a literal number is checked against (the transfer card in the console shows it). If the call has no valid number, that call skips the destination and the rest of the list works as usual. This happens when:
  • the variable has no value from the call and no default, whatever the agent’s If a variable has no value setting (on_missing in the API), and a missing transfer number never rejects the call;
  • the value is not a valid E.164 number, or its country is not supported;
  • a placeholder is still unfilled after substitution.
The skipped destination is not offered to the agent on that call, so if the caller asks for it, the agent can only say it can’t transfer. The next call fills the number in again from scratch. Give the variable a default that is a real number if callers should always have somewhere to go.

Transfer to a SIP endpoint

A destination can be an address on your own phone system instead of a phone number: a PBX, a contact center platform, or a carrier trunk that speaks SIP. The call goes to that system directly, and it can carry details about the call in SIP headers, so your system can route it or show the caller’s record before anyone answers.
On the destination, set Destination type to SIP endpoint and enter the address in SIP URI. Two more sections appear: SIP authentication, for a server that asks for a username and password, and Custom SIP headers. The rest of the destination (name, when to transfer, mode, announcement) works as it does for a phone number.

The SIP URI

The URI holds only the address, in at most 512 characters. A password (sip:user:secret@host), headers (?X-Name=value) or any other parameter is rejected with 422 Unprocessable Entity. Use authentication and custom SIP headers for those. Unlike a phone number, the URI is fixed text and can’t contain dynamic variables. The list of supported countries applies to phone numbers only, not to SIP endpoints.

Warm and cold transfers to a SIP endpoint

The caller and your team member have the same experience as with a phone number, described under cold and warm transfers. What changes is who places the call to your endpoint, and that decides what your endpoint receives. Use a warm transfer when your endpoint asks for a password or must receive the headers. A warm destination with warm_connect: "direct" connects the caller as soon as your endpoint answers, with no briefing. When a call is on a number without cold transfers to SIP endpoints enabled, a cold SIP destination can’t be used: the transfer does not start and the agent stays on the line with the caller.

Custom SIP headers

Custom headers carry what your system needs to know about the call, such as an account id, a ticket number or the queue to route to.
  • A destination can have up to 20 headers.
  • A name starts with X-, followed by letters, digits and hyphens, at most 64 characters in all. User-to-User is also accepted.
  • Names are not case-sensitive, so two spellings of one name are rejected. Names that start with X-Fish- are reserved for the headers the platform adds.
  • A value is 1 to 1024 printable ASCII characters (128 for User-to-User).
Headers that break these rules are rejected with 422 Unprocessable Entity when you save. A value can contain dynamic variables, custom and system ones, on their own or mixed with text, such as acct-{{account_id}}. They are filled in once, when the session starts, so a header can’t carry something the caller says later in the call. If a header can’t be filled in for a call, that call skips the destination, as it does for a number that can’t be filled in. The rest of the list works as usual. This happens when:
  • a variable has no value from the call and no default, whatever the agent’s If a variable has no value setting (on_missing in the API);
  • the value is empty once the variables are filled in, for example {{system.caller_number}} on its own when the caller hides their number;
  • the filled-in value contains characters outside printable ASCII, such as accented letters or Chinese characters, or is longer than the limit.
Give each variable a default value if callers should always be able to reach the destination. How the headers reach your endpoint depends on the mode:
  • Warm: they are on the INVITE your endpoint receives. On an outbound call placed with per-call SIP headers, those are sent too, and the destination’s value wins when two names match.
  • Cold: the platform hands them to the carrier together with your URI. They reach your endpoint only if the carrier copies them onto the call it places, and some carriers, Twilio included, don’t. Use a warm transfer when your endpoint must receive them.

Headers the platform adds

Every transfer to a SIP endpoint also carries headers set by the platform, so you don’t need a header of your own to tell which call it is or who is calling. With X-Fish-Session-Id, the system that takes the call can look the conversation up: GET /v1/agent/sessions/{session_id} returns the transcript so far and the rest of the session. On a warm transfer, all of them are on the INVITE your endpoint receives. Say a caller at +15551234567 dials your agent’s number +14155550100, the call’s customer_id variable is cus_8812, and the agent transfers to the destination in the request above. Your endpoint then gets an INVITE with these headers among the standard ones:
On a cold transfer the platform’s headers go to the carrier like your own, and reach your endpoint only if the carrier passes them on. On an outbound call, the two number headers are not sent. If your endpoint needs the numbers there, add your own headers with {{system.caller_number}} (the number that was called) and {{system.dialed_number}} (the number the call was placed from).

Authentication

Many SIP servers answer a call with a 401 or 407 challenge and expect a username and password (digest authentication). Give a warm destination both, and the platform answers the challenge when it calls your endpoint. Only warm destinations can have them: a cold transfer is placed by the carrier, so a cold destination with credentials is rejected with 422 Unprocessable Entity.
On a warm SIP destination, fill in Username and Password under SIP authentication. A saved password can’t be viewed again. Leave the field blank to keep it. If you change the server address or the username, enter the password again.
A new password applies to calls after you publish. A call in progress keeps the password of the version it started on. When your server does not accept the credentials, or asks for some and the destination has none, the attempt is recorded as dial_failed with your server’s answer in sip_status, usually 401, 407 or 403. See Transfer results.

What happens on a cold transfer

The agent says its announcement and, once that finishes playing, the call is handed to the carrier. The caller hears a dial tone while the destination rings; the agent drops out and its session ends at the handoff. If the handoff is refused (the destination is unreachable, or the number doesn’t support transfers), the agent stays on the line, apologizes, and keeps helping. It can attempt the transfer again later.

What happens on a warm transfer

1

The caller goes on hold

The agent says its announcement, then hold music starts. With off, hold music starts as soon as the agent finishes its current reply.
2

The platform dials your human agent

A separate, private consult call rings the destination for up to the ring timeout, 30 seconds by default. By default your team sees your agent’s phone number as caller ID. You can show the caller’s own number instead, see Caller ID on transfers.
3

The agent briefs the human

The agent greets the human, reads out the caller’s number digit by digit with a pause between groups when the caller ID is known, and relays short third-person notes on who is calling and what they need, generated from the conversation so far. The caller hears none of this. warm_briefing_instructions scripts the introduction; see Customizing the briefing. With Wait for a person to answer on, the agent first waits for the other side to speak.
4

The calls merge

With warm_connect: "confirm" the merge waits for the human to agree, with briefing it happens right after the briefing, and with direct the human is connected as soon as they answer, without a briefing. The hold music stops, the human joins the caller, and the agent leaves without another word.
If the human cannot be reached, declines, or the consult call hits voicemail, the caller comes off hold and the agent apologizes and continues helping. To keep the agent from briefing a voicemail or a phone menu, turn on Wait for a person to answer. It can retry if the caller asks. If the caller hangs up while on hold, the agent briefly tells the human what happened and ends the consult call.

Customizing the briefing

By default the agent introduces itself, reads out the caller’s number, relays the notes, and asks whether the person can take the call. A warm destination’s briefing instructions replace that introduction. The notes generated from the conversation and the handoff itself stay as they are: the agent still waits for a yes (or connects right away with direct), so the text only has to say what you want relayed and how. The text is rendered with dynamic variables when the session starts, so it can carry facts the conversation may not mention. A custom text is spoken as written, so if it should include the caller’s number, put it in yourself with {{system.caller_number_spoken}}, which arrives pre-grouped for speech (+1; 4 1 5; 5 5 5; 0 1 2 3) so the voice reads it digit by digit in any language; see Reading a number out loud. Two things to keep in mind. The variables are filled in once, when the session is created, so an order number the caller mentions later reaches the colleague only through the notes. And a withheld caller ID (the carrier sent anonymous, no digits, or one of Twilio’s placeholder numbers) renders as an empty string, so write the text to read well without it; {{system.caller_id_withheld}} is "true" then.
On the destination card, choosing Warm shows a Briefing instructions field beneath the handoff choice. Leave it empty to keep the default introduction.

Warm transfer settings

These settings apply to each warm destination. In the console, they appear on the destination card once you choose Warm. Leave a timeout empty to keep its default. Through the API, set them on the destination. Like every config edit, changes take effect on live calls after you publish.

Timeouts

Waiting for a person to answer

With Wait for a person to answer on, the agent says nothing after the human’s line answers. It waits for the other side to speak, then works out what answered:
  • It is off by default, and available for confirm and briefing. direct connects as soon as the human answers, so there is nothing to wait for.
  • Leave it off for lines where people can only be reached through a phone menu, because the menu stops the transfer. To have the agent get through the menu, see Pressing keys on a transfer.
  • The agent goes by what is said, not by the voicemail beep. A greeting that opens like a live person (“Hi, this is Amy.”) and then pauses can still get the briefing. With confirm, the confirm timeout still brings the caller back. With briefing, the caller is connected once the briefing ends.
  • Pair it with a short confirm timeout, such as 20 seconds, so a pickup where nobody speaks comes back quickly.
Request
Since the destination list is replaced as a whole on every write, send every destination you want to keep.

Pressing keys on a transfer

Pressing keys on a transfer is in Beta. The instructions the agent gets for it, and when exactly a key goes out, may still be tuned.
Some destinations are answered by an automated phone menu before a person picks up, such as a company’s main line. With Press keys on for a destination, the agent can get through that menu on the consult call, then brief the person it reaches. It presses keys with the _press_keys tool and stays silent with _skip_turn while the menu or a hold message plays, the same two tools as Press keys on outbound calls. The caller is on hold meanwhile and hears none of it. The setting belongs to the destination and does not depend on the agent’s own Press keys switch. It works the same on inbound and outbound calls. It is available for confirm and briefing. A direct or cold transfer has no agent on the call to the destination, so no keys are pressed. Turn it on only for a destination that a phone menu answers. On a line where a person picks up directly it adds nothing.
On the destination card, turn on Press keys. A text box appears below it for how to get through this number’s menu, for example “Press 2 for billing, then enter extension 204.” It is optional. Without it, the agent picks keys from the destination’s name and description and from what the caller asked for.
Three other settings of the destination decide how well this works.

Caller ID on transfers

When the agent transfers a call, your team member’s phone shows a caller ID. You choose which number it shows: The choice is set on each phone number, and applies to every transfer on that number, cold and warm. It is available on numbers you bought on Fish Audio. For imported numbers, see Imported SIP numbers. If the caller hides their number, a warm transfer shows the agent’s number instead. A warm transfer to a SIP endpoint always shows the agent’s number, whichever option you choose. The caller’s own number is in the X-Fish-Original-Caller-Number header, see Headers the platform adds.
  • For all numbers of an agent: open the agent’s Phone page and use the Show the caller’s number on transfers switch in the Call transfer section.
  • For one number: on the Phone numbers page, open the number’s menu and choose Transfer caller ID.
You don’t need to publish the agent.
The caller ID is a setting on the number, not part of the agent, so it needs no publish and rolling back the agent leaves it as it is. Warm transfers use a new choice from the next call.

Transfer results

Every transfer attempt is recorded on the session, including the ones that failed:
  • In the console: open the call from the Conversations page. Each attempt has a card in the timeline with the destination, the result and why a failed one failed. A connected transfer also shows how long the caller and your team member talked and how their call ended.
  • Through the API: each attempt is a transfer item in the session’s items. See Transfer items for every field.
A session with a successful transfer ends with end_reason escalated, however the call goes after the handoff. A failed attempt does not make the session escalated. What the agent does after a failure is described under cold and warm transfers.

Outcomes

outcome is null while an attempt is in progress. New values may be added, so don’t reject ones you don’t recognize.

Why a call did not connect

dial_failed and refer_failed carry dial_status, which groups the carrier’s answer the same way as an outbound call’s dial_status: sip_status is the carrier’s final SIP response code as received, and null when the carrier gave none. When a cold handoff rings past the time limit with the caller still on the line, the attempt is refer_failed with dial_status no_answer and no sip_status.

Reason codes on the tool result

The _transfer_call tool call that started a failed attempt has a tool_result with status failed. Its error_detail says why the attempt did not connect, as one code you can count, alert on and write rules against: A cold transfer only sees the carrier’s answer to the handoff, so on the destination’s side it can only be not_placed, busy or no_answer. The caller hanging up takes precedence over the carrier’s code: a caller who hangs up while a cold destination rings is caller_hangup, not no_answer, even though the carrier answers 487. Leave caller_hangup out when you count unreachable destinations. error_detail also carries sip_status, the carrier’s SIP response code when it gave one and null otherwise, and status_message, a readable explanation. The result’s error text starts with transfer_failed: <status_code> — , so rules that match the text keep working. New codes may be added, so don’t reject ones you don’t recognize. Results recorded before reason codes existed have error_detail null. See Item types for the rest of the tool_result.

After a successful transfer

merged and referred items carry three facts about the call between the caller and your team member: The end reason is caller_hangup, transfer_target_hangup, conversation_timeout (the agent’s maximum call duration was reached, counted from the start of the call), connection_lost (a line dropped), or null when the platform could not tell. See After the transfer. A warm transfer’s values are there once the call ends. On a cold transfer the platform leaves the call at the handoff, so the values come from the carrier’s call record and appear up to about an hour after the call ends. They never appear for cold transfers on imported SIP numbers, because that call record stays with your carrier.

Limitations

  • Phone calls only: web and SDK sessions have no phone leg to hand off, so the _transfer_call tool never ships for them.
  • Supported countries: destination numbers are limited to an allowlist of country codes.

Billing

Time after a transfer is billed separately from agent time, at a cold or warm transfer rate per minute. The agent rate stops when the call is handed over (cold) or when the caller and the person are joined (warm); from that point the call is billed as transfer minutes. Current rates are on the Pricing page.

Going further

Inbound calls

Bind a number and put your agent on the phone.

Phone numbers

Number management, providers, and agent bindings.

System tools

The other built-in capabilities, like hanging up.

Conversation history

Review transcripts and recordings of transferred calls.