SpechPhone

Modern SIP/VoIP Softphone written in PHP with Swoole

License PHP Runtime Swoole Repo Size Stars
⚠️ IMPORTANT: The project is still in beta and under development. Some features, such as receiving calls, are yet to be implemented.

What is SpechPhone?

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.

Key Features

Self-sufficient

No FFmpeg or SoX required - all audio processing built-in

Multiple Codecs

Support for PCMA, PCMU, G.729, Opus, and L16

Audio Processing

Built-in resampling, mixing, noise suppression, and echo cancellation

Asynchronous I/O

Swoole coroutines for hundreds of simultaneous sessions

Full PHP Stack

SIP, RTP, and media control entirely in PHP

Browser Ready

Responsive HTML/JS interface with WebSocket support

Screenshots

SpechPhone Configuration Interface

Configuration Interface - SIP account setup and codec settings

SpechPhone Call Interface

Call Interface - Active call with real-time controls

SpechPhone Audio Processing

Audio Processing - Real-time audio monitoring and codec information

SpechPhone Mobile Interface

Mobile Interface - SpechPhone running on Samsung Galaxy S8+

SpechPhone Mobile Call Interface

Mobile Call Interface - Active call on mobile device

SpechPhone Mobile Configuration

Mobile Configuration - Settings and options on mobile device

Requirements

Installation

# 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

Architecture

Audio Processing

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.

Security Model

What Can You Build?

Links