Holding Call
# support
u
I am developing a follow agent. - The customer requires the AI agent to call the real agency. - The AI agent holds the customer's call and talks to the real agency. - If the agency accepts the call, the AI agent transfers the call to the real agent and informs the customer. How can I do this?
v
To achieve this flow, use Twilio conferencing with Vapi as follows:
Copy code
js
// Place customer on hold in a conference
app.post("/conference", (req, res) => {
  const VoiceResponse = twilio.twiml.VoiceResponse;
  const twiml = new VoiceResponse();
  twiml.dial().conference({ startConferenceOnEnter: true, endConferenceOnExit: true }, "my_conference_room");
  return res.type("text/xml").send(twiml.toString());
});
1. Put the customer in a conference (
/conference
). 2. Dial the agency and add them to the same conference. 3. If the agency answers, both are merged; if not, play a fallback message. See the [official guide](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio) for a full example and more details. Source: - [Call Handling with Vapi and Twilio](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio)
n
@! AetherMind Are you using your own SIP Trunk or VAPI provided phone numbers ?
v
You can achieve this flow by using Twilio conferencing with Vapi. The general approach is to place the customer on hold in a conference call, then have the AI agent dial the real agency and add them to the same conference. If the agency answers, both the customer and the agency are merged into the call, allowing the transfer to happen. If the agency does not answer, you can play a fallback message to the customer. This setup matches your requirements at a high level and provides a foundation for building your follow agent.
u
Can't I do this with only vapi, not using twilio?
v
Vapi supports call transfers using its built-in tools, but the specific "hold and conference" flow (where the customer is held, the AI agent calls the agency, and then merges the calls) currently requires Twilio or a SIP provider with conferencing features. To clarify: Are you looking for a solution that does not require any external telephony provider (like Twilio or SIP) and relies solely on Vapi's built-in capabilities for holding and merging calls? Sources: - [Call Handling with Vapi and Twilio](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio) - [Dynamic Call Transfers](https://docs.vapi.ai/calls/call-dynamic-transfers) - [Vapi Default Tools](https://docs.vapi.ai/tools/default-tools)
u
I used VAPI provided number.
v
Currently, with a Vapi-provided number, you cannot implement a "hold and conference" flow (where the AI agent holds the customer, calls the agency, and then merges the calls) using only Vapi's built-in features. This flow requires Twilio or a SIP provider with conferencing support. You can, however, use Vapi's
transferCall
tool to transfer the call directly to the agency, but this will not allow the AI agent to speak to the agency before merging. For more details, see the [Vapi Default Tools documentation](https://docs.vapi.ai/tools/default-tools). Sources: - [Call Handling with Vapi and Twilio](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio) - [Vapi Default Tools](https://docs.vapi.ai/tools/default-tools)
n
@! AetherMind The answer is no. Technically speaking, an AI can't "hold" a call - because it doesn't know how to do it, also, you will pay for every second the call is on hold with the AI.
Sounds to me like you're trying to implement an attended transfer scenario, am I correct ?
u
correct
v
You're correct—implementing an attended transfer scenario (where the AI agent holds the customer, calls the agency, and then merges the calls) isn't possible using only Vapi's built-in features with a Vapi-provided number. This flow requires Twilio or a SIP provider that supports conferencing. With Vapi alone, you can use the
transferCall
tool for a direct transfer, but this doesn't allow the AI agent to speak to the agency before merging the calls. Sources: - [Call Handling with Vapi and Twilio](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio) - [Vapi Default Tools](https://docs.vapi.ai/tools/default-tools)
With a Vapi-provided number, you cannot implement a "hold and conference" flow using only Vapi's built-in features. This flow—where the AI agent holds the customer, calls the agency, and then merges the calls—requires Twilio or a SIP provider with conferencing support. If you need this functionality, consider integrating Twilio as shown in the [official guide](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio). Otherwise, you can only use Vapi's
transferCall
tool to directly transfer the call, but the AI agent cannot speak to the agency before merging. Reference: - [Vapi Default Tools](https://docs.vapi.ai/tools/default-tools) - [Call Handling with Vapi and Twilio](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio) Sources: - [Vapi Default Tools](https://docs.vapi.ai/tools/default-tools) - [Call Handling with Vapi and Twilio](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio)
With a Vapi-provided number, you cannot implement a "hold and conference" flow using only Vapi's built-in features. This scenario—where the AI agent holds the customer, calls the agency, and then merges the calls—requires Twilio or a SIP provider with conferencing support. If you need this flow, consider integrating Twilio as described in the [official guide](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio). For direct transfers (without the AI agent speaking to the agency first), you can use Vapi's
transferCall
tool, but it does not support attended transfers. Sources: - [Call Handling with Vapi and Twilio](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio) - [Vapi Default Tools](https://docs.vapi.ai/tools/default-tools)
v
Message marked as helpful by @! AetherMind! 🎉
k
Hey Tyler, checking if this is resolved/solved for you?
n
Hi There, I didn't see your response to my question - but if you want to implement the transfer using conferencing, I can show you how to do it using Cloudonix as your voice application layer.