VoiceReach architecture
Twilio outbound calls, media streams, Gemini Live, transcripts, and recordings.
VoiceReach combines REST campaign management with public Twilio webhooks and a raw media WebSocket. The backend owns every provider callback and persists call state in CallHistory.
Runtime flow
Launching a campaign creates or resets call rows, Twilio dials contacts, answer webhooks return TwiML, and Twilio streams audio to /twilio/stream. RealtimeCallingGateway bridges audio to Gemini Live and writes transcripts/outcomes back to MongoDB.
Implementation map
Frontend
/calling-campaigns, /history, api.callingCampaigns, voice preview, campaign polling, recording download.
Backend
CallingCampaignsService, Twilio webhook handlers, RealtimeCallingGateway, GeminiLiveSessionWrapper, audio-codec, prompts, tools, and language profiles.
Data
CallingCampaign, CallHistory, Contact, AiCallingBot, and SystemSettings.
Providers
Twilio places calls and serves recordings; Gemini Live handles realtime native-audio conversations.