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

# WebRTC session

> Packet counts, MOS (mean opinion score), jitter, RTT (round-trip time), media and signalling endpoints, setup timers, and audio devices for each Amazon Connect Contact, captured by the Agent Experience Collector.

The `webRTCSession` object captures WebRTC (Web Real-Time Communication) session details for one Amazon Connect Contact, written by the Agent Experience Collector when the Contact disconnects. It covers inbound and outbound packet metrics, MOS (mean opinion score), jitter, RTT (round-trip time), signalling and media endpoints, setup event timers, failure flags, and the audio devices in use.

## Schema

```json theme={null}
"webRTCSession": {
  "metrics": {
    "inbound": {
      "packetsReceived": 2643,
      "packetsLost": 0,
      "packetsLostPercentage": 0,
      "bytesReceived": 298621,
      "audioLevel": { "max": 8191, "avg": 520.32 },
      "jitterBufferMils": { "min": 1, "max": 14, "avg": 3.25 }
    },
    "outbound": {
      "packetsSent": 2931,
      "packetsLost": 52,
      "packetsLostPercentage": 1.77,
      "bytesSent": 247605,
      "audioLevel": { "max": 18712, "avg": 6094.7 },
      "jitterBufferMils": { "min": 0.19, "max": 38.73, "avg": 7.79 }
    },
    "rtt": { "max": 566, "avg": 122 },
    "jitter": { "max": 14, "avg": 3 },
    "mos": { "min": 2.52, "max": 4.43, "avg": 4.3 }
  },
  "serviceEndpoint": {
    "fqdn": "",
    "transportLifeTimeSeconds": 0,
    "expiry": "0001-01-01T00:00:00Z"
  },
  "mediaEndpoint": {
    "fqdn": "turnnlb-93f2de0c97c4316b.elb.ap-southeast-2.amazonaws.com.",
    "destinationPort": "3478",
    "sourcePort": "63568",
    "transport": "udp",
    "privateIp": "10.4.3.213"
  },
  "signallingEndpoint": { "fqdn": "" },
  "eventTimer": {
    "gumTimeMillis": 418,
    "initializationTimeMillis": 445,
    "iceCollectionTimeMillis": 270,
    "signallingConnectTimeMillis": 2,
    "handshakingTimeMillis": 473,
    "preTalkingTimeMillis": 927,
    "cleanupTimeMillis": 163
  },
  "eventFailure": {
    "iceCollectionFailure": false,
    "signallingConnectionFailure": false,
    "handshakingFailure": false,
    "gumOtherFailure": false,
    "gumTimeoutFailure": false,
    "createOfferFailure": false,
    "setLocalDescriptionFailure": false,
    "userBusyFailure": false,
    "invalidRemoteSDPFailure": false,
    "noRemoteIceCandidateFailure": false,
    "setRemoteDescriptionFailure": false
  },
  "usedDevices": [
    {
      "timestamp": "2026-05-18T10:14:10.654Z",
      "deviceId": "default",
      "groupId": "ac3e3f65d873aaaabbbbbcccce1d2ccd24fd34c5d341089a66ef02589dabf06b0",
      "kind": "audioinput",
      "label": "Default - Elgato Wave:3 (0fd9:0070)"
    }
  ]
}
```

## Fields

