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 active development. Inbound and outbound calls are functional, but expect updates and potential breaking changes.

What is SpechPhone?

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.

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

Inbound Calls

Full SIP inbound flow with INVITE/ACK/CANCEL/BYE and RTP ↔ PCM media bridge

SIP Messaging

Integrated send/receive for SIP MESSAGE with real-time chat UI and history

Screenshots

SpechPhone Dialer Interface

Dialer Interface - Phone keypad with call and volume controls

SpechPhone Active Call with Minimized Bar

Active Call - Real-time audio meters, minimized call bar, and hangup controls

SpechPhone Messaging Interface

Messaging Interface - SIP MESSAGE conversation list with real-time delivery

SpechPhone Mobile Call Interface

Mobile Call Interface - Active call screen with mute, volume, and keyboard controls

SpechPhone Mobile Floating Widget

Mobile Floating Widget - Minimized active call overlay on home screen

Requirements

Installation

# 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

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