Chapter 2 — Architecture
System Architecture
A microservices architecture of modular, independently scalable components communicating over secure HTTP and AMQP, bridged to the telephony layer through SIP and RTP.
The distributed design provides high availability, elastic scalability, fault isolation and interoperability across all system layers. At the telephony layer, OpenBrain establishes a communication bridge between the existing PBX and the VoiceBot solution: SIP signalling manages call setup, routing and session control, while RTP transmits the audio streams. At the application layer, real-time interaction between conversational services, third-party systems and the platform is handled through HTTP-based APIs.

Figure 1 — The OpenBrain system architecture.
Data storage and messaging
A centralised PostgreSQL database handles structured storage. Components communicate over both HTTP and AMQP. AMQP provides message queuing, priority management and reliable delivery — preventing bottlenecks, mitigating failures under high load, and supporting load balancing when horizontal scaling is applied.
Stored in PostgreSQL
- User profiles, credentials and authentication data
- Call records, conversations in textual form and call session details
- Transcription texts and their links to audio sources
- Processing statuses and results from the STT, TTS and NLU modules
- System and component configuration parameters
- Component activity logs, depending on the logging setup
Stored in the Document Management System
All audio — complete call recordings and segmented fragments — is preserved in its original format (WAV, MP3 or another supported codec) in the DMS: full-length session recordings, segments produced by the segmentation and diarisation module for offline transcription, and short real-time speech segments used by the Conversation Monitor for live updates and transcription previews.
Retaining the original format preserves audio fidelity for transcription correction, model retraining and legal audit trails; maximises reusability in speech recognition and synthesis training pipelines; and maintains interoperability for export or migration. Each file is linked to its session metadata in PostgreSQL, enabling indexing and retrieval by session ID, timestamp or user ID, real-time access to segmented audio during live monitoring, post-call review, and manual or automated transcription correction workflows.
Retention policy
All files in the DMS are subject to the system-wide retention policy and are automatically purged after three months.
Platform modules
Table 1 — components, responsibilities and transport ports.
| Component | Description | Ports |
|---|---|---|
| Software-based PBX | Provides SIP integration and RTP relaying, keeping an active TCP connection (SIP trunk) with the base PBX server. SIP enables the handshake that establishes RTP over UDP for full-duplex audio between the AI agent and the user. It also handles call routing when redirections are requested. | 5060/TCP RTP/UDP |
| SIP Connector | Manages RTP audio streams after the SIP handshake and dispatches them to and from the Conversation Controller. Incoming audio originates from the user; outgoing audio is the VoiceBot reply, dispatched to the PBX for transfer to the user. | 4573/TCP |
| Conversation Controller | The core of the system. It interconnects BlockFlow with the PBX, handles both audio streams and orchestrates voice data exchange: incoming speech goes to Speech-to-Text, the resulting query text goes to BlockFlow, and the response text goes to Text-to-Speech before being streamed back to the user. It also monitors call recordings and their transcription and provides a GUI for preview. | 5080/TCP |
| BlockFlow | The central control hub for designing, managing and optimising VoiceBot scenarios through a block-based graphical interface, with integrated scenario management, real-time conversation monitoring, analytics dashboards and outlier detection. Interoperability hooks let conversational flows interact with external APIs, databases, CRM platforms and business applications in real time. | 5071/TCP (frontend) |
| User Management Module | Responsible for user authentication, authorisation and access role management using stateless authentication mechanisms. It also manages the system licence. | 5082/TCP |
| Document Management System | Orchestrates secure storage and lifecycle management of all generated artefacts — audio recordings, transcripts, conversation segments and related metadata — with attribute-based authorisation, configurable retention policies and bucket-based storage structures. | 5090/TCP |
| Snorlax GUI | Interface for configuring the software-based PBX module. It manages configuration parameters, synchronises them with the underlying file-based configuration system, and is integrated with the BlockFlow GUI so changes can be applied in real time. | 5085/TCP |
| Optimization Layer and Caching | Execution environment for highly optimised containers that accelerate AI model inference through direct CUDA driver access and advanced caching mechanisms. | — |
| vLLM — LLM Integration API | High-throughput module for fast LLM inference and serving. It enables integration of customised LLMs into conversational workflows, supporting tool calling, MCP integration and structured outputs. | 5050/TCP |
| Text-to-Speech — OpenBrain Voice | AI-based custom voice synthesis generating natural, human-like speech from text, with phonetic control mechanisms for adjusting pronunciation and accent of specific words without fine-tuning the model. | 4573/TCP |
| Speech-to-Text — OpenBrain Transcribe | AI-powered transcription module delivering fast and accurate conversion of voice interactions into structured text. | 4573/TCP |
| Noise Removal and Silence Detector | Speech preprocessing before Speech-to-Text: removes background noise and continuously measures silence periods. | 4573/TCP |
| Segmentator Module | Audio segmentation and speaker diarisation, splitting long recordings into manageable segments for accurate transcription while optimising STT processing efficiency. | 4573/TCP |
| Audio Controls | A set of audio editing tools for audio metadata extraction and audio format management. | 4573/TCP |