KatInterview

Building an Outbound Voice Dialer That Survives Campaign Bursts

System DesignModel answer
HardModel answerSystem Designsystem-designqueueingbackpressure

Last updated

Design a multi-tenant service that places API-driven phone calls through carriers with hard channel and CPS limits, stays fair under bursts, and tracks call state reliably.

Problem

You are building a platform that lets business customers place outbound phone calls through an HTTPS API. A customer submits a request naming one destination number and a media configuration (for example, which voice agent or audio to use). The platform dials the number through a telecom carrier, waits for the person to pick up, and then connects the call to the chosen media endpoint.

Design the platform end to end. Treat this as an open-ended discussion: ask clarifying questions, present a high-level design, then go deep on the hardest part, which is scale.

Assumptions

  • Requests arrive over HTTPS. Each one has a single destination number and a media configuration.
  • Calls go out over one or more carriers through SIP trunks. Every carrier enforces both a maximum number of simultaneous calls (channels) and a maximum call-attempt rate (calls per second, CPS). Neither limit can be exceeded.
  • There are a few hundred customers (tenants). A typical call lasts 2 to 5 minutes.
  • Traffic is bursty: a campaign launch can generate thousands of requests within a few seconds.
  • Each call follows this lifecycle: queued → dialing → ringing → in_progress → completed | failed | no_answer | busy.
  • Customers learn about call status through webhooks and a status endpoint.
  • Immediate calls should start dialing within seconds, but pacing or queueing during bursts is acceptable.

Questions worth raising early

  • Are calls immediate, scheduled, or both? Are there campaigns and priorities?
  • How many carriers are there, and what are their limits? Is failover or least-cost routing needed?
  • What happens after the callee answers: static audio, a human agent, or a real-time AI agent with bidirectional audio?
  • What per-tenant limits and quotas apply?
  • What delivery guarantees do webhooks need (retries, duplicates, ordering)?
  • Are there compliance rules such as consent, do-not-call lists, or calling-hour windows?

What to cover

  1. Call lifecycle and core design. Walk through the path from API request to a ringing phone and a bridged call. Define the main services, the call data model, and the API.
  2. Handling bursts. Many tenants submit far more calls than the carriers can place at once. Explain how you protect the system, respect carrier limits, and keep tenants treated fairly. Consider whether urgent traffic such as one-time-passcode calls must jump ahead of bulk campaigns.
  3. Reliability and observability. Cover no-answer, busy, carrier errors, dropped media, and workers that crash mid-call. Explain how you keep call state authoritative, retry safely, and monitor the system.

Hints

Hint 1

Estimate throughput with Little's law (concurrency = arrival rate x hold time). Work out how many new calls per second a carrier's channel limit really allows, and compare it to the CPS limit. Which one binds in steady state?

Hint 2

If the sustainable dial rate is far below the burst arrival rate, queueing is the core of the design. Think about ingress rate limiting, a durable queue, per-tenant fair scheduling, a separate class for urgent calls with reserved capacity, and an admission step that checks both CPS and channel budgets.

Hint 3

For reliability, treat call state as a state machine with conditional (versioned) updates, write intent before dialing, use idempotency keys, hold leases on active calls, and run a reconciler that frees leaked channel slots after crashes.