call_transfer tool transfers an active voice call to a SIP endpoint or a PSTN number from within an agent.
Unlike ESCALATE, which routes a conversation through the platform’s human escalation workflow, call_transfer performs a direct telephony transfer. Use it when your agent needs to hand the active call to another SIP or PSTN destination without creating a human escalation task.
When to use
Usecall_transfer when you want to:
- Transfer the active call to a SIP endpoint or to a PSTN number.
- Route calls programmatically based on business logic.
- Integrate with external contact-center or telephony systems.
ESCALATE instead.
Declare the tool
call_transfer is an inbuilt tool, so it needs no HTTP endpoint or Tool Library entry. Declare it in the TOOLS: section so that your flow or reasoning agent can use it.
An agent that routes through
ESCALATE with voice.call_transfer_type: sip or pstn invokes call_transfer itself, so you do not declare the tool for that path. To call call_transfer from a flow or let the model call it, declare it as shown above. A CALL: call_transfer step in a flow without a TOOLS: declaration fails validation with an undefined-tool error.Parameters
Where the destination comes from
For security, the destination is never taken from the model or from values passed in the call. The platform resolves it, so a prompt-injected conversation cannot redirect a live call. PSTN transfers dial the number configured in Project Settings > Agent Transfer > Voice Gateway. The number must be in E.164 format. If it is missing or invalid, the transfer fails and nothing is dialed. SIP transfers use the first destination available from this list:- The destination returned by a
RESOLVE_SIP_DESTINATIONstep earlier in the flow. - The
sip_transfer_idof the matchingESCALATErouting entry (when the transfer is triggered by escalation). - The
sipTransferIddefault declared on the tool withdefault_source: config. - The SIP target configured in Project Settings > Agent Transfer > Voice Gateway.
If you declare
approved_authorities on the tool (dynamic SIP routing), the transfer requires a routing decision for the call. When none exists, or the resolved destination is not on the approved list, the transfer fails closed. It does not fall back to the project default.refer, invite, or bye) is also set in Project Settings, not in the call.
How it works
- The platform resolves the destination for the current call, as described above.
- For dynamic routing, the SIP URI template is filled with the routed values, and the result is validated against the approved authorities.
- If
messageis set, it is played to the caller before the transfer starts. - The runtime dispatches the transfer and waits for the real SIP outcome. The tool reports success only when the call actually connected.
- If the transfer fails, the caller stays with your agent and the flow follows the
ON_FAILUREpath.
status: "initiated". This means the transfer was started, not that it connected. Do not tell the caller the transfer succeeded in that case.
Passing custom SIP headers
When using SIP transfers, you can attach custom SIP headers with theheaders parameter on call_transfer.
For details, see Pass Custom SIP Headers on Voice Transfer.
Errors
Examples
Example 1: Transfer to a configured SIP destination Use a project-configured SIP destination when all calls transfer to the same endpoint.call_transfer vs ESCALATE
call_transfer is an immediate, stateless telephony handoff with no record kept once the call leaves. ESCALATE, on the other hand, creates a trackable HumanTask (queueing, priority, SLA, optional ITSM integration) and works the same way for both voice and digital channels.