warm-transfer-experimental state machine silently ...
# support
a
Org: 0a2fc558-4bdc-4aa8-b53b-c94ffe56298c Reference call: 019e65c4-a244-788a-8914-3865229e212b (inbound, phone, transport twilio) On the reference call the assistant invoked transferCall three times to the same destination (+1408XXXXXXX, transferPlan.mode = warm-transfer-experimental). All three invocations: Returned "Transfer initiated." as the tool result Emitted call.transferInitiated with destinationType=number, transferDestination=+1408XXXXXXX Only the third invocation produced any subsequent call.warmTransferStateChanged events. The first two were silently dropped — no PENDING, no ACTIVE, no call.transferFailed, no assistant.tool.failed. After each of the first two, the call simply continued on the main assistant, the customer-speech-timeout hook eventually fired, and the assistant resumed conversation as if nothing had happened. The caller had to demand the transfer three times before it actually bridged, ending the call abruptly when it finally did. The only observable difference between the two failed attempts and the successful one is that on attempt 3 the LLM stream was aborted mid-completion (assistant.model.requestAborted), so the assistant message had minimal trailing TTS/pipeline activity at the moment the tool result landed. On attempts 1 and 2 the assistant message carried accompanying content ("1 moment while I transfer you.") that was still being spoken / queued when call.transferInitiated fired. Second call — same pattern, different org/agent Org: cc605f8d-453e-41d1-8c08-a1b8f259208a Call ID: 019e65b3-639d-7ee9-961c-71a3f3e61540 (outbound, phone, transport twilio) Destination: +1618XXXXXXX, transferPlan.mode = warm-transfer-experimental endedReason: assistant-ended-call Duration: 45s
c
Hey, Whenever the transferCall tool is invoked, Vapi queues the warm transfer to execute as soon as the assistant finishes its current turn. However, if VAD detects user speech before the transfer fully bridges, Vapi treats it as a conversational interruption. This forces the state machine back into listening mode, which silently clears the pending transfer task and continues the conversation as if the tool call never happened. we need to prevent the LLM from appending questions, and we need to protect the transfer state from VAD interruptions. 1. Prompt Engineering: Update your system prompt's transfer instructions to strictly forbid follow up questions during the tool call. Add this to your [Transfer] section: > "CRITICAL: When invoking the transferCall tool, you MUST NOT ask any follow-up questions (e.g., never ask "Are you still there?" or "Can you hear me?"). Output ONLY the tool call and a brief statement like "Transferring you now." Do not append any other text." 2. Use Native Tool Messages: Instead of having the LLM dynamically generate the "Please wait" text inside its conversational content (which is highly vulnerable to VAD interruptions if the customer says "Okay"), you should configure the native message property inside the tool's setup. • If you define the "1 moment while I transfer you" message directly inside the Vapi dashboard/API configuration for the transferCall tool, Vapi handles the audio playback natively. This drastically reduces the chance of the state machine dropping the transfer due to backchanneling or interruptions. let me know if this fixes the issue for you