primary-violetP

dynamic call transfer with a custom message

Hey Vapi team! I have an issue with the customization of the message that is announced to the user before transferring the call.

  • I'm using a dynamic assistant and I'm including the 'transfer-destination-request' into 'serverMessages' when responding to the 'assistant-request' message
  • I'm providing a placeholder 'transferCall' tool when configuring the assistant
  • I'm responding with the destination config to the 'transfer-destination-request' message
  • All other destination config fields are applied correctly except of the 'message' field
  • I have 'number', 'callerId', 'transferPlan' working as expected. but the 'message' field is ignored (both custom message and empty string). The assistant just says the default 'Transferring the call now' phrase
here are several call ids:
c2de90d0-f226-4940-88dd-959033e749a7
25977fac-d29c-4ba1-a1c8-5582c2ab317a
6949badf-6724-476e-9445-ed93031623a5
7de30ba1-0a7e-43da-b3ce-81933aad6d91

assistant config looks like this:
{
  "name": "Outbound phone call",
  "model": {
    "url": "https://***/webhooks/vapi/custom-llm",
    "model": "gpt-4o",
    "tools": [
      {
        "type": "transferCall",
        "function": {
          "name": "transferCall"
        },
        "destinations": []
      },
      {
        "type": "endCall",
        "function": {
          "name": "endCall"
        }
      }
    ],
    "provider": "custom-llm",
    "maxTokens": 250,
    "temperature": 0.7,
    "urlRequestMetadataEnabled": true
  },
  "voice": {
    "voiceId": "joseph",
    "provider": "11labs"
  },
  "serverMessages": [
    "end-of-call-report",
    "hang",
    "status-update",
    "speech-update",
    "conversation-update",
    "tool-calls",
    "transfer-destination-request"
  ]
}

And here is my response to the 'transfer-destination-request' message:
{
  "destination": {
    "type": "number",
    "number": "+*******",
    "message": "",
    "caller_id": "{{customer.number}}"
  }
}
Was this page helpful?