I want to record the call in a file using the Java API. I created audio media recorder as stated in the documentation and started transmission from the call's media to the recorder's media. I have been trying it since yesterday. Still I am getting an empty file every time. I used following snippet :-
public void startRecording(String filePath) {
AudioMedia callMedia = getAudioMedia();
try { // disconnect previous bridges before creating new one
stopAudioMediaFlow();
mediaRecorder = new AudioMediaRecorder();
mediaRecorder.createRecorder(filePath);
callMedia.startTransmit(mediaRecorder);
} catch (Exception exc) {
Logger.error("Error in recording audio ", exc);
}
}
Any help in this issue will be highly appreciated.