Transfer Call to Agent
This guide explains how to transfer an active customer call from a voice bot to a human agent using IraVoice.
Two transfer mechanisms are supported:
- Blind Transfer – The voice bot disconnects before the agent is contacted. Once the agent answers, the customer and agent calls are bridged together.
- Assisted Transfer – The voice bot remains connected to the customer while an agent is contacted in parallel. The transfer occurs only after the agent answers.
Choose the transfer method based on your desired customer experience and business workflow.
1. Blind Transfer
In a blind transfer, the voice bot disconnects from the customer before the agent is contacted. The customer is transferred only if the agent successfully answers.
Step 1: Stop Voice Bot Streaming
Disconnect the voice bot from the customer call to prevent any further interaction during the transfer process.
Code
Step 2: Initiate the Agent Call
Create a new outbound call to the agent.
Important:
- Generate a unique
call_uuidfor the agent leg. - Use the appropriate SIP gateway configured for your deployment.
- Disable streaming and recording for the agent leg.
Code
Step 3: Wait for Agent Answer
Monitor the configured event_url for call events.
Proceed with the transfer only after receiving an:
Code
event for the agent call.
Step 4: Bridge the Calls
Once the agent answers, bridge the customer call and the agent call.
Code
Result
The customer and agent are connected directly, and the transfer process is complete.
2. Assisted Transfer
In an assisted transfer, the voice bot remains connected to the customer while an agent is contacted in parallel. This provides a smoother customer experience because the caller remains engaged during the transfer process.
Step 1: Inform the Customer
Continue streaming through the voice bot and play a transfer message such as:
"Please wait while we connect you to an agent."
Step 2: Initiate the Agent Call
Place a parallel call to the agent while the customer remains connected to the voice bot.
Code
Step 3: Monitor Agent Response
Use the configured event_url to monitor the status of the agent call.
Case A: Agent Answers
Stop Voice Bot Streaming
Code
Bridge the Calls
Code
Result
The customer is seamlessly transferred to the agent after the agent answers.
Case B: Agent Does Not Answer
If the agent is unavailable, busy, or the call fails (identified through the iravoice::hangup event):
- Keep the voice bot connected.
- Inform the customer that an agent is unavailable.
- Play a fallback message.
- Optionally attempt another agent transfer.
- Disconnect the call if required by your workflow.
Event Monitoring
During both transfer flows, the following events are commonly used:
| Event | Purpose |
|---|---|
iravoice::answered | Indicates that the agent has answered the call |
iravoice::hangup | Indicates call failure, timeout, rejection, or disconnect |
iravoice::bridged | Indicates that two call legs have been successfully bridged |
iravoice::unbridged | Indicates that a bridged call has been disconnected |
Best Practices
- Always generate a unique
call_uuidfor the agent leg. - Disable streaming on the agent leg unless explicitly required.
- Wait for the
iravoice::answeredevent before bridging calls. - Implement timeout handling for unanswered agent calls.
- Provide fallback messaging to avoid leaving customers in silence.
- Log all transfer events for troubleshooting and reporting purposes.

