Can outgoing recordings be done to include any earlymedia

I wish to record outgoing calls, but I also wish the recordings to start from call setup so that they include the early media/in-band progress part of the call (there are good reasons for us wanting to do this, but I do not wish to expand on them here lest this topic should go off on a tangent). I would also wish to record the early media of call that do not go on to connect to a destination user; this may be due to issues with the destination (e.g. bad number), dial timeout with the destination ringing, or calls being hung up by the originating extension before the destination connects.

We are using asterisk 11. User/extensions are registered SIP soft phones. Calls are to the public network via a sip trunk (or to other sip soft phones).

I have followed a number of examples that perform a Monitor (or MixMonitor) immediately before a Dial() in the dialplan; as in
exten => _9X.,n,MixMonitor(…
exten => _9X.,n,Dial(…

I have also tried something similar in the AGI (phpagi).

In all cases I get good call recordings but they only start when the destination connects. I would like recording to start when the dial is initiated, or at worst when a progress comes back from the destination
So…
Is there any config flag that might permit recording to start before connection?
Is there any flag on the monitor or dial to permit this?
Is there any way at all this can be done in the dialplan or AGI?
Can it be done in the AMI?

Thank you

Check if your MixMonitor cmd has the b option, if so, remove it.

thank you,
I have tried with and without the b flag…it makes no difference to the recordings commencing at the point of connection.

Solved.
I just needed to generate a progress for internal calls, and pass the progress message for external calls (gateway config required). Once available the call was bridges early and recording commenced.