Incoming call toast

When a customer calls the tenant's number and routing includes this seat, the browser rings: caller number, answer, decline.

Demo mode — stage a call, then answer it and watch the HUD take over.

Installation

npx shadcn@latest add @handset/incoming-call-toast

Usage

import { IncomingCallToast } from "@/components/handset/incoming-call-toast";

// Mount once in your app shell; silent until something rings.
<IncomingCallToast softphone={softphone} />

Calls reach the browser when the tenant's routing config lists the seat as a ring target (client:wc_…). With several targets configured, browser and cell phones ring together and the first to answer wins — decline here and a co-worker's phone keeps ringing.

Props

Props
PropTypeDefaultDescription
softphoneSoftphoneThe softphone instance.
position"bottom-right" | "top-right" | "static""bottom-right"Float it, or render inline with static.
formatNumber(e164: string) => stringUS formatterDisplay formatting for the caller.
classNamestringMerged onto the toast.