To create the call menu, you need to build a server that exposes three endpoints:
- One to answer the call
- One to accept call event data
- One to process user input via the telephone keypad
When the Vonage API platform receives a call on your virtual number it will make a HTTP request to the webhook URL that you will configure as part of your Voice Application. This is known as the "answer URL". The request contains all of the information you need to receive and respond to the call.
Vonage sends event data to another webhook known as the "event URL". This contains valuable information about the progress of the call. In this straightforward example, we will output the event data to the console.
When a user presses a number on their keypad, you can collect it via DTMF (Dual Tone Multi Frequency). You must create another webhook to receive this input.
Build a Call MenuCreate an interactive voice response (IVR) menu to handle customer calls