Dynamic Call Transfer – Continue Assistant Convers...
# support
m
Hello Vapi Support Team, I am using the dynamic call transfer feature for my assistant. My goal is: if a call is transferred to a destination number and that number is busy or does not answer, I want the assistant to automatically resume the conversation with the original caller, rather than ending the call. Currently, when I provide a destination and Vapi attempts the transfer, if the recipient does not answer or is busy, the call ends instead of returning to the assistant. I have not found any option in the dashboard or API documentation to change this behavior. I have also tried using warm-transfer-experimental with the fallbackPlan option, but in this case the calls are still getting cut rather than returning to the assistant for further conversation. Could you please advise if there is a way to: Detect transfer failure (busy/no answer) after providing a destination, and Automatically return the caller to the assistant so the conversation can continue? If this is not possible today, is there a recommended workaround or are there plans to support this functionality?
v
Currently, Vapi does not natively support resuming the assistant conversation if a dynamic transfer fails (busy/no answer), even with
fallbackPlan
in warm-transfer-experimental mode.
A possible workaround is to use a custom server-side workflow (e.g., with Twilio conferencing and webhooks): detect transfer failure via Twilio's
statusCallback
, and then programmatically re-initiate a Vapi assistant session with the original caller. This approach requires handling call state and logic in your backend. There is no built-in option or official workaround for this in Vapi as of now ([docs](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio), [docs](https://docs.vapi.ai/call-forwarding)). Sources: - [Call Handling with Vapi and Twilio](https://docs.vapi.ai/calls/call-handling-with-vapi-and-twilio) - [Call Forwarding](https://docs.vapi.ai/call-forwarding)
v
Currently Vapi doesn’t automatically return calls to the assistant after a failed transfer busy/no answer, but you can work around this by handling transfer status via webhooks or using on-hold specialist transfer features to resume the conversation manually..
m
How can I re-initiate a Vapi assistant session with the original caller?
Your warm-transfer-experimental doc says endCallEnabled This controls what happens after delivering the failure message to the customer. true: End the call after delivering the failure message (default) false: Keep the assistant on the call to continue handling the customer’s request So I think it should handle my scenario, but it's not
k
??
m
I attempted an on-hold specialist transfer, where the inbound call is handled by VAPI. During the call, I used the tools to invoke the Connect API to dial the specialist’s number. The call to the specialist is initiated successfully, and wait music is played to them. However, the VAPI agent immediately hangs up the original call after dialing the specialist.
I am using NextJs
Copy code
typescript
// api/connect

    const redirectTo = assignedUser?.phone_number || redirectNumber;
    const conferenceUrl = `${BASE_URL}/api/departments/conference`
    const client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);
    const callUpdated = await client.calls(callSID).update({
      url: conferenceUrl,
      method: "POST",
    });

    // 2) Dial the specialist
    const statusCallbackUrl = `${BASE_URL}/api/departments/participant-status`;

    const callCreated = await client.calls.create({
      to: redirectTo!,
      from: phoneNumber,
      url: conferenceUrl,
      method: "POST",
      callToken,
      statusCallback: statusCallbackUrl,
      statusCallbackMethod: "POST",
    });

    console.log("Call created:", callCreated);

    return NextResponse.json({
      status: "Call initiated successfully",
    });
Copy code
typescript
// api/conference
import { NextRequest, NextResponse } from "next/server";
import twilio from "twilio";

export async function POST(request: NextRequest) {
  const formData = await request.formData();
  const callSID = formData.get("CallSid") as string;

  const client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);

  console.log("Call SID:", callSID);

  const call = await client.calls(callSID).fetch();

  console.log("Call:", call);

  if (!call) {
    return NextResponse.json({ error: "Call not found" }, { status: 404 });
  }

  const VoiceResponse = twilio.twiml.VoiceResponse;
  const twiml = new VoiceResponse();
  // Put the caller(s) into a conference
  const dial = twiml.dial();
  dial.conference(
    {
      startConferenceOnEnter: true,
      endConferenceOnExit: true,
    },
    `call-${callSID}`
  );

  console.log("TWIML:", twiml.toString());

  return new NextResponse(twiml.toString(), {
    headers: {
      "Content-Type": "text/xml",
    },
  });
}
k
Adjust the transferCall settings to use a warm transfer mode that keeps the call active until the specialist answers.
m
I have tried with warm transfer also, but the problem is VAPI agent never joined the conference it just connect caller and specialist on conference
k
Use a transferPlan mode like warm-transfer-wait-for-operator-to-speak-first-and-then-say-summary, which keeps the AI in the Twilio conference until the specialist answers and speaks, allowing proper merging and context sharing..
m
But this transferPlan will be used when using fallbackDestination with number, and I am not using any fallbackDestination, as I am handling transfering/conferencing logic on my server
v
Yes, by manually keeping the AI in the Twilio conference, detecting when the specialist speaks, and then instructing the AI to deliver the summary.
d
Has this been resolved. Please HELP. This is also my concern.