Question:I am setting up an IVR flow in Twilio Studio. I have a function that validates the user’s phone number and then fetches some data. Once the data is fetched, I need to ask the user to input their zip code. I have used the “Gather Input On Call” widget. But the call gets disconnected as soon as the flow reaches this widget (event hangup is triggered).
Any idea what I could be missing? Is it possible to gather multiple digits as User Input in IVR flow?
Answer:If you use a Run Function Widget and want to return TwiML, you should use a TwiML redirect widget to call the Function instead, then use the suggested syntax below to return to the Studio flow.
TwiML Redirect Widget https://www.twilio.com/docs/studio/widget-library/twiml-redirect
Returning Control to Studio
To handle returning control to Studio, you need to specify a to the Studio Webhook URL and append ?FlowEvent=return. Any additional parameters specified in the return URL will be injected into the Studio context and addressable via Liquid template variables.
If you have better answer, please add a comment about this, thank you!