Modern SIP/VoIP Softphone written in PHP with Swoole
SpechPhone is a modern SIP/VoIP softphone written in PHP and optimized with Swoole. It supports inbound and outbound voice calls, SIP messaging, real-time audio bridging, and integrates with backend tools without depending on external media libraries or WebRTC.
No FFmpeg or SoX required - all audio processing built-in
Support for PCMA, PCMU, G.729, Opus, and L16
Built-in resampling, mixing, noise suppression, and echo cancellation
Swoole coroutines for hundreds of simultaneous sessions
SIP, RTP, and media control entirely in PHP
Responsive HTML/JS interface with WebSocket support
Full SIP inbound flow with INVITE/ACK/CANCEL/BYE and RTP ↔ PCM media bridge
Integrated send/receive for SIP MESSAGE with real-time chat UI and history
Dialer Interface - Phone keypad with call and volume controls
Active Call - Real-time audio meters, minimized call bar, and hangup controls
Messaging Interface - SIP MESSAGE conversation list with real-time delivery
Mobile Call Interface - Active call screen with mute, volume, and keyboard controls
Mobile Floating Widget - Minimized active call overlay on home screen
# Clone the repository
git clone https://github.com/spechshop/softphone && cd spechphone
# Download pcg729 runtime
wget https://github.com/spechshop/pcg729/releases/download/PCG729/php
sudo mv php /usr/local/bin/php
sudo chmod +x /usr/local/bin/php
# Initialize submodules
git submodule update --init --recursive
# Configure environment
cp .env.example .env
# Edit .env and set your SPECH_VAULT_KEY_HEX
# Start services (each in a separate terminal)
php server.php
php audio.php
Through Swoole, the application opens a dedicated coroutine instance for each SIP trunk manager. This allows hundreds of calls to occur simultaneously without blocking the main process.