Can anyone please inform me that How to record the call either placed with callUser or callConference method in Sinch Android? The documents say contact us for recording but I haven't got any concrete solution regarding this as tried to contact but no response.
Apart from that, I tried recording call using MediaRecorder but there was an error MediaRecorder: start failed: -38 using all of the available AudioSources. Upon doing some research, I came to notice that Sinch is also using some internal AudioRecording which uses MIC. So, Whenever I try to record using MediaRecorder, it is failed as the Recorder Source is already in use.
Here is my code for recording:
private void initRecorder() {
recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL); // I tried using MIC and everything but got the same error
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile(getFilename());
recorder.setOnErrorListener(errorListener);
recorder.setOnInfoListener(infoListener);
try {
recorder.prepare();
} catch (Throwable e) {
e.printStackTrace();
}
}
private void recordCall() {
try {
recorder.start();
} catch (Throwable e) {
e.printStackTrace();
}
}