The problem
Telephony is unforgiving in a way most web products are not. If a page takes an extra second to load, people wait. If a call drops, the customer is gone and usually angry. There is no loading spinner for a phone call.
The platform had to hold thousands of simultaneous calls without any of them degrading, and keep doing it while we deployed, while instances died, and while traffic spiked in ways nobody predicted.
What we decided early
The biggest call was not building the telephony layer ourselves.
Carrier interconnect is a genuinely hard, genuinely boring problem: SIP trunking, number provisioning, regulatory compliance in every market. We put Twilio in front and let them own it, which meant the platform received webhooks over HTTPS instead of terminating raw SIP. That one decision removed an entire category of infrastructure and let a small team focus on call logic.
It also created a constraint most people miss. Twilio retries webhooks, so if a handler is not idempotent, a retry charges someone twice or connects a call twice. Idempotency keys went into Redis on day one, not as a hardening pass later.
How it is built
Everything behind the webhook runs on AWS across two availability zones.
An Application Load Balancer takes the webhooks and hands them to an EC2 Auto Scaling Group running the call-control service. Media streams arrive over a separate WebSocket connection to a media processing fleet handling recording and transcription. Keeping signalling and media on separate paths matters, because they fail differently and scale differently.
State sits in ElastiCache for Redis: session state, presence, those idempotency keys. Call detail records go to RDS for MySQL with Multi-AZ enabled, plus a read replica so reporting queries never touch the primary. CloudWatch covers metrics, alarms and centralised logs, with SNS fanning alerts out to whoever is on call.
The part we would tell another engineer
Failure handling is not one system here. It is split across a boundary, and being honest about that is the whole trick.
Twilio handles webhook retries and fallback URLs on their side. On ours, the Auto Scaling Group replaces unhealthy instances and RDS does Multi-AZ failover. Neither side knows what the other is doing, so the contract between them has to be explicit: handlers must be safe to call twice, and must respond fast enough that Twilio does not give up and retry anyway.
Most of the reliability work lived in that seam, not in either system.
Where it landed
Sustained 10,000+ concurrent calls against a 99.9% uptime target, with redundancy at every tier and no single point of failure in the request path.
The result we are more pleased about: deploys stopped being events. The team could ship in the middle of the day.
