Dial and EAGI script simulteneously

I am using an eagi script that is written in python, that is streaming the conversations audio.
that is working fine with the Answer(),
My use case is I have to Dial to a number and then stream the conversation.
When I putting Eagi ahead of Dial() in dialplan then the Dial() is not executed and when Eagi() is after the Dial() then Eagi script is not executed.

Please help me, Thanks in advance.

You can’t do two things at once (like EAGI and Dial) on a channel. That’s because only one thing can control a channel at once, and EAGI and Dial would be fighting over who has ownership. You would need to do something else to get audio (such as using Chanspy and a Local channel).