# Feature Matrix

> Telephony capabilities that FirstByte supports, mapped to the primitive that implements each one.

This page is a capability index. Each row is a feature. The right-hand
column points at the RPC, admin DTO, or codec path that implements the
feature. Use this page as a lookup when you must know whether the
platform supports a feature and where to wire it.

## Origination & termination

| Feature | Yes / How |
| ------- | --------- |
| **Outbound PSTN dialing** | Yes. `Originate` RPC. E.164 destinations or full SIP URIs. |
| **Inbound PSTN handling** | Yes. Set the rule per trunk via `SetInboundRouting` (REJECT / PLAY-AND-HANGUP / NOTIFY-AND-HANGUP / HANDLE-AI). |
| **Bulk / predictive dialing** | Yes. `OriginateBulk` reads a CSV, paces calls at the CPS you set, and caps concurrent channels. `AbortBulk` cancels a campaign mid-flight. |
| **Click-to-call** | Yes. `Originate` with `default_app=ANSWER` and the agent's softphone as the call_from. |
| **Multi-trunk LCR** | Yes. Add one trunk per carrier via [`AddTrunk`](/admin/trunks). The gateway picks the cheapest healthy trunk per destination prefix. |
| **Failover / circuit breaker** | Yes. The per-trunk circuit breaker trips on consecutive 5xx responses. The state shows in `ApiTrunkConfig.is_cb_tripped`. |
| **Number portability lookups** | On request. Availability depends on the carrier integration. |

## Call control

| Feature | Yes / How |
| ------- | --------- |
| **Hangup (any leg)** | `Terminate` RPC. |
| **Park** | `ExecuteDialplan(action=PARK)`. |
| **Music on hold** | `ExecuteDialplan(action=MUSIC_ON_HOLD, app_args=<url>)`. |
| **Playback prompt** | `ExecuteDialplan(action=PLAYBACK, app_args=<url>)`. |
| **Unpark** | `ExecuteDialplan(action=UNPARK_AND_BRIDGE)` reattaches a parked call to its bridge partner. |
| **Hold / resume** | `CHANNEL_HOLD` / `CHANNEL_RESUME` events. From the SDK, use `ExecuteDialplan(MUSIC_ON_HOLD)` then `ExecuteDialplan(UNPARK_AND_BRIDGE)`. |
| **Call screening** | The inbound rule `NOTIFY_AND_HANGUP` fires a webhook before the gateway answers. Your app then decides. |
| **Barge (AI barge-in)** | `Barge` RPC. **The platform's headline AI-network unblocker.** While the AI talks, the gateway watches the inbound leg for the human's voice (energy / VAD / semantic, set per trunk via `auto_bargein_mode`). When the human starts to talk, the gateway gates the AI's outbound audio within `barge_in_patience_ms` (default 250 ms). The human is then heard immediately. Without barge-in, AI voicebots feel deaf. Trunk knobs: `auto_bargein_mode`, `auto_bargein_aggressiveness`. Per-call knobs on `OriginateRequest`: `auto_barge_in`, `barge_in_patience_ms`. |
| **Stuck-call cleanup (bucket actions)** | `GetActiveBuckets` / `GetBucketCalls` / `ExecuteBucketAction` list the calls that are stuck in a bucket (parked, abandoned, orphaned) and act on them in bulk. The typical action is `0=hangup` to clear stuck calls during ops incidents. These RPCs are **not** a transfer or conferencing primitive. |
| **Transfer (blind / attended)** | *Not supported.* This feature is out of scope on this platform. |
| **Conference (3+ parties)** | *Not supported.* This feature is out of scope on this platform. |
| **Whisper / coach** | *Not supported.* This feature is out of scope on this platform. |

## Audio handling

