简体   繁体   中英

Sinch Call Recording Android

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();
    }
}

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 ie the connectConf action

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM