Need help with IVR implementation
# support
f
I want to implement IVR with VAPI. This is my system prompt: If no number is entered after this statement “Welcome to X. If you are already a customer of our company, press 1. If not, press 2. Or if you have questions about our vacancies or your application, press 3.”. Repeat the same statement until the number is entered. After entering the number (for example “[LOG] Keypad received from customer: 2”), say which number the user has dialed and then end the call by using the “endCall” tool And when I call it, I see in the logs "[LOG] Keypad received from customer: 3" but the agent never answers. Can anyone help me? Call ID: d8312267-6e70-4018-a9b6-47890e5918dc https://cdn.discordapp.com/attachments/1387692563900928123/1387692564450250792/Screenshot_from_2025-06-26_08-55-16.png?ex=685e44e9&is=685cf369&hm=0839440da9940603a688897bd175529b23ebf55f94b143d9c008f0d951ad7e30&
s
Hi Felix.Neutatz, To implement your IVR system with VAPI, consider the following steps: 1. **System Prompt Setup**: Use the system prompt to provide clear instructions. For example:
Copy code
[Task]
   Welcome to X. If you are already a customer of our company, press 1. If not, press 2. If you have questions about vacancies or your application, press 3.
   <wait for DTMF input>
2. **Handle DTMF Input**: Configure your system to repeat the prompt until a valid DTMF input is received. You can use error handling to manage invalid inputs:
Copy code
[Error Handling]
   If no number is entered, repeat the initial prompt after a short delay.
   If the input is not recognized, inform the caller of valid options and repeat the prompt.
3. **Post-Input Actions**: Once a valid number is received, use the
endCall
function to end the session gracefully:
Copy code
[Response Handling]
   Once a valid input is detected, acknowledge by saying "You pressed [number]. Thank you."
   Trigger the `endCall` function afterward.
For more details on structure and error handling, refer to the [Voice AI Prompting Guide](https://docs.vapi.ai/prompting-guide) for further refinement of prompts and IVR flows.