The only way of doing that is to get a copy of AOSP source code and rewriting it to put back the API that Google removed.
Since they removed the code that allowed an app to record phone calls, you can't do anything to make an app record phone calls - the code is no longer there.