VoiceTel

Documentation / VoiceML / Trusted calling

Trusted calling with SHAKEN/STIR.

SHAKEN/STIR is the carrier-framework answer to caller ID spoofing: originating providers cryptographically sign calls, terminating providers verify the signature, and the verdict travels with the call. VoiceTel verifies inbound calls at the network edge and delivers the result to your application under the same names Twilio uses — the StirVerstat webhook parameter, the X-Twilio-VerStat SIP header, and the stir_verstat REST field — so a Twilio application needs no changes to read it.

Migrate from Twilio VoiceML overview

What SHAKEN/STIR verifies

Robocall fraud usually pairs an auto-dialer with a spoofed caller ID. The SHAKEN/STIR framework — SHAKEN is the ATIS implementation profile, STIR the IETF protocol suite — fights that by having the originating provider attach a signed PASSporT token to the call. The token asserts who the caller is and whether they are entitled to the phone number presented as caller ID. Each provider along the call's path can check the signature against the originating provider's published certificate, so a spoofed identity fails verification instead of passing silently.

On an inbound call, a verified token with the highest attestation means two things at once: the provider that originated the call knows the caller's identity, and that caller has the right to use the number shown as caller ID. Applications use that verdict to display a trust indicator, skip a voice CAPTCHA, or route verified callers past screening menus.

Attestation levels

The letter attached to every VerStat value is the attestation level the originating provider granted:

SHAKEN/STIR attestation levels
Level Meaning
AThe originating provider knows the caller and has verified their right to use the phone number as caller ID.
BThe originating provider knows the customer, but could not verify their right to the caller ID in use.
CNeither requirement could be met — the lowest level, typical for calls entering the framework without a verifiable subscriber relationship.

Where the result appears

  • Voice webhooks — the StirVerstat parameter in the form-encoded request body to your voice URL.
  • SIP calls to your equipment — the X-Twilio-VerStat header on INVITEs sent to the SIP endpoints you control.
  • REST API — the stir_verstat field on Call resources.
  • Phone apps — VoiceTel Phone and VoiceML Phone show the caller's VerStat result on incoming calls, no integration required.

StirVerstat in voice webhooks

When a call arrives at one of your numbers, VoiceTel requests your voice URL. The request body carries the verification result alongside the usual call parameters:

From=+12125550123
To=+15550101234
CallStatus=ringing
CallSid=CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
StirVerstat=TN-Validation-Passed-A

Presence follows one rule: the parameter reflects what the call carried. On the initial voice URL request and its fallback, StirVerstat is always present — an empty value means the call arrived with no SHAKEN identity headers. On later action and callback requests it is present only when the call carried one. Requests where either party is a SIP address never include the STIR parameters.

X-Twilio-VerStat on SIP calls to your equipment

When VoiceML bridges an inbound call to a SIP endpoint — a <Dial><Sip> target such as your PBX or SBC — the INVITE carries the verification result in the X-Twilio-VerStat header:

INVITE sip:100@pbx.example.com SIP/2.0
X-Twilio-VerStat: TN-Validation-Passed-A

Your equipment can read the header to make the same trust decisions your webhooks can. The header is written after any custom headers your document sets with <Header>, so it always reports the verified result rather than a value of your own choosing.

stir_verstat in the REST API

Call resources expose the verification result as stir_verstat:

curl -u "$SID:$KEY" \
	"https://voiceml.voicetel.com/2010-04-01/Accounts/$SID/Calls/$CALL_SID.json"

{
	"sid": "CAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
	"direction": "inbound",
	"status": "completed",
	"stir_verstat": "TN-Validation-Passed-A",
	...
}

The field is populated when you fetch or list calls — empty for calls that carried no SHAKEN identity. Create and update responses return null for the field.

VerStat values

Values come in two families. The unsuffixed base results — Passed, Failed, No-TN-Validation — report the outcome of the RFC 8224 signature verification itself, and are the most common values in practice: any call whose PASSporT verifies under the base STIR framework produces them. The letter-suffixed forms add the SHAKEN attestation level when the PASSporT carries one. The vocabulary matches Twilio's trusted-calling implementation:

StirVerstat parameter and X-Twilio-VerStat header values
Value Meaning
TN-Validation-PassedPASSporT present and verified — signature valid against the signing provider's certificate. No attestation level supplied; the base RFC 8224 result and the most common value in practice.
TN-Validation-Passed-APASSporT verified. Attestation A — the caller is known and entitled to the caller ID.
TN-Validation-Passed-BPASSporT verified. Attestation B — the caller is known, the caller ID entitlement is not.
TN-Validation-Passed-CPASSporT verified. Attestation C.
TN-Validation-FailedVerification could not be completed and no attestation level was determined.
TN-Validation-Failed-APASSporT present but failed verification — possible tampering in transit, or the signing certificate could not be retrieved. Attestation A.
TN-Validation-Failed-BVerification failed as above. Attestation B.
TN-Validation-Failed-CVerification failed as above. Attestation C.
No-TN-ValidationNo verifiable PASSporT: malformed phone number, invalid token structure, missing required fields, origin or destination mismatch, or a timestamp too old to honor.
(empty)The call carried no SHAKEN identity information.

Two suffixes extend the base values on forwarded calls. -Diverted marks the verdict for the PASSporT of the provider that diverted the call (for example TN-Validation-Passed-B-Diverted), and -Passthrough marks a call whose original PASSporT was forwarded unchanged (for example TN-Validation-Failed-C-Passthrough). Suffixed forms otherwise follow the same passed/failed pattern as the table above.

Putting the verdict to work

  • Display a trust indicator. Any TN-Validation-Passed value — unsuffixed, or with attestation A or B — means the signature verified and the caller's provider vouches for the identity; surface that in your call UI or CRM screen-pop.
  • Skip friction for verified callers. Route Passed callers past voice CAPTCHAs, replay prompts, or screening menus, and keep them for everyone else.
  • Treat failed and missing verification as a signal, not a verdict. Failed-* values warrant scrutiny; No-TN-Validation and empty results are common for legitimate calls that originated outside the framework.

Trusted by