Hamid
04/01/2025, 1:13 PMVapi Support Bot
04/01/2025, 1:15 PM{{customer.name}}
variable and producing incomprehensible conversations.
## Possible Causes for Your Issue
Based on the information I've found, there are several potential reasons why your assistant is having trouble with the {{customer.name}}
variable:
### 1. Variable Substitution Issues
The most likely cause is that the customer.name
variable isn't being properly passed or substituted. According to [Vapi documentation](https://docs.vapi.ai/assistants/dynamic-variables), dynamic variables like {{customer.name}}
need to be properly defined and passed to work correctly.
For SIP inbound calls, customer.name
is extracted from the From
SIP header. If this information is missing or malformed, the variable won't be substituted properly.
### 2. Customer Field Configuration
The customer field, including the name, needs to be set when creating a call, not when creating an assistant. Here's how it should be configured:
javascript
const call = await vapiClient.calls.create({
phoneNumberId: "your-phone-number-id",
customer: {
number: "+1234567890", // Customer's phone number
name: "John Doe", // Customer name that will replace {{customer.name}}
metadata: {} // Optional metadata
},
assistant: {
// Your assistant configuration
}
});
### 3. Voice Distortion or Model Issues
Sometimes incomprehensible conversations can result from voice distortion due to network issues or problems with the voice synthesis itself. High style property settings can also lead to AI hallucinations and instability, making the conversation difficult to understand.
## Troubleshooting Steps
Here are some steps you can take to resolve this issue:
1. **Check your variable syntax**: Ensure you're using the correct syntax {{customer.name}}
in your script hook.Vapi Support Bot
04/01/2025, 1:15 PM{{name}}
instead of {{customer.name}}
in their prompts.
6. **Check voice model settings**: If you're using 11labs voice models, try switching to "turbo" as some users have reported issues with the "11labs flash_model".
Would you like me to provide more specific troubleshooting steps for any of these potential causes?
Source:
- [Vapi documentation](https://docs.vapi.ai/assistants/dynamic-variables)Kyle Brunker
04/01/2025, 9:00 PMKyle Brunker
04/01/2025, 9:01 PM