To detect prompt injection on a live voice agent call, watch five things: what the caller said, how the conversation moved, what the agent said back, which tools the agent tried to call, and what changed in your system of record. A caller can phrase an attack in any words they like. What the agent then does is recorded the same way whatever the wording, so the last three are where to put your alerts.
TL;DR: A phrase filter on the transcript misses paraphrase and other languages. Score the caller's turns, but alert on outcomes: a reply that discloses protected data, a tool call the task did not need, or a record that changed without verification. Send each alert with the call, the turn, and the action attached.
Basis for this guide: public guidance from OWASP and Microsoft, linked where used, and Hamming's public product page. It reports no Hamming measurements and no detection rates.
Last Updated: October 2026
Scope: This guide covers detecting attempts on live calls and what to do with an alert. Testing before launch is in the prompt injection testing guide. If your agent calls no tools and reads no customer data, you do not need all five layers: a check on agent replies and a weekly sample of calls is enough.
Related Guides
- Voice Agent Prompt Injection Testing - the pre-launch test plan this page follows on from
- Voice Agent Incident Response Runbook - what to do when unsafe behavior reaches production
- Voice Agent Monitoring KPIs - the production metrics these alerts sit beside
- Voice Agent Caller Identity Testing Checklist - testing the verification step that protected requests depend on
What is different about detecting it on a phone call?
The detector works from a transcript, and the transcript is not the call.
In a cascaded voice agent, speech recognition turns the caller's audio into text before the model reads it. A detector that scores text reads that same output. If recognition drops or changes a word, the detector scores what was transcribed, which can differ from what was said. In a speech-to-speech agent the model takes the audio directly, so a text detector works from a transcript made for logging that the model never saw. In both designs, pauses, tone, and a second voice in the background are in the audio and absent from the text.
A caller also cannot paste a known string. The attempt can arrive as ordinary speech in the caller's own words. OWASP's prevention cheat sheet notes that pattern lists do not translate text, so a list written in one language can miss the same phrase in another.
The instruction does not have to come from the caller at all. OWASP's LLM01:2026 separates direct injection, where the user's input changes the model's behavior, from indirect injection, where the model reads external content that carries the instruction. For a voice agent that content is a CRM note, a knowledge-base article, or a tool result, and nothing in the caller's turns will show it.
Where in the call does an injection attempt show up?
In five places. The first two describe intent and the last three describe outcome.
| Where | What to look for | Source of the signal | What it misses |
|---|---|---|---|
| Caller turns | Language aimed at the agent and not the task: a new role, a request to ignore rules, a request for the system prompt or tool list | Caller side of the transcript | Paraphrase, other languages, indirect injection |
| Conversation shape | The same request rephrased after a refusal, a claimed supervisor or employee, urgency that rises turn by turn | Turn sequence; count of refusals | An attempt that works on the first try |
| Agent replies | Protected data read out, internal configuration described, a commitment outside policy | Agent side of the transcript | Disclosure in ordinary words; harm done through a tool with a harmless reply |
| Tool calls | A call the task did not need, arguments lifted from the caller's words, an unusual sequence | Tool call log with arguments and results | Attempts that stay inside allowed actions |
| System of record | A record changed, or data returned, that the call's verification state does not justify | Audit log of the downstream system, joined to the call ID | Changes you cannot tie to a call |
Intent signals come early and match a lot of innocent speech. Outcome signals do not depend on wording, but each has the blind spot in its last column, and the system-of-record check only works if every write carries the call ID.
Which detection techniques work, and what does each miss?
No single technique is enough. Microsoft's guidance on defending against indirect prompt injection recommends layering probabilistic and deterministic defenses and designing for the case where some attacks succeed. That page addresses indirect injection. This guide applies the same layering to a caller's direct attempts.
| Technique | Catches | Misses | When it runs |
|---|---|---|---|
| Phrase and pattern matching on the transcript | Known wording | Paraphrase, other languages, mis-transcribed words | During the call |
| A classifier or guardrail model on caller turns | Intent to override the agent, in varied wording | Slow multi-turn pressure, indirect injection, languages the model handles poorly | During the call |
| Deterministic checks on tool calls | Calls outside an allow-list, arguments that fail validation, actions without a completed verification step | Attempts that stay inside allowed actions | Before the tool runs |
| Plan and sequence checks | The agent leaving the expected flow for the task | Flows that were loosely defined to begin with | During the call |
| Output checks on agent replies | Account numbers, credentials, or system prompt text in a reply | Disclosure in ordinary words | During or after the call |
| Reconciliation against the system of record | A write or read the call's verification state does not justify | Anything not logged with a call ID | After the call |
| An evaluator that scores the finished call against policy | Whole-call patterns: verification skipped, a policy stated then broken | Nothing in real time | After the call |
Put the deterministic checks where the damage is. OWASP's LLM01:2026 recommends least-privilege access and handling functions in code, and the cheat sheet points out that tool permissions and parameter validation hold whatever language the injected text is in.
Review every call a deterministic check stopped. It is either an attempt or an agent error, and both need a fix.
What should happen on the call when a check fires?
Decide this before launch, per check, because the agent has to do something in the next second.
| Check that fired | Reasonable in-call response |
|---|---|
| Pattern or classifier on a caller turn | Continue, with the turn flagged. Acting on intent alone will interrupt innocent callers |
| Tool call blocked by a deterministic check | Refuse that action, keep the call going, and remove the tool for the rest of the call if the agent retries |
| Output check on a reply | Withhold the reply and hand the call to a person |
| Repeated refusals with rising pressure | Transfer to a person or end the call politely |
A check that runs inline on every caller turn adds time before the agent can answer. Measure that delay on your own stack before you make any check blocking.
What should an alert contain?
Enough for a responder to decide in one read whether anything changed. An alert that says only "possible prompt injection" with a call ID sends someone to listen to a recording.
Alert: prompt injection signalCall ID and time:Agent and version:Caller verified? yes / no / partialTrigger: which check firedCaller turn (quoted):Agent's next action: reply text or tool callTools attempted: name, arguments, resultSystem of record changed? yes / no / unknownLink to transcript and audio:
Grade severity by outcome.
| What happened | Severity | Response |
|---|---|---|
| Attempt flagged, agent refused, no tool call | Low | Log it and count it |
| Attempt flagged, agent said something outside policy | Medium | Review the same day |
| Agent attempted a tool call that a check stopped | High | Page the on-call owner |
| Protected data disclosed or a record changed | Critical | Open an incident |
The "caller verified" field turns a transcript into a judgment. A request for a balance is routine from a verified caller and a finding from an unverified one. If you are not sure the verification step holds, test it first with the caller identity testing checklist.
How do you keep false positives from burying the real ones?
Page on outcomes and sample the intent signals. Microsoft lists false positives as a known cost of probabilistic defenses, and ordinary speech contains phrases a pattern list will match: a caller correcting themselves can say "ignore that".
- Page only on the high and critical rows. Those depend on what the agent did.
- Sample the low row. Read a fixed number of flagged calls each week and record how many were real attempts.
- Track both kinds of error. Count flagged calls that were harmless, and confirmed attempts that no check flagged. The second count only comes from reviewing calls nobody flagged, so add a small random sample to the weekly review.
- Change one detector at a time. Otherwise you cannot tell which change moved the count.
A team that already reviews production calls can fold this into the same session. The production call review triage guide covers how to run one.
What do you do after an alert?
Confirm it, preserve the call, contain the damage, then turn the call into a test. For anything medium or above in the severity table, work through the six steps in order.
- Confirm. Read the flagged turn and the agent's next action. Decide whether it was an attempt, an agent error, or a false alarm, and record which.
- Preserve the call. Keep the audio, transcript, tool log, and the agent version that handled it.
- Check what changed. Compare what the agent said it did with what the system of record shows. They can differ.
- Contain. Reverse the action, notify the account owner if data was disclosed, and follow the incident response runbook for anything in the critical row.
- Make it a test. Turn the call into a regression scenario so the same approach is tried against every future version. The failed production call regression runbook shows how.
- Fix, then rerun. A fix is verified when the replayed scenario no longer crosses the boundary, in a sandbox where the tool call has no real effect.
Each confirmed attempt becomes one more scenario for pre-launch testing, which the next release has to pass.
What can detection not do?
It cannot make the agent safe by itself. OWASP's 2026 edition states the design constraint plainly: the model makes no architectural distinction between instructions and data, so there is no clean equivalent to parameterized queries. A detector is one more probabilistic layer, so plan for misses.
- Some of it is late. Reconciliation and whole-call scoring report after the refund went out.
- An alert is a report. Unless a check sits in front of the tool, the action already happened.
- A quiet dashboard proves little. It shows that your detectors did not fire. It does not show that nobody tried.
- It does not carry over. A prompt, model, or tool change can alter what the agent does with the same caller words. Rerun your scenarios after each change.
What limits damage is what the agent is allowed to do: narrow tool permissions, validation in code, and a human approval for actions that are expensive to undo.
Where does Hamming fit?
Hamming's production monitoring product, BlueTrace, scores production calls with the same evaluators used in testing. It sends alerts on guardrail failures, with thresholds you set, to Slack, email, PagerDuty, or a webhook, and each alert links to the affected calls. It reports what happened on a call. It does not stop a caller mid-call, and it does not replace checks in front of your tools.
Production detection checklist
- Tool calls are logged with arguments and results, per call.
- Every write to a downstream system carries the call ID.
- Whether the caller was verified is recorded on every call.
- Deterministic checks sit in front of every tool that reads or changes customer data.
- At least one check scores caller turns and one scores agent replies.
- The in-call response to each check is decided and tested.
- Finished calls are scored against policy.
- Alerts carry the caller turn, the agent's next action, the tools attempted, and whether a record changed.
- Severity follows outcome, and only high and critical alerts page someone.
- A weekly review samples flagged and unflagged calls and records both error counts.
- Every confirmed attempt becomes a regression scenario.
- Scenarios are rerun after each prompt, model, or tool change.
For the questions a security reviewer will ask about this setup, see voice agent security review questions. For the related failure where an agent reads internal errors to a caller, see the error leakage testing checklist.