You’d need an app to do it for you. Automatic Call Recorder is a really good example of a call recorder app capable of that.