linphone-swift-demo icon indicating copy to clipboard operation
linphone-swift-demo copied to clipboard

Linphone record.

Open ERaawr opened this issue 8 years ago • 1 comments

I'm trying to make record a call, only the file is not saved. I do not even know if I'm recording.

My code looks something like this:


//////////////
let currentCall = linphone_core_get_current_call(lc)
let currentCallParameters = linphone_call_get_current_params(currentCall)

let path = Bundle.main.path(forResource: "call", ofType: "wav")
linphone_call_params_set_record_file(currentCallParameters, path)

/////When the call begins
let currentCall = linphone_core_get_current_call(lc)

linphone_call_start_recording(currentCall)
/*
--This message appears--
ortp-error-linphone_call_start_recording(): no output file specified. Use linphone_call_params_set_record_file().
*/

/////When the call ends
let currentCall = linphone_core_get_current_call(lc)
linphone_call_stop_recording(currentCall)

let currentcallparameters = linphone_call_get_current_params(currentCall)
let file = linphone_call_params_get_record_file(currentcallparameters)
let fileStr: String? = String(validatingUTF8: file!)
/*
It's the same path I added.
*/

I've tried other ways, but none of them work. I hope someone can help me. Thank you.

ERaawr avatar Jul 05 '17 20:07 ERaawr

This function must be used before the call parameters are assigned to the call.

and then call ' linphone_core_update_call() '

AdonLuo avatar Aug 03 '18 03:08 AdonLuo