I know that this thread is over a year old, but in case anyone runs across it moving forward...
If I wanted to accomplish something like this in 2022, I would look at leveraging a Common Module flow for the ANI check scenario that you presented.
1. A Common Module naturally will run and then come back to where it left off.
2. A function that determines down-stream routing, caller experience, etc. seems like something that could/would be used in multiple flows for your organization.
Cheers!
------------------------------
Patrick Rohlf
Summit Broadband
------------------------------