I'm having trouble linking an inbound call to a call recording.
I did a call to GetCurrentCalls while active on the call. I retrieved the call with UniqueID pbx2-1547808640.5744778.
After ending the call and waiting a few minutes, I did a call to GetCallDetailRecords. This gave me a record with UniqueID pbx2-1547808610.5744690
I then did a call to GetCallRecordings. This also gave me a record that matched the previous unique ID of pbx2-1547808610.5744690.
If I call DownloadCallRecordingByUniqueId for pbx2-1547808610.5744690, I get the correct recording. But if I call it for pbx2-1547808640.5744778, I get "Error - Does Not Exist"
My problem is there doesn't seem to be a way of determining the call recording from pbx2-1547808640.5744778, or any other data available in the GetCurrentCalls request. Is there any way to receive a call and subsequently access the call recording?
Thank you for your reply.
I'm using Python. I also implemented a workaround, by writing two different functions. One ending the call and wait for a few seconds to run the second function of GetCallDetailRecord. unique ID retrieved in GetCurrentCalls matched with unique ID of GetCallDetailRecord all the time.
Sorry for typos, English is my second language.
Unfortunately I wasn't able to solve it directly. I implemented a workaround which maps the call to the recording based on the call time and phone number. We store the start time in the database and look for matching records within a minute of that time. using GetCallDetailRecords. It's possible there might be multiple, so we get the one with the closest call reference to the one we received from the original call to GetCurrentCalls. There are some subtleties with this in that there may be a delay between completing the call and being able to retrieve it from the API, so you may have to implement some retry logic. It's also possible that the call fails and there is no corresponding recording or call detail record at all.
I hope that helps.
I have the same problem. Did you manage to solve it?
Thanks for the explanation, I'm happy with that. The problem I have is that when active on a call, even after it's been transferred to the extension, if I do a call to GetCurrentCalls, I still get the queued Unique ID (pbx2-1547808640.5744778) and not the new ID (pbx2-1547808610.5744690). So I can't record in our system what the correct reference number would be for later retrieving the call recording. Would it be possible to update GetCurrentCalls so that it returns the new UniqueID after the call has been transferred to the extension?
The call with the UniqueID pbx2-1547808640.5744778, was a call that came into the queue and was therefore not recorded.
Once transferred to an extension the call is then recorded if the feature is enabled (unique ID of pbx2-1547808610.5744690). Thus the reason for the error when searching for the UniqueID pbx2-1547808640.5744778 recording .
Hope this solves the query.
Thanks and Regards,