Need Asterisk to hangup when it hears IVR

Hello Team:
How to make Asterisk hangup during outbound call when it hears ivr instead of ringing. I tried AMD, but it does not work since it is used after the call is answered. Instead, I want asterisk to hangup during the call progress when it hears ivr.

I appreciate your feedback. I searched a lot on this topic and reached no solution.

Regards;