| Name                                       | Type              | Required | Description                                                                                                                                           | Example                                                      |
| ------------------------------------------ | ----------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| `metrics.inbound.packetsReceived`          | integer           | yes      | Total RTP packets received from Amazon Connect during the Contact.                                                                                    | `2643`                                                       |
| `metrics.inbound.packetsLost`              | integer           | yes      | Total inbound RTP packets lost.                                                                                                                       | `0`                                                          |
| `metrics.inbound.packetsLostPercentage`    | number            | yes      | Inbound packet loss as a percentage.                                                                                                                  | `0`                                                          |
| `metrics.inbound.bytesReceived`            | integer           | yes      | Total inbound bytes received.                                                                                                                         | `298621`                                                     |
| `metrics.inbound.audioLevel`               | object            | yes      | Inbound audio level range — `max` and `avg`.                                                                                                          | —                                                            |
| `metrics.inbound.jitterBufferMils`         | object            | yes      | Inbound jitter-buffer delay in milliseconds — `min`, `max`, `avg`.                                                                                    | —                                                            |
| `metrics.outbound.packetsSent`             | integer           | yes      | Total RTP packets sent to Amazon Connect during the Contact.                                                                                          | `2931`                                                       |
| `metrics.outbound.packetsLost`             | integer           | yes      | Total outbound RTP packets lost.                                                                                                                      | `52`                                                         |
| `metrics.outbound.packetsLostPercentage`   | number            | yes      | Outbound packet loss as a percentage.                                                                                                                 | `1.77`                                                       |
| `metrics.outbound.bytesSent`               | integer           | yes      | Total outbound bytes sent.                                                                                                                            | `247605`                                                     |
| `metrics.outbound.audioLevel`              | object            | yes      | Outbound audio level range — `max` and `avg`.                                                                                                         | —                                                            |
| `metrics.outbound.jitterBufferMils`        | object            | yes      | Outbound jitter-buffer delay in milliseconds — `min`, `max`, `avg`.                                                                                   | —                                                            |
| `metrics.rtt`                              | object            | yes      | Round-trip time in milliseconds — `max` and `avg`.                                                                                                    | `{ "max": 566, "avg": 122 }`                                 |
| `metrics.jitter`                           | object            | yes      | Jitter in milliseconds — `max` and `avg`.                                                                                                             | `{ "max": 14, "avg": 3 }`                                    |
| `metrics.mos`                              | object            | yes      | Estimated Mean Opinion Score — `min`, `max`, `avg`. Range 1 (worst) to 5 (best).                                                                      | `{ "min": 2.52, "max": 4.43, "avg": 4.3 }`                   |
| `serviceEndpoint.fqdn`                     | string            | yes      | Amazon Connect service WebSocket FQDN.                                                                                                                | `service.connect.ap-southeast-2.amazonaws.com`               |
| `serviceEndpoint.transportLifeTimeSeconds` | integer           | yes      | Transport lifetime advertised by the service endpoint, in seconds.                                                                                    | `0`                                                          |
| `serviceEndpoint.expiry`                   | string (ISO 8601) | yes      | When the service-endpoint transport expires.                                                                                                          | `0001-01-01T00:00:00Z`                                       |
| `mediaEndpoint.fqdn`                       | string            | yes      | Amazon Connect TURN service FQDN.                                                                                                                     | `turnnlb-93f2de0c97c4316b.elb.ap-southeast-2.amazonaws.com.` |
| `mediaEndpoint.destinationPort`            | string            | yes      | Destination port on the TURN service.                                                                                                                 | `3478`                                                       |
| `mediaEndpoint.sourcePort`                 | string            | yes      | Source port used on the agent endpoint.                                                                                                               | `63568`                                                      |
| `mediaEndpoint.transport`                  | string            | yes      | Transport protocol. One of `udp`, `tcp`, `tls`.                                                                                                       | `udp`                                                        |
| `mediaEndpoint.privateIp`                  | string (IPv4)     | yes      | Private IP the agent endpoint used for media.                                                                                                         | `10.4.3.213`                                                 |
| `signallingEndpoint.fqdn`                  | string            | yes      | Amazon Connect signalling WebSocket FQDN.                                                                                                             | `signalling.connect.ap-southeast-2.amazonaws.com`            |
| `eventTimer.gumTimeMillis`                 | integer           | yes      | `getUserMedia` call duration in milliseconds.                                                                                                         | `418`                                                        |
| `eventTimer.initializationTimeMillis`      | integer           | yes      | WebRTC initialization duration in milliseconds.                                                                                                       | `445`                                                        |
| `eventTimer.iceCollectionTimeMillis`       | integer           | yes      | ICE candidate collection duration in milliseconds.                                                                                                    | `270`                                                        |
| `eventTimer.signallingConnectTimeMillis`   | integer           | yes      | Signalling connection duration in milliseconds.                                                                                                       | `2`                                                          |
| `eventTimer.handshakingTimeMillis`         | integer           | yes      | DTLS handshake duration in milliseconds.                                                                                                              | `473`                                                        |
| `eventTimer.preTalkingTimeMillis`          | integer           | yes      | Time from session start to first audio in milliseconds.                                                                                               | `927`                                                        |
| `eventTimer.cleanupTimeMillis`             | integer           | yes      | Session teardown duration in milliseconds.                                                                                                            | `163`                                                        |
| `eventFailure`                             | object            | yes      | Per-stage WebRTC failure flags. Each property is a boolean; `true` means the named failure occurred during session setup or teardown.                 | —                                                            |
| `usedDevices`                              | object\[]         | yes      | Audio input and output devices the Contact Control Panel used during the session. Each entry has `timestamp`, `deviceId`, `groupId`, `kind`, `label`. | —                                                            |
| `usedDevices[].kind`                       | string            | yes      | Device kind. One of `audioinput`, `audiooutput`.                                                                                                      | `audioinput`                                                 |

## Notes

* Packet and byte counts are totals for the Contact, not rates. Loss percentages are derived values.
* RTT and jitter values are in milliseconds.
* `jitterBufferMils` is the jitter-buffer delay, distinct from the raw jitter reported in `metrics.jitter`. Both are in milliseconds.
* All `eventTimer` durations are in milliseconds and measure discrete phases of WebRTC session setup and teardown.
* `eventFailure` booleans are all present on every contact record, even when no failure occurred. A value of `false` means the named stage completed without error.
