Skip to main content
A warm transfer briefs a human representative before the caller is connected. In this guide, you’ll build a warm transfer where:
  1. An inbound agent answers the call and collects the caller’s reason for calling.
  2. While the inbound agent keeps the caller on the line, an outbound agent calls a customer service representative and briefs them.
  3. Once the representative is ready, both calls are transferred into a shared conference.
Both agents run on the same Runner, using a phone number from your Guava account.

Inbound agent collects the reason and stalls

The inbound agent collects reason_for_calling. Once that task is complete, the agent is given a new task: keep the caller on the line while a representative is found.
main.py

Calling the representative

In the same handler, generate a random conference ID and use runner.call_phone() to start an outbound call to the representative. The conference ID, the inbound call’s ID, and the reason for calling are passed to the outbound agent as variables.
main.py

Outbound agent briefs the representative

The outbound agent reads call_reason with call.get_variable(), explains the caller’s issue to the representative, and confirms that they’re ready to take the call.
main.py

Both calls join the conference

Once the representative is ready, the outbound agent uses guava.RemoteCall with original_call_id to control the waiting inbound call. It then transfers both calls to conference:<conference_id>, which joins them together. Each agent says a short message before it transfers.
main.py

Run the example

This example ships with the Python SDK. Pass the representative’s phone number with --transfer-destination:
Use --agent-number if you want to use a specific agent number from your account. Call your agent’s number. After you give a reason for calling, the representative’s phone will ring. Once they’ve been briefed, you’ll both be connected in a conference.

Full example

main.py