linphone-swift-demo
linphone-swift-demo copied to clipboard
Linphone record.
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.
This function must be used before the call parameters are assigned to the call.
and then call ' linphone_core_update_call() '