Modern SIP/VoIP Softphone written in PHP with Swoole
SpechPhone is a modern SIP/VoIP softphone written in PHP and optimized with Swoole. It allows establishing real-time voice calls, controlling codecs, and integrating with backend tools without depending on external media libraries.
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
Configuration Interface - SIP account setup and codec settings
Call Interface - Active call with real-time controls
Audio Processing - Real-time audio monitoring and codec information
Mobile Interface - SpechPhone running on Samsung Galaxy S8+
Mobile Call Interface - Active call on mobile device
Mobile Configuration - Settings and options on mobile device
# Install system dependencies
sudo apt update && sudo apt install -y openssl
# Clone the repository
git clone https://github.com/spechshop/spechphone && cd spechphone
git clone https://github.com/spechshop/libspech
# Download pcg729 runtime
curl -L https://github.com/spechshop/pcg729/releases/download/current/php -o php
# Configure runtime
chmod +x ./php
sudo cp php /usr/local/bin/php
# Start services
php middleware.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.