Phone tree
In this example, after a caller enters digits on the keypad, Plivo sends them as a request to the action
URL. We also include a nested Speak element, so input can be gathered at any time during the Speak element.
If the caller enters a digit during the speaking of the text, the Speak element will stop speaking and wait for digits, the finishOnKey
, or a timeout
.
If the GetDigits element times out without input, the Speak element will complete and the GetDigits element will exit without submitting. Plivo will then process the next element in the document, which in this case is a Speak element that informs the caller that no input was received.
For a nested phone tree, you should return a GetDigits element from the action
URL. In the top example, if the caller enters a four-digit PIN, Plivo will POST the Digits
to the action
URL, and your application can return the second XML example to play another message and accept input.