I Built a Circuit Breaker for Phone Lines So Customers Never Hear Dead Air
说明与用途
构建了一个电信级的电路断路器,在主运营商故障时自动切换到备份线路,保持呼叫体验与客户信任。
问题
Phone lines fail, causing customers to hear dead air and lose calls, especially critical for banks, hospitals, and emergency services.
结果
The circuit breaker ensures continuous voice service during carrier outages, maintaining customer trust with a brief outage announcement and preventing call loss.
工作流
- 1. Detect suspicious transaction and initiate fraud alert call via primary carrier.
- 2. Monitor carrier webhooks for call outcomes (busy, no-answer, timeout).
- 3. Increment failure counter on each failure webhook.
- 4. Trip circuit breaker after threshold (default 3) and route new calls through backup carrier.
- 5. After cooldown, enter half-open state and probe primary carrier with a live call.
- 6. If probe succeeds, close breaker and route future calls to primary; otherwise keep open and continue using backup.
证据
The system has two independent Telnyx Call Control connections. A router sits in front and watches for failure signals.
When failures accumulate — busy, no-answer, timeout — the breaker trips at a threshold and all new calls route through the backup connection.
The backup announcement doesn't hide the outage — it says "we're running on our backup systems right now."
- 记录日期: 2026-09-17T00:15:45.740Z