Hi Eugene,
1) Unfortunately, there is no API to start recording a call. Call recording can be triggered only by users from the RingCentral mobile phone or the SoftPhone after a call is connected.
2) You can access recorded files by first calling the call-log API. You might want to query for only calls with records by setting the flag "withRecording=true". Then check if the "recording" field exists in the response. If it exists, parse the "recording" object to get the "contentUri", which will let you have access to the binary file.
See this code snippets for the c# SDK.
var account = rc.Restapi().Account(); // List call Logs var queryParams = new CallLogPath.ListParameters { type = "Voice", view = "Detailed", dateFrom = DateTime.UtcNow.AddDays(-100).ToString("o"), withRecording = true, perPage = 10, }; var callLogs = await account.CallLog().List(queryParams); // download a call recording var callLog = callLogs.records[0]; var content = await account.Recording(callLog.recording.id).Content().Get(); File.WriteAllBytes("test.wav", content.data);
No, you cannot get notification about generation of a wav. file. The 'message-store' is for SMS/MMS and Fax events only.
You might want to try with some work-around solution by using the "presence" event filter to get notified when a call completed, then use the sequence call above to check for a recording if any.
Hope this helps.
Paco
Thanks for your reply.
After the call is completed, i am going to download recorded wav file.
But at this time recorded wav file isn't generated yet.
wav file is generated after a few sec.
when should i download file.
I am sure you can help me.
can I use function subscription?
I believe you will help me.