Callback Number Check

Says what a number really is before you call it back, so a Caribbean, premium-rate or one-ring scam number isn't mistaken for a local one.

StopsCalled back a premium-rate scam number

Installation

pnpm dlx shadcn@latest add https://bollard-ui.vercel.app/r/callback-number-check.json

The files land in your project. They're yours to edit.

Usage

callback-number-check-usage.tsx
import { CallbackNumberCheck } from "@/components/ui/callback-number-check"

<CallbackNumberCheck
  key={call.id}
  number={call.number}
  caption={call.caption}
  rings={call.rings}
  officialName={call.officialName}
  officialNumbers={call.officialNumbers}
  homeCountry={home}
  onCall={(e164) => setLog(`Dialling ${e164}…`)}
  onDismiss={() => setLog("Not calling. Good call.")}
/>

What it catches

  • +1 numbers in Caribbean countries that look like US area codes (e.g. 876 Jamaica)
  • One-ring missed calls from abroad (wangiri pattern)
  • Premium-rate and shared-cost lines
  • Toll-free numbers that are only free in their own country, and unassigned ranges
  • A number claiming to be an organisation that isn't in the officialNumbers you pass

Props

CallbackNumberCheck props
PropTypeDefault
number* (required)

The number as you received it: "+1 876 555 0142", "0909 879 0000", "1800-266-0123".

string—
homeCountry

Country the caller's phone is in. Defaults to the browser language's region, then "US".

CountryCode—
defaultCountry

Country to read a number without + in. Defaults to `homeCountry`.

CountryCode—
rings

Rings before a missed call hung up; 1 flags the one-ring pattern.

number—
officialName

Who the number claims to be ("HDFC Bank"); used with `officialNumbers`.

string—
officialNumbers

That organisation's published numbers. A number not on the list must be confirmed.

string[]—
caption

Where it came from: "Missed call · 2:13 AM".

React.ReactNode—
onCall

Called with the E.164 number when the call actually starts. The link still dials `tel:`.

(e164: string) => void—
onDismiss

Called when the user picks "Don't call" on a risky number.

() => void—
locale

Language for country names.

string—
messages

Override any visible text.

Partial<Omit<CallbackNumberCheckMessages, "findings" | "types">> & { findings?: Partial<CallbackNumberCheckMessages["findings"]> types?: …—

* required. Also accepts the native props of <div> (className, aria-*, data-*…), passed through to it.

Accessibility

  • Findings are a labelled list with icon plus text
  • The Call button is described by the status once armed for a second press
  • Status is announced in a role="status" region (visually hidden until armed)
  • Motion respects prefers-reduced-motion

Only what the source does. Test with your own screen reader and content before shipping.

Limitations

  • Line types come from libphonenumber metadata, which can lag behind real number allocations
  • It cannot tell who owns a number or detect a spoofed caller ID
  • Risky calls still go through after a second press

What it stops

Called back a premium-rate scam number

Also known as

phone number · callback · libphonenumber · +91 · missed call · scam call · toll free · call button

Field type

Dependencies

Pairs well with