Inspiration
During severe Eskom load-shedding in South Africa (frequently escalating to Stage 6 or Stage 8), businesses and households experience sudden, crippling blackouts. When backup diesel generators run dry, inverters trip, or critical solar batteries fail, finding available technicians is chaotic.
Panicked consumers typically call five different contractors at once, which causes three major problems:
- Wasted Callee Time: Tying up emergency contractor phone lines when only one is needed.
- Double-Booking & Conflicting Work Orders: Multiple contractors showing up at the same address.
- Price Anchoring & Overpaying: Panicked callers volunteer their top budget upfront rather than receiving natural market rates.
We built GridGate to transform chaotic outage dispatch into a deterministic, autonomous voice AI pipeline powered by CALL-E.
What it does
GridGate is an intelligent emergency dispatch orchestrator designed with a Two-Gate Safety Architecture:
Gate 1: Dry-Run Plan & PII Masking
The user inputs the emergency need (e.g. 20L diesel refill & inverter switchover), Eskom stage, deadline, budget ceiling, and ranked providers. GridGate generates a dry-run plan with masked phone numbers—zero calls are placed without permission.Gate 2: Explicit Human Consent & Sequential Outbound Dialing
Once the operator reviews and grants consent, GridGate uses CALL-E to dial the top-ranked provider over the telecom network. The voice AI identifies itself, checks if the provider can operate during the load-shedding stage, confirms arrival before the deadline, and obtains their quote without revealing the customer's budget ceiling.Automated Rule Evaluation & Early Exit
When CALL-E posts the structured result back via webhook, GridGate programmatically validates the four hard success constraints:
$$ \text{Fulfilled}(r) \iff \text{CanService}(r) \land \text{OperatingInOutage}(r) \land \left( P_{\text{quoted}} \le P_{\text{budget}} \right) \land \left( T_{\text{ETA}} \le T_{\text{deadline}} \right) $$
If verified, the winning provider is locked in, the exact spoken evidence is displayed on the dashboard, and the cascade immediately exits early—saving time and platform credits:
$$ \text{Call Reduction Efficiency} = 1 - \frac{k}{N} $$
where ( k ) is the winning attempt index out of ( N ) total providers.
- Safety Halt on Ambiguity: If a callee gives conflicting or incomplete responses, GridGate safely pauses in ( \text{HALTED_AMBIGUOUS} ) state for human review rather than risking duplicate bookings.
How we built it
- Voice AI & Telephony (CALL-E): Integrated CALL-E's REST API and webhooks with strict JSON schema evaluation (
recipient-result.json), capturing structured outcomes, quoted prices, ETAs, and spoken evidence. - Backend Framework: Java 21 with Spring Boot 3.4, using Spring WebFlux / Netty
HttpClientfor async telecom connections, Spring Data JPA / H2 for transactional persistence, and optimistic locking (@Version). - Prompt Engineering: Dynamic, injection-safe task prompts in
TaskPromptBuilderenforcing mandatory AI disclosure and preventing price anchoring. - Frontend Dashboard: Responsive dark glassmorphism dashboard built with Vanilla JavaScript, HTML5, and CSS3, featuring real-time Server-Sent Events (SSE) and automated sync polling.
Challenges we ran into
- Carrier Latency & Telecom Connect Times: Real telecom networks can take up to 30–45 seconds to establish carrier connections. We tuned Netty socket response timeouts to 60s and built graceful fallback polling.
- Preventing Price Anchoring: Initially, instructing the voice LLM about the budget ceiling caused it to disclose the max price to callees. We redesigned the prompt so the AI collects genuine quotes while the backend orchestrator enforces the budget threshold.
- Handling Ambiguous Speech: Calls where a callee only said "hello" or gave vague answers required deterministic state-machine handling to halt safely rather than triggering false-positive bookings.
Accomplishments that we're proud of
- End-to-End Live Telephony Integration: Placed real outbound phone calls over the PSTN network and successfully extracted structured pricing and load-shedding confirmations.
- Complete Test Coverage: Engineered 89 comprehensive automated unit and integration tests passing with 0 failures across the entire domain, API, and cascade engines.
- Zero Jargon, High-Safety UI: A clean visual dashboard that gives operators total transparency into active calls, verbatim transcripts, and instant cancellation controls.
What we learned
- How to design reliable Two-Gate AI Architectures that combine autonomous voice agents with human-in-the-loop safety checkpoints.
- The nuances of outbound carrier latency, webhook signature verification, and idempotency in voice applications.
- How structured JSON schema enforcement turns free-flowing phone conversations into reliable, actionable database records.
What's next for GridGate
- Automated SMS & WhatsApp Confirmations: Sending turn-by-turn directions and job escrow confirmations straight to the winning contractor's phone.
- Direct Eskom Grid API Triggers: Automatically activating emergency cascades the moment an Eskom substation drops power in a registered suburb.
- Multi-Region Carrier Routing: Expanding automated international dial routing for enterprise field dispatch across Africa, the UK, and North America.
Built With
- call-e
- css3
- h2
- java
- javascript
- junit
- maven
- netty
- ngrok
- rest-api
- server-sent-events
- spring-boot
- spring-data-jpa
- spring-webflux
- telephony
- voice-ai
- webhooks
Log in or sign up for Devpost to join the conversation.