Call History Logs - Duplicate call_id

/phone/call_history
Link to the API endpoint documentation.

Description
We are trying to understand the circumstances that produce call_history records with the same call_id. We have 70,317 out of 308,907 call_history records where the call_id appears more than once. The documentation for call_id indicates that it might contain multiple “call log ID”, but we don’t understand the why this would be conceptually. Could you please provide an explanation for this behavior?

How To Reproduce
Steps to reproduce the behavior:
1. Get account call history with a sufficiently large date range.
2. Parse the response to find examples where multiple records share the same call_id

Hi @kuhnm , this is a great question. This happens because there are different call flow types
depending on how calls are routed. This means there can be a parent call_id with subsequent callLogId for the different routing paths.

The specific path or portion can be seen via get call path Phone APIs :
/phone/call_history/{callLogId} .

This endpoint is where you pass the id aka callLogId portion retrieved from /phone/call_history:

Hi Gianni,

Thanks for the reply. I’m still not understanding why there are duplicate call_ids from the call_history endpoint. Hopefully, this example from our data might help.

We have four objects in the call_logs array returned by the Get account’s call history endpoint that have the same call_id. The callee_ext_type and caller_ext_type is “user” for all four objects. The objects appear to be in pairs; each pair has the same start_time, caller, callee, and one of the pair has the direction of “inbound” while the other has the direction of outbound. We pass the id of each object to the Get call path endpoint. As shown in the summary below, these calls are not connected by this endpoint as we’d expect:

  • First Pair
    • Outbound
      • One call path: result = connected
    • Inbound
      • One call path: result = answered
  • Second Pair
    • Outbound
      • Two call paths: result for both = connected
    • Inbound
      • One call path: result = answered

This does not appear to match any of the documented flows. We would expect, if these calls are connected, that there would be one object from the call history endpoint and that they would be connected in the call path endpoint. However, these records are only connected by call_id, and we do not understand why or in what circumstances this occurs.

Looking into this @kuhnm