dead-brownD
VAPI2mo ago
dead-brown

URGENT - Call always ends with customer-did-not-answer reason

Hi,

I'm trying to send voicemail messages via my call assistant, but I'm seeing every call I make to my Twilio number (trial account) end with the customer-did-not-answer reason. The call is successfully made to my Twilio number as expected BUT if the call goes to voicemail, my configured voicemail message is never left and the call ends with ends a customer-did-not-answer reason

I've created my Twilio number following https://docs.vapi.ai/phone-numbers/import-twilio
  • NOTE: I am currently on a Twilio trial account
I'm not seeing errors in my Twilio call logs btw

vapi call ids with the issue:
  • 019a8ea2-f444-7440-b8f7-474ff88798ff
  • 019a8e29-974f-755f-8b4e-2c4f32c9b829
  • 019a8376-908e-7110-be4d-626517d3f2ab
  • 019a8369-d921-7cce-ba7b-931bee33e2bc
I am using the vapi sdk to make these calls:
import { VapiClient } from '@vapi-ai/server-sdk';
// Create VapiClient instance
const vapi = new VapiClient({ token: vapiApiKey });

// Create call using SDK
const callData = await vapi.calls.create({
  assistant: body.assistant,
  phoneNumberId: body.phoneNumberId,
  customer: body.customer,
  name: body.name,
});


Here is an example transient assistant config I atach to the call with:
{
  "model": {
    "model": "gpt-4o",
    "tools": [
      {
        "type": "voicemail",
        "function": {
          "name": "leave_voicemail",
          "description": "Leave a voicemail message when you detect you've reached a voicemail system"
        },
        "messages": [
          {
            "type": "request-start",
            "content": "Hey {redacted}. This is {redacted}, CEO at {redacted}. Call me back if you're interested in increasing sales win rates at {redacted}."
          }
        ],
        "beepDetectionEnabled": false
      }
    ],
    "messages": [
      {
        "role": "system",
        "content": "You are a sales representative for {redacted}.\nIf at any point you determine you're speaking to a voicemail system\n(greeting mentions 'unavailable', 'leave a message', 'voicemail', 'at the tone', 'beep', etc.),\nwait for the voicemail message to end and then use the leave_voicemail tool."
      }
    ],
    "provider": "openai",
    "maxTokens": 5000,
    "temperature": 0.3,
    "knowledgeBase": {
      "topK": 1,
      "fileIds": [],
      "provider": "canonical"
    },
    "emotionRecognitionEnabled": false
  },
  "voice": {
    "voiceId": "uju3wxzG5OhpWcoi3SMy",
    "provider": "11labs",
    "chunkPlan": {
      "enabled": true,
      "formatPlan": {
        "enabled": true,
        "numberToDigitsCutoff": 2025
      },
      "minCharacters": 15,
      "punctuationBoundaries": [
        ".",
        "!",
        "?",
        ";",
        ",",
        ":"
      ]
    },
    "fillerInjectionEnabled": false
  },
  "firstMessage": "",
  "firstMessageInterruptionsEnabled": true,
  "firstMessageMode": "assistant-waits-for-user",
  "voicemailDetection": {
    "enabled": true,
    "provider": "twilio",
    "machineDetectionTimeout": 45,
    "voicemailDetectionTypes": [
      "machine_end_beep",
      "machine_end_silence",
      "machine_end_other"
    ],
    "machineDetectionSilenceTimeout": 6000,
    "machineDetectionSpeechThreshold": 2500,
    "machineDetectionSpeechEndThreshold": 2500
  },
  "voicemailMessage": Hey {redacted}. This is {redacted}, CEO at {redacted}. Call me back if you're interested in increasing sales win rates at {redacted}.",
...
}


Can I please get some help troubleshooting the cause of this?

Thanks in advance
Import a new or existing number from Twilio
Was this page helpful?