Description
The /v2/phone/users/{userId}/recordings API endpoint for extension to extension calls is returning the wrong ID for a given call, relative to the recording end event notification resthooks. I have made a table to help make it more comprehensible as to what the issue is.
Rest hooks for a given call:
| from | to | direction | call ID | associated with |
|------+----+-----------+---------+-----------------|
| a | b | outbound | z | a |
| a | b | inbound | y | b |
recordings API :
| from | to | direction | call ID | associated with |
|------+----+-----------+---------+-----------------|
| a | b | inbound | z | b |
When I am trying to find any calls that our application may have missed, this error stops that process from working reliably.
Error
Here are the bodies of the two call end events
%{
"event" => "phone.recording_completed",
"event_ts" => 1_613_546_343_468,
"payload" => %{
"account_id" => "TlpxuG1XQZyVpmdu3FCCNA",
"object" => %{
"call_log_id" => "f6e3ec26-dc2b-4d83-af6b-167e700d2c4d",
"callee_name" => "QA Tester",
"callee_number" => "802",
"callee_number_type" => 1,
"caller_name" => "Zoom QA",
"caller_number" => "803",
"caller_number_type" => 1,
"date_time" => "2021-02-17T07:18:40Z",
"direction" => "inbound",
"download_url" =>
"https://zoom.us/v2/phone/recording/download/hcyA4jslTSGSxUrkN4-KJQ",
"duration" => 10,
"id" => "6769a95a70f011eb86a7b4969166e3fc",
"recording_type" => "Automatic",
"user_id" => "u6K0wu7oTrKw-63B4Ep4BA"
}
}
}
%{
"event" => "phone.recording_completed",
"event_ts" => 1_613_546_334_527,
"payload" => %{
"account_id" => "TlpxuG1XQZyVpmdu3FCCNA",
"object" => %{
"call_log_id" => "47c80745-b139-46fb-878c-fa991db987eb",
"callee_name" => "QA Tester",
"callee_number" => "802",
"callee_number_type" => 1,
"caller_name" => "Zoom QA",
"caller_number" => "803",
"caller_number_type" => 1,
"date_time" => "2021-02-17T07:18:40Z",
"direction" => "outbound",
"download_url" =>
"https://zoom.us/v2/phone/recording/download/6mNB5V5YQAKDxPNDuDJQHg",
"duration" => 9,
"id" => "6235edd670f011eb86a7b4969166e3fc",
"recording_type" => "Automatic",
"user_id" => "TcBXIIgSRCe_-B9VuS8-UQ"
}
}
}
And here is the body of the relevant call in from /phone/users/TcBXIIgSRCe_-B9VuS8-UQ/recordings
endpoint
%{
"account_id" => "TlpxuG1XQZyVpmdu3FCCNA",
"object" => %{
"callee_name" => "QA Tester",
"callee_number" => "802",
"callee_number_type" => 1,
"caller_name" => "Zoom QA",
"caller_number" => "803",
"caller_number_type" => 1,
"date_time" => "2021-02-17T07:18:40Z",
"direction" => "inbound",
"download_url" =>
"https://zoom.us/v2/phone/recording/download/hcyA4jslTSGSxUrkN4-KJQ",
"duration" => 10,
"id" => "6769a95a70f011eb86a7b4969166e3fc"
}
}
Which App Type (OAuth / Chatbot / JWT / Webhook)?
OAuth