Action: IVR

The “ivr” action fills the purpose of playing a sound resource while also retrieving digits pressed by the caller (think customer support menus etc.).

You can change the repeat count using the “repeat” key. You can limit how many seconds to wait for input with the “timeout” key.

Format

Set the number of digits to wait for before the action completes with the digits parameter, default is 1. Set the number of seconds to wait for input with the timeout parameter, default is 10. Set the number of times to retry playing the message and waiting for input with the repeat parameter, default is 3.

{
  "ivr": "https://yourapp.io/menu.mp3",
  "digits": 1, // Optional
  "timeout": 10, // Optional
  "repeat": 3, // Optional
  "next": "https://yourapp.io/elks/ivr" // Optional
}

Result

The call will end after the action is completed if the next parameter is omitted. If the next parameter is set we'll make a request to the URL as defined below. You can respond with any valid call action.

POST https://yourapp.io/elks/ivr
Parameter Description
callid The unique id of the call in our systems.
result The digit sequence that the user entered, for instance ”1234”. If an error occured the value will be ”failed”.
why Only present if result is ”failed”. The value will be ”noinput” if the user did not enter the required number of digits.