> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt

# Call quality detection

The `CallEvents.AudioQualityDetected` event reports the audio quality detected for a call. Read its `quality` property to log or handle the reported value. The [Call API reference](/api-reference/voxengine/call#callevents-audioqualitydetected) lists `CallAudioQuality.HD` for high-definition audio and `CallAudioQuality.STANDARD` for standard audio quality.

The scenario answers an incoming call and logs the reported quality:

```javascript title={"voxengine-call-quality.js"}
VoxEngine.addEventListener(AppEvents.CallAlerting, ({ call }) => {
  call.addEventListener(CallEvents.AudioQualityDetected, ({ quality }) => {
    Logger.write(`Call audio quality: ${quality}`);
  });

  call.addEventListener(CallEvents.Disconnected, () => VoxEngine.terminate());
  call.addEventListener(CallEvents.Failed, () => VoxEngine.terminate());
  call.answer();
});

```

To try it, add the code as a [scenario](/platform/voxengine/scenarios) and attach it to an inbound [routing rule](/platform/voxengine/routing-rules). Place a call that matches the rule, then find the `Call audio quality` message in the call's session logs. See [Scenarios troubleshooting](/platform/voxengine/troubleshooting#built-in-logger) for where to view those logs.