Interactive Voice Response

You can build an Interactive Voice Response (IVR) application to collect feedback and respond to customer inquiries or route calls to the right person with multi-level IVR. User inputs can be accepted either through traditional DTMF or through voice response which works based on Automatic Speech Recognition. For more information, see Add a Voice Prompt.

The EnableX voice server supports the collection of input digits from users and notifies the application via webhooks to take further action on user actions.

Voice API for IVR Menu

API Call with Text to Speech

POST https://api.enablex.io/voice/v1/call/$voice_id/play
Authorization: Basic XXXXXX
Content-Type: application/json
{
text : "Text to be played",
voice : "male/female",
language : "en-US", // language prompt to be played
dtmf : true, // User Response by digits
asr : true, // Alternate to dtmf, voice response
start_timeout : 10, // initial timeout before user starts speaking
recognizer_timeout : 2 // wait timer before speech recognizer returns result
}

API Call with Text to Speech

POST https://api.enablex.io/voice/v1/call/$voice_id/play
Authorization: Basic XXXXXX
Content-Type: application/json
{
prompt_name : "String", //prompt name to be played
prompt_ref : "String", //optional prompt reference for further processing
dtmf : true, // User Response by digits
asr : true, // Alternate to dtmf, voice response
start_timeout : 10, // initial timeout before user starts speaking
recognizer_timeout : 2 // wait timer before speech recognizer returns result
}

DTMF Notification event

Below is a sample of the input digits collected by the voice server and notification sent to the application via a webhook URL.

{
voice_id : "xoxo", // Unique Voice ID generated by voice server for each Call
play_id : "oooo", // unique play id for the prompt / text played.
playstate : "digitcollected"
digits : "12345" // digits collected from user.
from : "919999999999",
to : "918888888888",
timestamp : "2021-02-18T12:47-00Z"
}