| Feature | Yes / How |
| ------- | --------- |
| **Codec support** | PCMU, PCMA (G.711); PCM16; Opus; G.722. Per-trunk preference list. |
| **Transcoding** | Automatic on egress (for example, linear16 from the AI → PCMU to the PSTN). A SIMD path inside the C++ core does the work. |
| **AEC / AGC / NS** | A WebRTC-grade pipeline runs on every WebRTC leg. You can set it per call. |
| **VAD-based barge-in** | Yes. `OriginateRequest.auto_barge_in` + `barge_in_patience_ms`. |
| **DTMF (RFC 2833)** | Yes. Default. |
| **DTMF (SIP INFO)** | Yes. The gateway falls back to it when the endpoints do not negotiate RFC 2833. |
| **DTMF (in-band)** | The gateway detects it. It is not the preferred mode. |
| **DTMF masking** | For PCI-DSS. The gateway redacts DTMF tones from the recording stream and still passes them to the dialplan. |
| **Pre-answer / early media** | Pass-through. |
| **Comfort noise** | The gateway generates it when the far end sends silence. |
| **Echo reference** | A per-leg AEC reference. The target is ERL > 20 dB. |

## AI / agent integration

| Feature | Yes / How |
| ------- | --------- |
| **AI websocket bridge** | `OriginateRequest.ai_websocket_url`. Audio is bidirectional. Framing follows the AI vendor (OpenAI Realtime, Deepgram, ElevenLabs, etc). |
| **AI QUIC bridge** | `OriginateRequest.ai_quic_url`. A lower-latency option for first-party AI services. |
| **Inbound AI handoff** | `SetInboundRouting(rule=HANDLE_AI)` + `inbound_ai_websocket_url`. |
| **Agent DAGs** | Yes. Multi-step orchestration (TTS → STT → LLM → tool call → branch). Publish DAGs via the [admin API](/admin/agent-dags). DAGs are versioned. |
| **Live transcription** | Pipe `on_audio_frame` to your STT. FirstByte does not bundle an STT. You pick one. |
| **Streaming TTS** | Pipe TTS PCM into `push_audio`. FirstByte resamples to the trunk codec. |
| **Tool / function calling** | Your AI drives it. The gateway only moves audio and DTMF. |
| **Human-in-the-loop transfer** | Yes, mid-call. Pause the AI. Originate a human leg. Bridge the legs. |

## Reliability & scale

| Feature | Yes / How |
| ------- | --------- |
| **Active-active multi-region** | The platform supports multi-region deployment. Calls stay pinned to the ingress region. CDRs replicate globally. |
| **Per-tenant CPS quotas** | Enforced. Excess calls return `ERR_RATE_LIMITED`. |
| **Per-trunk channel caps** | `AddTrunk.channel_limit`. New attempts past the cap fail closed. |
| **Circuit-breaker** | Per-trunk. It trips on consecutive carrier 5xx responses. |
| **Hot certificate reload** | `ReloadCertificates` admin RPC. No connections drop. |
| **Zero-downtime upgrades** | A single-binary rolling deploy. QUIC connection migration keeps in-flight calls. |
| **Rate-limited admin** | The gateway throttles admin RPCs separately from call control. |

## Compliance & regulation

| Feature | Yes / How |
| ------- | --------- |
| **STIR/SHAKEN signing** | The gateway signs outbound INVITEs with the configured PASSporT cert. You can select attestation A/B/C per trunk. |
| **STIR/SHAKEN validation** | The gateway checks inbound `Identity` headers. The result shows in `CallEvent.status`. |
| **P-Asserted-Identity** | Set per trunk. |
| **PIDF-LO / E911 location** | A trunk-default civic address. Override per call via `ExecuteDialplan(ANSWER, app_args=<json>)`. |
| **DNC suppression** | Upload a list per campaign. The gateway checks it before each `Originate`. |
| **Recording consent prompts** | A playback prompt on connect (jurisdiction-dependent). |
| **Recording encryption** | The gateway writes recordings to your storage encrypted at rest (AES-256). |
| **Retention controls** | A per-tenant retention window applies to CDRs and recordings. |
| **HIPAA** | A BAA is available. Recording storage encryption is mandatory. |
| **PCI-DSS** | DTMF masking + per-stream redaction tags. |
| **GDPR / CCPA** | For right-to-be-forgotten requests, purge tenant CDRs and recordings older than the retention window. |
| **CALEA** | The carrier upstream of FirstByte honours CALEA. It is not a FirstByte-side feature. |

