Hello,
According to the webhook events documentation, the direction property specifies the Direction of the call
which presumably should be consistent across phone.recording_completed and phone.callee_call_log_completed for the same call.
In some cases, we notice inconsistent direction values for the same call.
Below is an example of this inconsistency in webhook requests for the same call (7178968308336916650).
**phone.callee_call_log_completed with direction inbound**
{
"applicationId": "***************",
"monitorTime": 1671483884252,
"traceId": "PBX_SERVER_7178968308336916650",
"accountId": "***************",
"event": "phone.callee_call_log_completed",
"status": "200",
"userId": "***************",
"url": "***************",
"subscriptionId": "***************",
"requestHeaders": "N/A",
"requestBody": "{\"event\":\"phone.callee_call_log_completed\",\"payload\":{\"account_id\":\"***************\",\"object\":{\"call_logs\":[{\"id\":\"4145322e-b74c-4455-9355-b15db6ecb253\",\"call_type\":\"voip\",\"caller_number\":\"+***************\",\"caller_number_type\":2,\"caller_number_source\":\"external\",\"caller_name\":\"***************\",\"callee_number\":\"841\",\"callee_number_type\":1,\"callee_name\":\"***************\",\"direction\":\"inbound\",\"duration\":12,\"result\":\"Call connected\",\"date_time\":\"2022-12-19T21:04:29Z\",\"path\":\"sharedLines\",\"site\":{\"id\":\"***************\"},\"has_recording\":false,\"has_voicemail\":false,\"call_id\":\"7178968308336916650\",\"forwarded_by\":{\"name\":\"Customer Service Dept\",\"extension_type\":\"sharedLineGroup\",\"extension_number\":\"953\"},\"caller_country_code\":\"1\",\"caller_country_iso_code\":\"US\",\"answer_start_time\":\"2022-12-19T21:04:30Z\",\"call_end_time\":\"2022-12-19T21:04:42Z\",\"department\":\"Engagement\",\"cost_center\":\"\"}],\"user_id\":\"***************\"}},\"event_ts\":1671483884237}",
"responseHeaders": "{\"Content-Length\":\"0\",\"Date\":\"Mon, 19 Dec 2022 21:04:44 GMT\"}",
"runTime": "427",
"ttl": 1672693486
}
**phone.recording_completed with direction outbound**
{
"applicationId": "***************",
"monitorTime": 1671483883199,
"traceId": "7178968308336916650+PBX_a1d7be5bfa56402aa9edecc28c614821",
"accountId": "***************",
"event": "phone.recording_completed",
"status": "200",
"userId": "***************",
"url": "***************",
"subscriptionId": "***************",
"requestHeaders": "N/A",
"requestBody": "{\"event\":\"phone.recording_completed\",\"payload\":{\"account_id\":\"***************\",\"object\":{\"recordings\":[{\"id\":\"0f59d7c270774d72a25e7ca5801db481\",\"user_id\":\"***************\",\"caller_number\":\"+***************\",\"caller_number_type\":2,\"caller_name\":\"***************\",\"callee_number\":\"838\",\"callee_number_type\":1,\"callee_name\":\"***************\",\"direction\":\"outbound\",\"duration\":11,\"download_url\":\"https://zoom.us/v2/phone/recording/download/***************\",\"date_time\":\"2022-12-19T21:04:30Z\",\"recording_type\":\"Automatic\",\"call_log_id\":\"0f59d7c2-7077-4d72-a25e-7ca5801db481\",\"call_id\":\"7178968308336916650\",\"owner\":{\"type\":\"user\",\"id\":\"***************\",\"name\":\"***************\",\"extension_number\":838,\"has_access_permission\":false},\"site\":{\"id\":\"***************\"},\"end_time\":\"2022-12-19T21:04:42Z\"}]}},\"event_ts\":1671483883122}",
"responseHeaders": "{\"Content-Length\":\"0\",\"Date\":\"Mon, 19 Dec 2022 21:04:43 GMT\"}",
"runTime": "248",
"ttl": 1672693483
}
Can you please investigate and let us know if this is a bug or if we are missing something?
Thank you.