Sonant - AI Voice Agent & PBX Platform
A production voice-AI platform that answers and places real phone calls in Sinhala, Tamil, and English - booking appointments, ordering lab tests, taking product orders, and running the back office on live industry dashboards. Built on a self-hosted Asterisk PBX with Google Gemini Live as the real-time conversational brain and validated tool-calling, with a flagship hospital deployment taking live calls.
Sonant is a production voice-AI platform that gives a business a real phone agent. It answers and places actual phone calls, holds a natural spoken conversation in Sinhala, Tamil, or English, and gets things done on the call - booking appointments, ordering lab tests, taking product orders, and confirming or following up on orders - then writes every result straight into a set of back-office dashboards. Under the brand name Sonant, with a voice persona called Nawani, it runs on a self-hosted telephony stack with Google's Gemini Live model as the real-time conversational brain. Its flagship live deployment handles real Sinhala-language calls for a hospital, finding a doctor, booking the appointment, and recording it on the hospital dashboard while the caller is still on the line.
The platform is three products sharing one backend and one telephony stack. The voice agent is the real-time inbound and outbound phone agent. A monitoring and dashboards layer gives operators a view of the phone system together with per-industry business dashboards for healthcare, reservations, and sales. A storefront provides an online shop for the sales vertical that feeds phone-order confirmation calls. And a separate marketing site presents the Sonant brand to the world.
When a call comes in, it flows through the PBX into the agent over a raw audio protocol, with 8 kHz PCM frames streamed over TCP, and the agent opens a live session with Gemini. The model listens and speaks in real time, and crucially it does not just chat - it calls tools. Functions like find a doctor, book an appointment, order a lab test, place a product order, or confirm an order are registered with the model and handled in the agent, which validates each call against real reference data and writes a structured record. A strict rule keeps it trustworthy: the agent may never invent a reference number, a doctor, or a fee, because those values come only from the tool responses. Phone numbers are even read back one digit at a time to work around speech-to-text weaknesses with grouped numerals. Records show up on the right dashboard within a few seconds.
The system also places outbound calls. When a dashboard action or an automatic watcher decides a customer needs to be called, to confirm an order or send a shipped notification, the backend builds a context for that specific call, originates it through the PBX, and the agent runs the conversation from that context. The first real outbound AI confirmation calls to live customers were verified working end to end.
The telephony backbone is a self-hosted Asterisk PBX connected to an upstream phone exchange over a SIP trunk, with separate dialplan contexts for inbound, retry, and outbound calls, each bridged to the agent on its own audio socket. Careful audio pacing, including silence frames, keeps the connection alive against the PBX's inactivity timeout. The web services are exposed securely through a Cloudflare tunnel, packet capture runs for diagnostics, and the whole platform is managed as Linux systemd services with scripted, validated deploys.
The dashboards are deliberately config-driven: one generic engine renders every industry from a registry entry plus a data file, so adding a new vertical is configuration rather than new code. The healthcare dashboard is effectively a compact hospital and laboratory system - appointments, a full lab lifecycle from ordered through collected, received, processed, resulted, verified, and delivered, automatic high, low, and critical flagging of results, a patient registry, itemized billing, and reports - and it runs live on real call data. Reservations handles table bookings with auto-computed deposits, and sales covers web and phone orders, leads, and the automatic confirmation and shipped-notification calls fed by the storefront. Access is per user, so each operator sees only the dashboards they are granted.
A detail I am proud of is that the agent's behaviour is managed as code rather than edited live. The hospital agent's system prompt and its compliance instructions live in version-controlled files and are re-applied on every deploy, which wipes any drift or fabrication that might have crept in. Getting a fast real-time model to follow the rules reliably came down to explicit wrong-versus-right examples in the prompt, and a safety switch lets every outbound call be redirected to a test number until a vertical is verified ready for real customers.
On the technical side, the agent is a TypeScript service on Node.js talking to Gemini Live; the dashboards and storefront are Python and Flask applications with a lightweight JavaScript dashboard engine and Chart.js, and the checkout is hardened on the server with price recomputation, stock locking, rate limiting, and output escaping. Data is stored as flat JSON files rather than a database, the PBX is Asterisk, ingress is a Cloudflare tunnel, and the marketing site is a Next.js and Tailwind CSS application.
Sonant is the most end-to-end system I have built: a real, deployed product where a phone rings, an AI answers in the caller's own language, understands the request, takes a genuine action through validated tools, and the result appears on a live business dashboard seconds later. It spans real-time audio, telephony, large-language-model tool-calling, multilingual conversation, and a full operational back office.
Built with
More work
All projectsDurdans LIMS - Laboratory Information Management System
A Laboratory Information Management System for Durdans Hospital, Sri Lanka, built by a University of Moratuwa team in partnership with IFS - digitising the full clinical-lab pipeline from patient registration to signed report across a multi-branch network, with branch-isolated multi-tenancy, HL7/FHIR/ASTM interoperability, instrument integration, and PDPA compliance, held to a real enterprise standard.
View projectApexTick - Real-Time Ticket Reservation Platform
A distributed, real-time ticket reservation platform engineered to survive a high-contention flash sale - thousands of people rushing the same seats in seconds, where exactly one buyer must win each seat with zero double-booking. Built as a right-sized Spring Boot microservices system with Keycloak identity, an event-driven backbone, an API gateway, and load-tested proof of correctness.
View projectAI Number Plate Recognition & Smart Parking System
An end-to-end ANPR and smart-parking platform - YOLOv8 + Roboflow detection feeding a vision-LLM OCR engine with low-light image enhancement, real-time polygon-based slot occupancy, an ESP32-driven LED matrix and alarm, and a full Stripe booking-and-payment backend. My first hardware project, and a University of Moratuwa top project.
View project