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

# How to observe and troubleshoot realtime voice behavior

[Back to how-to guides](https://koreai.mintlify.site/agent-platform/abl/how-to/overview.md#voice-and-realtime-conversations)

Use this pattern when a live voice call sounds wrong, feels slow, or ends in a way you did not design. Start with the numbers in **Voice Metrics**. Then read the `voice_*` trace events for the cause. Each symptom maps to one or two events.

"Realtime" here means live calls. This article covers both pipeline voice (STT, agent, TTS through KoreVG) and realtime speech-to-speech voice. It says where they differ.

## Concept

Three layers of evidence explain a call. Check them in this order.

| Layer | Question it answers | Where |
| - | - | - |
| Compile diagnostics | Did a voice setting sit in a place that cannot hold it? | The agent editor. Codes such as `VOICE_BARGE_IN_ILLEGAL_PLACEMENT`. |
| Call metrics | How did this call perform? | **Sessions**, open a session, **Voice Metrics** tab. |
| Trace events | Why did a turn behave this way? | **Sessions** or **Traces**. Filter on `voice_`. |

For trends across calls, use the **Voice Analytics** page. It shows **Total Calls**, **Avg MOS**, **ASR Quality**, **E2E Latency**, **Barge-In Rate**, **DTMF Fallback**, and an hourly breakdown.

### What each mode records

| Evidence | Pipeline voice | Realtime voice |
| - | - | - |
| STT, LLM, and TTS time per turn | Yes | No. The provider fuses the stages. |
| End-to-end time and interruptions per turn | Yes | Yes |
| `voice_turn_quality` per caller turn | Yes | Yes |
| `voice_stt` with confidence | Yes | When parallel STT is on, the caller transcript can come from the STT vendor or fall back to the model's own transcript. Studio labels the source. |
| `voice_tts` delivery failures | Yes | No separate TTS stage |
| `voice_realtime_*` provider events | No | Yes |

Voice events record timings, counts, and identifiers. Filler and SSML events keep lengths and hashes, not the text. Secure input values never reach the trace. A discarded low-confidence transcript keeps a preview of at most 160 characters, except during secure input.

## Minimal working example

Tag how each call ends, so you can filter sessions by outcome. The agent sets a custom `_meta` dimension on three exits: completed, silence, and a hold that passed its limit. An error also sets one.

`agents/store-hours-voice.agent.abl`

```yaml theme={null}
AGENT: Store_Hours_Voice

GOAL: "Tell the caller the store hours and tag how each call ended."

PERSONA: "Calm phone agent. Short, direct answers."

CONVERSATION:
  listening:
    on_no_input:
      enabled: true
      mode: static
      timeout_ms: 6000
      max_retries: 2
      on_exhausted: hook
      messages:
        - text: "Are you still there?"
      exhausted_message: "I still cannot hear you. Goodbye."

HOOKS:
  on_no_input_exhausted:
    SET: _meta.voice_exit = "silence"
  on_caller_hold_limit:
    SET: _meta.voice_exit = "hold_limit"

ON_ERROR:
  default:
    RESPOND: "Sorry, I had a problem. Goodbye."
    SET: _meta.voice_exit = "error"
    THEN: COMPLETE

FLOW:
  entry_point: hours

  steps:
    - hours

  hours:
    REASONING: false
    SET:
      _meta.voice_exit = "completed"
    RESPOND: "We are open nine to five, Monday to Friday. Goodbye."
    THEN: COMPLETE
```

* The hooks cannot `RESPOND`. With no `HANDOFF`, the call ends after the hook. See [How to define fallback behavior for voice failures](https://koreai.mintlify.site/agent-platform/abl/how-to/define-voice-fallbacks).
* `_meta` values are text, numbers, or true and false. Use stable, low-cardinality values. Never write the caller's words. See [How to debug routing decisions in traces](https://koreai.mintlify.site/agent-platform/abl/how-to/debug-routing-traces).
* The agent has no tools and no companion resources.

Read one call:

1. Open **Sessions** and select the session.
2. Open **Voice Metrics**. Read **Call Overview**, **Call Termination**, and **Call Activity**.
3. Open the trace. Filter on `voice_`. Read `voice_session_start`, `voice_config_resolved`, then each `voice_turn`.
4. Check the session's custom dimensions for `voice_exit` to confirm how the call ended.

## How it works

### Voice Metrics panels

| Panel | What it shows | Read it carefully |
| - | - | - |
| **Call Overview** | Status, duration, turns, phone number, call ID. | Use the call ID to find the same call at your carrier or gateway. |
| **Network Quality (MOS)** | **Proxy MOS** and **Combined MOS** from network reports. | Shows "Homer QoS data not available" when the data is missing. |
| **E2E Response Latency** | Per-turn time from the runtime processing the finished utterance to the first-byte or playback-start status. Each turn shows its measurement source. | It excludes speech finalization and network time before that. It is not a caller-audio measurement. |
| **TTS Quality** | An estimated 1 to 5 score from response timing and **Avg TTS first audio**. | It is not a measure of how the voice sounds. |
| **ASR Quality** | A proxy score from repetition, hesitation, correction, clarity, and confidence. | A proxy. It uses no reference transcript. |
| **ASR Cascade Detection** | Risk per turn (low, medium, high), root cause (network, ASR, mixed), and factors. | Medium and high risk write a `voice_asr_cascade` event. |
| **Barge-in Events** and **DTMF Fallback** | Interruptions and keypad use. | A high rate points to long replies or unreliable speech input. |
| **Call Activity** | Active speech, processing, and **Dead Air/Silence** time. | Needs measured caller speech time. Otherwise it says "Not measured". |
| **Speech-to-Text** and **Text-to-Speech** | Provider, model, voice, language, sample rate, and synthesis count. | Confirm the call used the settings you intended. |
| **Call Termination** | SIP status, reason, and end time. | SIP 200 means normal. Read the reason for anything else. |
| **SIP Ladder** | The SIP messages for the call. Click **Reveal** to load them. | Needs permission to reveal. |
| **Speech (realtime)** | Provider, turns, **Avg turn latency**, and barge-ins. | Shown instead of STT and TTS panels on realtime calls. |

When Studio shows "Voice metrics are based on partial evidence", some events are missing or too large to show. Totals can change. The **Voice quality** panel in the investigation view reports how many events it read. It also offers **Play from this turn** and **Show in trace** for each turn.

### Trace events by area

| Area | Events | What they tell you |
| - | - | - |
| Call lifecycle | `voice_session_start`, `voice_session_end`, `voice_call_status`, `voice_bootstrap_failed`, `voice_session_reattach` | The call started, ended, changed state, failed to start, or reconnected after a gateway drop. |
| Turn timing | `voice_turn`, `voice_stt`, `voice_llm`, `voice_tts`, `voice_turn_quality` | Time per stage. `voice_turn_quality` gives, per caller turn, `firstAudioMs`, `answerAudioMs`, `toolCallMs`, `toolResultMs`, any separate line (`preamble`, `acknowledgement`, `filler`), and `interruptedDuring`. Times count from the caller's last word. |
| Silence cover | `voice_dead_air`, `voice_filler_playback`, `voice_pipeline_answer_gap`, `voice_playback_watchdog` | Silence the caller heard, and what covered it. `voice_dead_air` carries `waitReason`, `phase`, `uncoveredSilenceMs`, and `intentionalSilenceMs`. |
| Recognition | `voice_stt_below_confidence`, `voice_asr_quality`, `voice_asr_cascade`, `voice_field_asr_swap`, `voice_parallel_stt` | A discarded transcript (`confidence` against `threshold`), quality scores, and per-field recognizer changes. |
| Turn-taking | `voice_barge_in`, `voice_backchannel_decision`, `voice_hold_detected`, `voice_hold_decision`, `voice_listening_mode_resolved`, `voice_control.dtmf`, `voice_listening_finish_key_decision` | Who spoke over whom, which mode the call used, and how keypad input ended. |
| Settings in effect | `voice_config_resolved`, `voice_connection_streaming_resolved`, `voice_feature_diagnostic` | The resolved setting, a setting that stayed inactive (for example `background_only_inactive`), and a feature the transport lacks. |
| Silence handling | `voice_no_input_armed`, `_fired`, `_prompt_played`, `_prompt_delivery_failed`, `_reset`, `_exhausted`, `_config_dropped`, `_config_fallback`, and `voice_no_input_route_started`, `_completed`, `_dropped`, `_failed`, `_limited`, `_unsupported` | The silence timer, each reprompt (`retryIndex`), the exhausted action, an invalid config, and whether a route ran. |
| Hold | `voice_caller_hold_started`, `_resumed`, `_limit_reached`, `_audio_not_delivered`, `_unsupported` | The hold and what the limit did. |
| Transfer | `voice_call_transfer`, `_dispatched`, `_destination`, `_outcome`, `_failed`, `voice_sip_header_dropped`, `voice_transfer_interim_speech_wait` | The method, the destination source, the outcome, and a header that policy dropped (name only, never the value). |
| Speech failures | `voice_speech_provider_error`, `voice_tts` with `deliveryStatus: failed`, `voice_tts_stream_unavailable` | A provider rejection or no audio. |
| Output held back | `voice_interim_output_suppressed`, `voice_output_superseded`, `voice_duplicate_final_suppressed` | A line the channel chose not to speak, and the guard that decided. |
| Realtime provider | `voice_realtime_turn_start`, `voice_realtime_turn_end`, `voice_realtime_tool_call`, `voice_realtime_session_config`, `voice_realtime_provider_event`, `voice_realtime_provider_error`, `voice_realtime_diagnostic` | The provider session, its tool calls, and its errors. |

A speech provider error carries a catalog `errorCode`: `SPEECH_PROVIDER_INVALID_API_KEY`, `SPEECH_PROVIDER_CREDENTIALS_REQUIRED`, `SPEECH_PROVIDER_AUTH_FAILED`, `SPEECH_PROVIDER_ACCESS_DENIED`, `SPEECH_PROVIDER_UNSUPPORTED_VOICE`, `SPEECH_PROVIDER_UNSUPPORTED_LANGUAGE`, `SPEECH_PROVIDER_RATE_LIMITED`, `SPEECH_PROVIDER_UNAVAILABLE`, or `SPEECH_PROVIDER_REJECTED`. The event also carries the configured provider and model, and a numeric status when one exists. It never carries the provider's own text.

### Compile diagnostics

Voice diagnostics block publish (errors) or advise (warnings). The common ones:

| Code | Meaning |
| - | - |
| `VOICE_BARGE_IN_ILLEGAL_PLACEMENT` | `BARGE_IN` sits where it cannot apply. |
| `VOICE_LISTENING_CALL_LEVEL_ONLY` | `LISTENING` is set per turn, step, or field. Listening mode is fixed for the call. |
| `VOICE_NO_INPUT_ILLEGAL_PLACEMENT` | `ON_NO_INPUT` is not directly in a step `VOICE` block. |
| `VOICE_INVALID_TURN_DETECTION` | `turn_detection` has a bad `enabled` or `eou_threshold`. |
| `VOICE_TURN_DETECTION_WITH_END_OF_SPEECH` | An end-of-speech hint has no effect while turn detection is on. |
| `CONVERSATION_BACKGROUND_ONLY_WITH_TURN_TAKING` | Back-channel or continuation settings need `background` mode. |
| `NO_INPUT_TARGET_NO_HOOK` | `on_exhausted: hook` with no `on_no_input_exhausted` hook. |
| `LISTENING_KEY_NEEDS_NEWER_RUNTIME` | An import dropped a listening key your runtime cannot apply. |

The full list is in [Voice diagnostics](https://koreai.mintlify.site/agent-platform/abl/reference/voice.md#voice-diagnostics).

## Verification

Run these calls once for each agent before go-live. After each, open the session and check the expected evidence.

| Call | Expected evidence |
| - | - |
| A normal call to completion | `voice_session_start` and `voice_session_end`. One `voice_turn` per caller turn. **Call Termination** shows SIP 200. |
| A short question, then a long one | **E2E Response Latency** per turn. On pipeline voice, the **Turn latency** table splits STT, LLM, TTS, and first audio. |
| A turn with a tool call | `tool_call` in the trace. `voice_dead_air` with `waitReason: tool` and `uncoveredSilenceMs` near 0 when a filler covers the wait. |
| Speak over the agent | `voice_barge_in` (realtime) or a barge-in flag on the turn (pipeline). The agent stops. |
| Stay silent | `voice_no_input_exhausted` after the last reprompt. The `_meta.voice_exit` value you set. |
| Mumble a short answer | `voice_stt_below_confidence` with `confidence` below `threshold`. |
| Press keypad digits | `voice_control.dtmf`. The **DTMF Fallback** panel counts the turn. |
| Force a failure | The matching failure event from the table above, and the fallback line you wrote. |
| Check effective settings | **Voice quality**, **Voice configuration** and **Voice changes during the call**: configured value, effective value, and reason. |

For a realtime call, check **Speech (realtime)** and `voice_turn_quality`. Per-stage timings are not recorded.

## Production readiness checklist

* Every agent compiles with no voice error. Review each voice warning.
* You tested one call per row in Verification, on each voice channel and mode you ship.
* Each fallback path from [How to define fallback behavior for voice failures](https://koreai.mintlify.site/agent-platform/abl/how-to/define-voice-fallbacks) produces the event you expect.
* A named person owns the **Voice Analytics** page and reviews **E2E Latency**, **ASR Quality**, and **Barge-In Rate** on a schedule.
* You tag exits with `_meta` and can filter sessions by exit.
* Support staff know where **SIP Ladder** and **Call Termination** are, and who can reveal the ladder.
* You know your retention scope. Studio states when voice evidence is unavailable for an access or retention scope.

## Common mistakes

| Mistake | Why it happens | How to avoid it |
| - | - | - |
| Treating the Studio latency colors as limits | Green, amber, and red look like targets. | They are display bands: under 800 ms is fast, under 1,500 ms is slow. Set your own targets. |
| Reading TTS Quality as voice quality | The word "quality" suggests sound. | It scores response timing. Listen to the audio. |
| Expecting per-stage timings on a realtime call | Pipeline calls show them. | Use end-to-end time and `voice_turn_quality`. |
| Judging a call from a partial read | The page loads a bounded number of events. | Click **Continue reading**. Check the coverage message first. |
| Assuming a missing event means nothing happened | Some events are optional or off. | `voice_turn_quality` can be switched off for a deployment. A missing speculation record means tracing was not captured. |
| Blaming the agent for garbled turns | The transcript looks wrong. | Check **Network Quality (MOS)** and the **ASR Cascade Detection** root cause first. |
| Searching traces for caller words in secure input | Traces mask them. | Secure keypad and speech input never reaches the trace by design. |

## Troubleshooting

| Symptom | Likely cause | What to check |
| - | - | - |
| Long silence before replies | Slow STT end, model, or tool. | **Turn latency** columns. `voice_dead_air` `waitReason` and `phase`. See [How to design low-latency voice flows](https://koreai.mintlify.site/agent-platform/abl/how-to/design-low-latency-voice-flows). |
| Silence even though a filler is set | The filler did not start or did not play. | `voice_filler_playback` for the turn. Project **Filler Settings**. `voice_interim_output_suppressed` shows a filler the channel held back. |
| Caller hears nothing from a line | TTS returned no audio, or the provider rejected it. | `voice_tts` with `deliveryStatus: failed` and `failureReason`. `voice_speech_provider_error` `errorCode`. |
| Replies start late on long answers | Streaming did not open. | `voice_tts_stream_unavailable`. `voice_connection_streaming_resolved`. |
| Agent says "I didn't catch that" too often | Confidence gate or noisy line. | `voice_stt_below_confidence`. `sttMinConfidence`. **Network Quality (MOS)**. `voice_asr_cascade`. |
| Agent cuts the caller off | Turn detection or end-of-speech too fast. | `voice_config_resolved` and **Voice configuration**. See [How to handle barge-in, pauses, and unclear audio](https://koreai.mintlify.site/agent-platform/abl/how-to/handle-voice-turn-taking). |
| Agent talks over the caller, or ignores interruptions | Barge-in off for that output, or the wrong listening mode. | `voice_listening_mode_resolved`. `voice_barge_in`. |
| A back-channel or hold phrase has no effect | The setting needs `background` mode, or the gateway lacks support. | `voice_config_resolved` with `background_only_inactive`. Compile warning `CONVERSATION_BACKGROUND_ONLY_WITH_TURN_TAKING`. |
| Silent caller is never reprompted | No-input handling off, or dropped for an invalid value. | `voice_no_input_config_dropped`. The agent, step, and project settings. |
| Silent caller does not reach a person | A hook or route target on a channel that cannot run it. | `voice_no_input_route_unsupported`, `_failed`, or `_dropped`. |
| A transfer fails | Missing target, bad method, or far-end failure. | `voice_call_transfer_destination`, `voice_call_transfer_outcome`, `voice_call_transfer_failed`. **SIP Ladder**. |
| A header never reaches the far end | Policy dropped it. | `voice_sip_header_dropped` (name and reason only). |
| A transfer or survey request is ignored | The transport lacks the feature. | `voice_feature_diagnostic` with `VOICE_FEATURE_UNSUPPORTED` or `VOICE_FEATURE_PARTIAL`. |
| Call dropped and came back | Gateway reconnect. | `voice_session_reattach` and `voice_call_status`. |
| Hold limit does not trigger | Caller hold off, or the gateway lacks support. | `voice_caller_hold_unsupported`. The project **Caller hold** setting. |
| Realtime call stalls or errors | Provider error or session problem. | `voice_realtime_provider_error`, `voice_realtime_diagnostic`, and `voice_realtime_session_config`. |
| Call has no `voice_turn_quality` events | Tracking is off for the deployment. | Ask your platform admin. |
| A realtime turn shows no timings | The provider gives no caller-stopped signal before its answer. The turn is counted, not timed. | `callerStoppedBasis: unavailable` on the turn. |
| A voice setting seems ignored | It sits in the wrong place, or the channel overrides it. | Compile diagnostics. **Voice changes during the call**. |

## Related HowTos

* [How to define fallback behavior for voice failures](https://koreai.mintlify.site/agent-platform/abl/how-to/define-voice-fallbacks)
* [How to design low-latency voice flows](https://koreai.mintlify.site/agent-platform/abl/how-to/design-low-latency-voice-flows)
* [How to handle barge-in, pauses, and unclear audio](https://koreai.mintlify.site/agent-platform/abl/how-to/handle-voice-turn-taking)
* [How to phrase handoffs in a voice conversation](https://koreai.mintlify.site/agent-platform/abl/how-to/phrase-voice-handoffs)
* [How to debug routing decisions in traces](https://koreai.mintlify.site/agent-platform/abl/how-to/debug-routing-traces)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.