# Events

This page covers two types of events emitted during an active LiveID+ session:

- **Compatibility Test - Status Checking**
- **On Call - Status Change**


Call closing events (`close` and `error`) are documented in the [Call Closing](/it/products/liveidplus/enterprise/get-started/call-closing) section.

br
## Compatibility Test - Status Checking

Before a call with an operator is started, a compatibility test is presented to the user to verify the device network and media requirements are met. The results of this test are reported with different events.

With each status change (e.g., error, success, or unanswered call), LiveID+ sends a `postMessage` event to the parent page and, if specified, a redirect request to the `redirectUrl` (using the method defined by `redirectMethod`).

The following events can be intercepted by the integrator:

| Event | Details |
|  --- | --- |
| `WEBRTCTEST_OK` | The compatibility test was successful. The customer is either waiting for an operator or has already been answered. |
| `WEBRTCTEST_KO` | The compatibility test failed. The error details can be retrieved from the `error` parameter in the `postMessage` envelope. A `type` parameter is also provided to classify the failure (see the next section). |
| `WEBRTCTEST_CALLNOTANSWERED` | The compatibility test was successful, but no operator answered the call. The `retry` parameter in the `postMessage` envelope indicates if the customer attempted to call again (`true`) or not (`false`). |
| `WEBRTCTEST_CALLANSWERED` | The compatibility test was successful, and an operator has answered the call. The `idConf` parameter in the `postMessage` envelope contains the conference ID. |
| `WEBRTCTEST_CALLCANCELLED` | The compatibility test was successful, but the customer canceled the call before an operator answered. |


For additional reference: MDN Web Docs on postMessage

br
### Failure Types (WEBRTCTEST_KO)

When a `WEBRTCTEST_KO` event occurs, a `type` code is included in the message to indicate the specific failure reason. The possible values are:

| Type | Details |
|  --- | --- |
| `1` | Check system error |
| `2` | Audio stream error |
| `3` | Video stream error |
| `4` | Network speed error |
| `5` | WebRTC error |
| `6` | Registered video encoding error |
| `7` | Registered video encoding error (duplicate) |
| `8` | User didn't confirm the recorded video |
| `9` | Browser not supported |
| `AV_HE` | Audio/video devices access error |
| `HE` | Audio/video generic error |
| `COE` | Check operator error |
| `C` | Start call error |
| `P` | Bad parameters error |
| `O` | Generic error |
| `OT` | Out of hours of service |




## On Call - Status Change

When LiveID+ is embedded within an iframe, it provides real-time status updates for active calls.

The following `postMessage` event can be intercepted by the integrator to check the status of an active call:

| Event | Details |
|  --- | --- |
| `status_call` | The message can include several properties. Example below. |


**Example `status_call` message:**


```json
{
    "event": "status_call",
    "message": "Customer landed on module 3 of 11",
    "moduleIndex": 3,
    "idConf": "Conference ID",
    "idCall": "Video-call ID"
}
```

For additional reference: MDN Web Docs on postMessage