Custom transferCall tool not working together with...
# support
n
I have this tool:
Copy code
{
  "type": "transferCall",
  "async": false,
  "function": {
    "name": "TransferToStore",
    "strict": true,
    "parameters": {
      "type": "object",
      "required": [
        "reason"
      ],
      "properties": {
        "reason": {
          "type": "string",
          "description": "The reason for transferring the call to the store"
        }
      },
      "additionalProperties": false
    },
    "description": "Transfers the call to the store. This tool should only be called when the caller's request explicitly matches one of the predefined instructions in the system prompt."
  },
  "messages": [
    {
      "type": "request-start",
      "content": ""
    }
  ]
}
And this is the event I receive:
Copy code
{
  "message": {
    "timestamp": 1742515519284,
    "type": "phone-call-control",
    "request": "forward",
    "forwarding_phone_number": "The caller wants to be transferred to the store.",
    "destination": {
      "type": "number",
      "number": "The caller wants to be transferred to the store."
    },
And the call just drops, even if I don't try to transfer. On Twilio I see a failed outgoing dial request with a weird number (I assume it's the "reason" data trying to be converted to numbers.) Twilio Call SID: CA7570c942a019b84f07313ff2b823db59 Vapi call ID: ea416855-7493-4828-bafc-de0759634f01
v
While I was going through the call logs, I do see there was an attempt to transfer the call which eventually triggered this Phone Call Control Server event. As you have mentioned, I don't try to transfer. So, I was wondering what else you were expecting which gave you the call forwarding. This will help me understand what could have been gone wrong for you.
n
Yes, I did receive the phone-call-control request. But I removed all the code, so essentially I did not do anything, but the call got transferred anyway
I mean, not transferred, but dropped
Because of the bad transfer made by the platform
v
@notreallynomad if you are using phone call control, you have to handle the transfer on your end, and if you don't return any response, calls on our side are likely to be marked as customer entered the call or something else instead of assistant forwarded the call.