Both side call recording problem on android 6 to 9

this.recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION);
this.recorder.setOutputFormat(MediaRecorder.OutputFormat.AMR_NB);
this.recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);