Skip to main content

Play & Get Input

The play_get_input action will collect the digits from the caller or callee on a live call while listening to the audio file. when the digits are collected, you can make the call jump to the next action also. Collecting the digits will be useful to create multi-level IVR, confirming the order, etc,

Play a music and collect user input via DTMF tones using Curl:

Input action JSON

[
{
action: "play_get_input",
file_name: "music_file.wav",
max_digit: 4,
max_retry: 2,
timeout: 1,
action_url: "https://test.com/dtmf",
}
]

Parameters type and description

ParameterTypeDescription
*actionstringThe PCMO action to control the flow of the call.
*file_namestringThe file_name will play the audio file from TeleCMI cloud CDN.
max_digitnumberIt defines the DTMF input length. By default the maximum digit is 1.
max_retrynumberThe number of time music file need to be played without receiving DTMF input. By default the maximum retry is 1.
timeoutnumberTime allowed between DTMF inputs in seconds.By default, it is 1 second.
*action_urlstringYour webserver URL to inform the DTMf input
Note
The * marked parameter is mandatory.