Help: transferCall ends with unknown-error – no ou...
# support
t
Hi all, I’m stuck with a call-transfer issue and would appreciate a second pair of eyes. Below are the key facts, the expectation, and what actually happened. 📌 Context Item Value Inbound Call SID (Twilio) CA3b0f9fc5c938faffd1b25cf2ca00a376 Vapi Call ID d8416441-b65b-450d-894c-7749fd02fa1b Time 5 May 2025, 08:46 CEST (06:46 UTC) My Twilio number / callerId +43720080788 (AT - National 0720) Destination chosen by user +4329822315200 (Werkstatt) Assistant tool call transferCall({"destination":"+43676841551650"}) in the log above, and "tool_call_result":"Success." 🧐 What I expected User says “Ja, bitte [verbinden]”. Assistant calls transferCall; Vapi should hit Twilio REST API. Twilio creates a second Call SID (outbound leg) that dials the destination, presenting +43720080788 as caller ID. Parent call bridges → conversation continues on new leg. 😖 What actually happened Vapi log shows the function executed and returned Success. Twilio never spawned the outbound Call SID – only the inbound leg exists. Two seconds later Vapi ends the call with endedReason: unknown-error. No error appears in Twilio Debugger; Geo-Permission 🇦🇹 is enabled; number is imported into Vapi with correct SID/Auth Token. 🔍 Steps already taken Imported +43720080788 into Vapi as Twilio Phone Number with credentials. Set callerId in every destination. Outbound enabled, Geo-Permission AT checked. Re-tested with alternative destination numbers and with a verified mobile CLI – same behaviour. Tried variante B (update Call via Twilio REST / TwiML ): that works, so Twilio account itself is fine. ❓ What I’m asking Has anyone seen unknown-error right after tool_call_result":"Success." when using transferCall ? Any hidden requirement for AT 0720 numbers? Debug tips to trace what Vapi tried to send to Twilio? Thanks a lot for any hints! Code used in first comment
{ "assistant": { "name": "Emma – Autohaus Lehr", "firstMessage": "Message", "firstMessageMode": "assistant-speaks-first", "model": { "provider": "openai", "model": "gpt-4.1-mini", "temperature": 0.4, "messages": [ { "role": "system", "content": " } ], "tools": [ { "type": "transferCall", "destinations": [ { "type": "number", "number": "+4329822315200", "callerId": "+43720080788", "message": "Ich verbinde Sie nun mit unserer Werkstatt." }, { "type": "number", "number": "+43676841551650", "callerId": "+43720080788", "message": "Ich verbinde Sie nun mit dem Verkauf für Neuwagen und Finanzierung." }, { "type": "number", "number": "+43676841551550", "callerId": "+43720080788", "message": "Ich verbinde Sie nun mit der Abteilung für Ersatz- und Zubehörteile." } ], "function": { "name": "transferCall", "description": "Rufe diese Funktion nur, wenn der Anrufer ausdrücklich nach einer Weiterleitung fragt.", "parameters": { "type": "object", "properties": { "destination": { "type": "string", "enum": [ "+43676841551650", "+4329822315200", "+43676841551550" ] } }, "required": ["destination"] } } } ] }, "transcriber": { "provider": "deepgram", "model": "nova-2", "language": "de" }, "voice": { "provider": "azure", "voiceId": "de-DE-KatjaNeural" } } }
v
To debug the communication between Vapi and Twilio, check both platforms' logs using the specific call IDs you provided: 1. Examine Twilio logs for Call SID
CA3b0f9fc5c938faffd1b25cf2ca00a376
2. Review Vapi logs for Call ID
d8416441-b65b-450d-894c-7749fd02fa1b
If no clear errors appear, use a WebSocket client to test the connection directly:
Copy code
sh
wscat -c wss://aws-us-west-2-production1-phone-call-websocket.vapi.ai/d8416441-b65b-450d-894c-7749fd02fa1b/transport
This will help determine if there's a connection issue between Vapi and Twilio. Sources: - [Discord Channel](https://discord.com/channels/1211482211119796234/1329235631855108128) - [Discord Channel](https://discord.com/channels/1211482211119796234/1334001638876250233) - [Discord Channel](https://discord.com/channels/1211482211119796234/1333867863462903868)
j
@Vapi indeed, I'm having the same issue with transferCalls. See screenshot attached : transfer is asked but not done propertly. Call id : 8f0d8ee4-69ab-4352-aee6-92bdaff9ba98 Other call examples : - c9209108-c0b9-4d2a-ac94-cba3ae8b34de - 81c5063b-1c94-4bc4-9fbd-59d6254d6306 FYI I'm using Vonage numbers(whereas @User seems to use Twilio). https://cdn.discordapp.com/attachments/1368872516226912257/1368884789645545554/image.png?ex=6819d8ce&is=6818874e&hm=8967820e60d99fb59e9d17fa0af6456148a85548c00282dc4452ecbaf4f09b5b&
@Kings_big💫 @Shubham Bajaj quite urgent as some of my assistants are "dispatchers", so transferring calls it their main feat. I've tried different things but nothing works : always ending the call after successfully calling the transferCall tool 🤔 (last call id example : 986346b4-db00-46e5-8766-4c42a35d4420)
s
@thristanor @Jeebs from eva.be looking into it.
🔵 06:46:46:860 Transferring Twilio Call...TwiML:+xxx 🟡 06:46:47:015 Couldn't Transfer Twilio Call. Error: The requested resource /2010-04-01/Accounts/AC2a5xxxx26d1/Calls/CA3b0fxxxx2ca00a376.json was not found @thristanor can you share the complete twilio call logs related to this call?
@Jeebs from eva.be 🔵 07:17:07:066 Found Phone Number Destination. Destination: { "type": "number", "number": "+xxxx", "message": "je vous transfère à l'assistante virtuelle personnelle du docteur Corbisier", "description": "assistante virtuelle personnelle du docteur Alexandre Corbisier", "callerId": "{{customer.number}}" } 🟡 07:17:07:273 Couldn't Transfer Vonage Call. Error: Couldn't Transfer Vonage Call. Error: Request failed with status code 400 can you check with vonage team?
j
I’ll reach out to Vonage now, but they usually take a while to respond. Since the same transferCall tool worked fine on Thursday, I strongly suspect that something might have changed on the Vapi side. I'm concerned we could be waiting days for a reply from Vonage, so I’m hoping you might be able to look into it more quickly on your end. Also, since the Vapi message indicates that the tool was successfully called, could you possibly surface the specific Vonage error being returned? That might help narrow things down. Thanks 🙏
s
This is from Vonage side for sure, we have ongoing email thread for another customer.
a
Are you on vapi daily or weekly btw
j
Vapi weekly @AiTitus :) why ?
@Shubham Bajaj Vonage asking for the following: Please share the NCCO which you have configure on your side, so we can check further. Also we request you to please check below points- Validate your JSON payload for syntax and required fields. Wait at least 2 seconds after call creation before attempting a transfer. Check the call status before transferring; only active calls can be transferred. Ensure the destination NCCO URL is reachable and returns a valid NCCO within 5 seconds. Review the API response body for more details on the error, as it may contain a specific message about what is wrong with the request.
a
Sometimes daily and weekly can be the issue in rare cases 🙂
s
can you email them for more details.
As I mentioned, we have a ticket previously opened with them where they stated, "It's because of their provider or vendor," and the Vonage team was asking for more call IDs. Now it's the right time to say, "The call was transferred and forwarded, but when it reached your servers, you guys said, 'Call has already ended,' so couldn't forward. Also mention that you can share another call ID if required."
j
@Shubham Bajaj Ok, I have sent this. - Are you sure it said "call has already ended" ? The log you have sent me prior mention status code 400, which happens when there is wrong syntax in the request 🤔 - Any info about this prior ticket (who sent it, when) to make it easier to link both requests ?
s
can you forward the email to me? sharing my email in DM.
j
Just sent to your mail !
k
I have spoken with them. They have indicated that if you could provide two call IDs from the same account that are experiencing the same issue, they will take action. They will then attempt to reproduce the issue and attempt to resolve it.