How voiceip/tinyphone works
Main Components
a) Core Components:
• PJSIP Integration Layer (based on lib/pjproject)
• REST API Server (port 6060)
• WebSocket Event System
• Account Management System
• Call Management System
• Audio Processing System (using lib/portaudio and lib/opus)
b) Platform-Specific Components:
• Windows UI Implementation
• MacOS UI Implementation
• Linux Console Implementation
Key Architectural Elements
┌─ User Interface Layer ─────────────────────┐
• Windows UI │ MacOS UI │ Linux Console UI │
• API Layer ────────────────────────────────┤
• REST API Server │ WebSocket Events │
• Core Services Layer ─────────────────────┤
• Account Manager │ Call Manager │ Config │
• Media Layer ──────────────────────────────┤
• Audio Processing │ Codec Support │
• PJSIP Integration Layer ─────────────────┤
• SIP Stack │ Media Stack │ NAT Traversal │
• ┘
Component Relationships
• Media streams (thick lines)
Important Details
a) API Endpoints:
• REST endpoints (/login, /dial, /calls, etc.)
• WebSocket events endpoint
• Port number (6060)
b) External Dependencies:
• PJSIP integration
• Audio codecs (Opus, BCG729)
• Network libraries (curl)
• Logging (spdlog)
• Metrics (statsd-cpp)
Cross-Platform Architecture
How the core components are shared across:
• tinyphone/ (core implementation)
• tinyphone-osx/ (MacOS specific)
• tinyphone-linux/ (Linux specific)
• Windows-specific implementation
Additional Elements
Notes about:
• Configuration management (config.json)
• Security features (cryptopp library)
• Build system integration
• Installer packages