> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Telnyx WebRTC Voice SDKs Call Detail Records

> Retrieve and read WebRTC call detail records (CDRs) on Telnyx to troubleshoot connection issues, audio quality, and session lifecycle for Voice SDK calls.

# WebRTC Voice SDKs Call Detail Records

## Searching for Records

Every call between a voice SDK client and Telnyx produces a `webrtc` detail record. They can be searched via [this API](https://developers.telnyx.com/api/detail-records/search-detail-records).

For example, the following query returns `webrtc` detail records of calls made

* to/from any clients registered with `myagent01` username
* within `today`

```json theme={null}
GET /v2/detail_records?filter[record_type]=webrtc&filter[date_range]=today&filter[auth_username]=myagent01 HTTP/1.1
Host: api.telnyx.com
Authorization: Bearer XXX
```

The result may look like this

```json theme={null}
{
    "data": [
        {
            "fs_channel_id": "f6856af8-3fde-48fa-b3ab-027ca90245b6",
            "finished_at": "2024-12-11T17:43:24Z",
            "telnyx_call_control_id": "",
            "call_sec": 50,
            "connection_name": "js-sdk-p2",
            "caller_name": "",
            "rate": "0.002",
            "auth_username": "myagent01",
            "dest_number": "+18008648331",
            "cld": "+18008648331",
            "currency": "USD",
            "id": "4b679aae-b7e7-11ef-9fe0-02420aef3920",
            "payment_method": "rate-deck",
            "direction": "outbound",
            "cli": "+15127376291",
            "cost": "0.002",
            "billing_group_name": "",
            "telnyx_leg_id": "4b679aae-b7e7-11ef-9fe0-02420aef3920",
            "session_id": "63149763-3850-4f9a-b9cf-7babe1be98f8",
            "billed_sec": 60,
            "record_type": "webrtc_detail_record",
            "tags": "",
            "call_id": "064d6317-4837-41e2-8795-cfc304ced4d1",
            "billing_group_id": 60,
            "country_code": 1,
            "telnyx_session_id": "4b679edc-b7e7-11ef-adfb-02420aef3920",
            "connection_id": "2519141575053804765",
            "started_at": "2024-12-11T17:42:30Z",
            "source_country_code": 1,
            "caller_number": "+1512-737-6291"
        }
    ],
    "meta": {
        "total_pages": 1,
        "total_results": 1,
        "page_number": 1,
        "page_size": 20
    }
}
```

## Interpreting Records

While most of the fields in the records are self explanatory, the following parameters are given additional exposition.

### IDs in the WebRTC Domain

* `session_id` identifies a session, i.e. a successful registration, between an SDK client and Telnyx.
* `call_id`
  * identifies a call between an SDK client and Telnyx
  * can be generated by the SDK client or Telnyx
  * has a many-to-one relationship to a session, i.e. a session can have many calls.

`call_id` is essential to locate the debug log produced by an SDK client. This is further explained [here](https://developers.telnyx.com/docs/voice/webrtc/troubleshooting/debug-logs).

### IDs in the SIP Domain

The following IDs can be used to identify the SIP leg of a voice SDK call.

* `telnyx_leg_id`
* `telnyx_session_id`
* `fs_channel_id`

### IDs in the Programmable Voice Domain

If programmable voice (call control or TeXML) is used in the call flow, e.g. parking the outbound webRTC call, the following ID may also be returned in the detail record.

* `telnyx_call_control_id`
