Forward Call / Transfer Call not working.
# support
k
I have set up the SIP Trunk on Twilio (Ireland Routing) and created a custom tool for transferCall but am unable to forward the call to my personal number or another twilio number. Call ID sample: f59d81f8-496e-4eb3-b7c4-845f75197521 f31147e3-c5c8-47b0-8a87-b6d0886072ad d3e904a7-ba0f-442f-a230-56f785e63218 b846985b-fb08-460c-afb2-cd7ee4625684 I tested making outgoing calls without issue but call transfer is not working. Unable to figure out why. Any help?
v
Thanks for providing those details about your call forwarding issue. Based on the information you've shared, there are a few potential causes for the call transfer not working with your Twilio SIP Trunk using Ireland routing. Could you share more information about: 1. Are you seeing any specific error messages in your Twilio logs when the call transfer is attempted? 2. How exactly is your
transferCall
tool configured? Could you share the configuration or code snippet? 3. Have you verified that your system/PBX is properly configured to handle [SIP REFER messages](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333747605628391434)? 4. Have you tried changing the Twilio routing region from Ireland to US? Several users have [reported success](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1337685081287954546) after making this change. Sources: - [SIP REFER Message Handling](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1333747605628391434) - [Routing Region Issues](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1337685081287954546) - [Call Transfer Configuration](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339930398473584650) - [Dynamic Call Transfers Documentation](https://docs.vapi.ai/phone-calling/dynamic-call-transfers)
k
Vapi Log: Call ID: 5f454fd8-f722-4d86-b1c1-2e010a93813f { "name": "transferCall", "role": "tool_call_result", "time": 1743701399103, "result": "Success.", "toolCallId": "call_sFevuWQV5Id6IbmZWGpCydpi", "secondsFromStart": 10.434 } Twilio Log: Call SID: CAbb78824bd9cab13a4daf34053e4d8b77 Child Call (Call SID: CA4a856a8a8b2624a7525d2c844be933e8) 1. Call to Vapi assistant works ✅ Assistant tries to transfer using REFER ✅ Twilio accepts REFER but fails 2nd leg ❌ with 403 Forbidden 2. This is how i created the transferCall tool: { "type": "transferCall", "destinations": [ { "type": "number", "number": "+MY NUMBER", "message": "I'm forwarding your call to Gary. Please stay on the line.", "callerId": "{{phoneNumber.number}}", "transferPlan": { "mode": "blind-transfer" } } ], "function": { "name": "transferCall4", "description": "Use this to transfer the caller to Gary when they ask to speak to a human or request a transfer.", "parameters": { "type": "object", "properties": { "phoneNumber": { "type": "string", "enum": ["+MY NUMBER"], "description": "The phone number to transfer the call to." } }, "required": ["phoneNumber"] } }, "messages": [ { "type": "request-start", "content": "I'm forwarding your call to Gary. Please stay on the line.", "conditions": [ { "param": "phoneNumber", "operator": "eq", "value": "+MY NUMBER" } ] } ] } 3. ? I want to forward calls to 1 or 2 local numbers not on twilio. Is Twilio SIP Trunking in this case? 4. I prefer to route in Ireland as the business is based in Europe.
v
checking if this is resolved/solved for you?
k
I've just directly imported the Twilio number with SId and Token instead of via SIP Trunking. It appears that transferCall works only when the twilio phone number is routed to the US. For Ireland it does not work. This works for now. Two questions I do have: 1. When Twilio Number is routed to Ireland, why does transferCall not work? 2. If I want to use SIP Trunk with Twilio Numbers, shouldn't it function normally like it currently does now where I've imported the Twilio Number to Vapi via Sid and AuthToken? Or is there something fundamentally I'm misunderstanding with how SIP trunking works.
v
I will answer both of your questions in order of the ask. So the first one. The Twilio numbers require special functionality like call forwarding to be enabled for specific reasons by default (apart from US). You have to enable call forwarding for your phone number in your Twilio console. Now coming to the second question. To set up SIP ranking for a Twilio phone number, you have to follow a slightly different process. Here is the documentation link to it:
k
1. Can you elaborate on enabling call forwarding for Twilio numbers routed in Ireland? Via TwiML App/SIP Trunk? Would be great if you could explain a little further. 2. Yes I followed the guides as stated which is what led to the issues I mentioned above and callids, log for reference.
v
- This has to be done via twilio console only, you have to check for their documentation regarding this. - @killua10 can you share any of the recent call ID with current issue description.