How to Detect Prompt Injection Attempts on Live Voice Agent Calls

Sumanyu Sharma
Sumanyu Sharma
Founder & CEOAn industry expert reviewed this article for accuracy and quality., Voice AI QA Pioneer

Hamming protects 10K+ voice agents in production.

· Updated · 12 min read

How to Detect Prompt Injection Attempts on Live Voice Agent Calls

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.

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.

WhereWhat to look forSource of the signalWhat it misses
Caller turnsLanguage aimed at the agent and not the task: a new role, a request to ignore rules, a request for the system prompt or tool listCaller side of the transcriptParaphrase, other languages, indirect injection
Conversation shapeThe same request rephrased after a refusal, a claimed supervisor or employee, urgency that rises turn by turnTurn sequence; count of refusalsAn attempt that works on the first try
Agent repliesProtected data read out, internal configuration described, a commitment outside policyAgent side of the transcriptDisclosure in ordinary words; harm done through a tool with a harmless reply
Tool callsA call the task did not need, arguments lifted from the caller's words, an unusual sequenceTool call log with arguments and resultsAttempts that stay inside allowed actions
System of recordA record changed, or data returned, that the call's verification state does not justifyAudit log of the downstream system, joined to the call IDChanges 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.

TechniqueCatchesMissesWhen it runs
Phrase and pattern matching on the transcriptKnown wordingParaphrase, other languages, mis-transcribed wordsDuring the call
A classifier or guardrail model on caller turnsIntent to override the agent, in varied wordingSlow multi-turn pressure, indirect injection, languages the model handles poorlyDuring the call
Deterministic checks on tool callsCalls outside an allow-list, arguments that fail validation, actions without a completed verification stepAttempts that stay inside allowed actionsBefore the tool runs
Plan and sequence checksThe agent leaving the expected flow for the taskFlows that were loosely defined to begin withDuring the call
Output checks on agent repliesAccount numbers, credentials, or system prompt text in a replyDisclosure in ordinary wordsDuring or after the call
Reconciliation against the system of recordA write or read the call's verification state does not justifyAnything not logged with a call IDAfter the call
An evaluator that scores the finished call against policyWhole-call patterns: verification skipped, a policy stated then brokenNothing in real timeAfter 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 firedReasonable in-call response
Pattern or classifier on a caller turnContinue, with the turn flagged. Acting on intent alone will interrupt innocent callers
Tool call blocked by a deterministic checkRefuse that action, keep the call going, and remove the tool for the rest of the call if the agent retries
Output check on a replyWithhold the reply and hand the call to a person
Repeated refusals with rising pressureTransfer 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 happenedSeverityResponse
Attempt flagged, agent refused, no tool callLowLog it and count it
Attempt flagged, agent said something outside policyMediumReview the same day
Agent attempted a tool call that a check stoppedHighPage the on-call owner
Protected data disclosed or a record changedCriticalOpen 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".

  1. Page only on the high and critical rows. Those depend on what the agent did.
  2. Sample the low row. Read a fixed number of flagged calls each week and record how many were real attempts.
  3. 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.
  4. 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.

  1. 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.
  2. Preserve the call. Keep the audio, transcript, tool log, and the agent version that handled it.
  3. Check what changed. Compare what the agent said it did with what the system of record shows. They can differ.
  4. Contain. Reverse the action, notify the account owner if data was disclosed, and follow the incident response runbook for anything in the critical row.
  5. 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.
  6. 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.

Frequently asked questions

Watch five places: the caller's turns, the shape of the conversation, the agent's replies, the tool calls the agent attempted, and changes in the system of record. Score caller turns for intent, but alert on outcomes such as protected data read out or a tool call the task did not need. Outcome signals do not depend on how the caller worded the attempt, and the signal table in this guide lists what each one misses.

A keyword filter is not enough, because a caller can paraphrase, restart, or switch languages, and the detector reads a transcript, not the original speech. 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. Use pattern matching as one layer beside checks on tool calls and agent replies.

Only partly: checks on caller turns, agent replies, and tool calls can run during the call, and a deterministic check can stop a tool call before it runs. Reconciling against the system of record and scoring the whole call against policy happen after it ends, so those layers report an attempt but cannot prevent it. The technique table in this guide marks when each layer runs.

Page on what the agent did. In this guide's severity table, a tool call that a check had to stop, protected data disclosed, or a record changed without verification reaches the on-call owner. An attempt the agent refused with no tool call is worth logging and counting, and does not need a page.

Decide it per check before launch, as the in-call response table in this guide does. A flag on a caller turn alone should let the call continue, because acting on intent will interrupt innocent callers. A blocked tool call should be refused while the call goes on, and a reply that fails an output check should be withheld and the call handed to a person.

Page only on outcome-based alerts and sample the intent-based ones in a weekly review. Record the two error counts this guide tracks: flagged calls that were harmless, and confirmed attempts no check flagged. The second number requires reviewing a small random sample of calls nobody flagged.

Not by itself. Detection reports an attempt, and unless a check sits in front of the tool, the alert describes an action that already happened. OWASP says it is unclear whether fool-proof prevention of prompt injection exists, so narrow tool permissions, validation in code, and human approval for costly actions are what limit the damage.

Testing runs planned attack scenarios against the agent before launch to see which boundaries hold. Production detection watches real calls after launch for attempts and for the agent crossing a boundary. The two connect in the last step of this guide's response procedure: each confirmed attempt in production becomes a regression scenario for the next release.