Understanding and Avoiding Stuck Executions in Twilio Studio

Stuck Executions

For Inbound Calls to a Studio Flow, occasionally an Execution will become stuck, remaining in active status until manually ended. A stuck Execution occurs when an inbound call has ended, but Studio is still waiting for a final webhook event to mark the Execution as complete.

To avoid stuck Executions follow these best practices. 

Set the Status Callback and Fallback URLs

The most common cause of a stuck Execution is when Studio does not receive a final webhook from Programmable Voice that a call has ended. To address this, always set the Studio Flow Webhook URL for A Call Comes In, Call Status Changes, and the Primary Handler Fails fields on your Twilio phone number configuration.

Follow this guide to configure your Twilio phone number for Incoming Calls.

Enable Concurrent Calls

Concurrent Calls is a Studio Flow setting that allows the same Caller ID to have more than one active inbound call in the same Flow at the same time, such as multiple calls from a call center or hotel. This setting is on by default for all new Flows.

However, for older Flows (or copies of older Flows) created before October 1, 2018, Concurrent Calls is not enabled by default. If an Execution becomes stuck, and Concurrent Calls is not enabled for that Flow, future calls from that same number will be blocked and callers will hear an out-of-service message. (This setting does not apply to Incoming Message or REST API-triggered Executions.)

Follow this guide to enable Concurrent Calls on older Flows.

Manually Ending an Execution

As long as Concurrent Calls is enabled for your Flow, stuck Executions have no negative side effects. However, if necessary, you can manually end them through Twilio Console or via the REST API.

To find stuck Executions in Twilio Console, filter your Execution logs to view only Active Executions. Stop any Executions that are obviously too old, typically those that were created more than 4 hours earlier.

To find stuck Executions via the REST API, filter them by date/time and then end any Executions that fall outside your date/time range, typically those that were created more than 4 hours earlier.

Have more questions? Submit a request
Powered by Zendesk