Call Recordings W/Outbound Transfer

I can’t seem to find another post on this, but I’m sure someone has asked this question.

I’ve got an inbound call (a) getting sent to an agent (b). Agent (b) makes an warm transfer to an external number (c). I want the leg between a and b to get recorded, and the leg between b and c to be recorded. But the recording needs to stop when a gets connected to c.

Any recommendations?