We are trying to gather caller information through a series of <Gather>
steps, but give them the option to escape from the flow by sending just #
. We would like the caller to be able to escape the series of <Gather>
steps and follow separate logic if a step times out. According to the <Gather>
documentation, in the example below the <Redirect>
verb will be used by Twilio in either case if the input times out or if the caller sends no input and just hits #
.
<Response>
<Gather action="https://localhost:8001/api/Step" method="POST" timeout="7" finishOnKey="#">
<Play>[Prompts omitted]</Play>
</Gather>
<Redirect method="POST">https://localhost:8001/api/Step?timeout=true</Redirect>
</Response>
My question is, is there any way to differentiate between those two scenarios? The major complication is this: Our existing recorded prompts already instruct callers to use # as both the escape key and finishOnKey, so if possible we need to keep those the same.