5

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();
    }
}
Yasir Tahir
  • 790
  • 1
  • 11
  • 31

1 Answers1

2

CAn you mail support@sinch.com again to enable call recording. In short Sinch SDK is using the recorder to record the mic and transmit it to the outer party, if you want to record the call it needs to be done serverside not client side. in i.e the connectConf action

https://www.sinch.com/docs/voice/rest/#ConnectConfAction

cjensen
  • 2,703
  • 1
  • 16
  • 15
  • Okay I got the idea about that. But Is that possible to have recording of app-to-app calling? Apart from this, what should I send to enable call recording? What should I write in mail for enabling the call recording? – Yasir Tahir May 05 '16 at 09:31
  • Mail in your account info, credentials to an S3 bucket where we can store you files. And yes its possible to record app to app call – cjensen May 10 '16 at 17:55
  • Can you please guide me the steps that I have to perform for recording of app-to-app calling? – Yasir Tahir May 10 '16 at 17:58