## Observability

| Feature | Yes / How |
| ------- | --------- |
| **CDRs** | The gateway pushes CDRs to ClickHouse. The full schema is in [Telemetry](/platform/telemetry). |
| **Live event stream** | `StreamEvents` RPC. One `CallEvent` per state transition. |
| **Prometheus metrics** | `/metrics` on every gateway shard. |
| **OpenTelemetry traces** | OTLP HTTP/gRPC exporter. `tenant.id` and `call.sid` are on every span. |
| **SIP packet capture** | HEPv3 to Homer / heplify. |
| **Recording** | Per-call. The gateway stores recordings at the trunk-configured URL or in your S3. |
| **Audit log** | The gateway logs all admin RPCs with the issuing service-account `kid`. |

## WebRTC

This table lists the browser-side and vendor-bridge surface area:

| Feature | Yes / How |
| ------- | --------- |
| **DTLS-SRTP media** | Mandatory. The full key exchange uses the standard `a=fingerprint` SDP attribute. |
| **ICE / STUN / TURN** | The gateway side is ICE-lite. The platform publishes `host` and `srflx` candidates. Clients relay through their own TURN server when needed. |
| **Codec negotiation** | The gateway offers Opus + PCMU by default. PCMA and G.722 are negotiable. The gateway transcodes to the trunk codec on bridge. |
| **Audio processing pipeline** | AEC + AGC + NS run on every WebRTC leg, per direction. |
| **Browser SDK** | TypeScript/WASM. The SDK exposes audio as a standard `MediaStreamTrack`. |
| **LiveKit adapter** | It joins as a participant, subscribes to one track, and bridges to the matching `call_sid`. It authenticates with a JWT. |
| **Daily adapter** | It uses JSON text-frame signaling and joins as a hidden participant. |
| **Chime adapter** | It uses AWS SigV4 + a Chime `JoinToken`. You must create the meeting out-of-band. |
| **Twilio Media Streams** | PCMU 8 kHz pass-through. The gateway validates the `X-Twilio-Signature` HMAC. |
| **Vapi adapter** | Linear16 16 kHz on ingress. The gateway resamples to PCMU on egress. |
| **getStats() exposure** | Every WebRTC leg's `RTCStats` (jitter, loss, ICE candidate type, REMB, NACK rate) shows in the per-leg event stream. |
| **simulcast / SVC** | N/A. The platform is audio-only. |
| **Datachannels** | Not exposed. The SDK uses WebTransport for control instead. |

See [WebRTC Vendor Adapters](/platform/webrtc-vendors) for tenant-scoped
URL paths and per-vendor auth details.

## Other transports

| Feature | Yes / How |
| ------- | --------- |
| **WebTransport** | The browser control plane (RPC envelopes). It uses the same QUIC port as native SDKs. |
| **QUIC (native SDKs)** | Direct binary RPC for Python / Go / Rust / Java / .NET. |
| **Generic SIP** | Yes. Carrier-agnostic. |
| **HTTP/3 fallback** | Optional. It is a verification endpoint only, not a media transport. |

## Out of scope

The platform deliberately does not implement these capabilities:

- **Video.** The platform is audio-only.
- **Fax / T.38.** Pass-through only via raw SIP. There is no T.38 stack.
- **On-prem PBX replacement.** FirstByte is a gateway/orchestrator. It runs alongside Asterisk / Cisco UCM, not in place of them.
- **First-party STT / TTS / LLM.** Bring your own. The platform provides the audio pipe and the agent-DAG runner.
- **First-party DID procurement.** You obtain DIDs from a carrier. You then attach them to a trunk via [`AddTrunk`](/admin/trunks).
- **CRM-side dashboards.** The platform emits CDRs and events. Consumers wire them into Salesforce / HubSpot / etc.
