Available Now

FreePBX Voicemail Transcription

Convert voicemail audio to text using OpenAI's Whisper model. Runs on a separate server, supports multiple PBX systems, and delivers transcriptions straight to email — no commercial licenses required.

Features

  • Transcription via faster-whisper (OpenAI Whisper)
  • File-based job queue — no database, Redis, or message broker
  • FastAPI HTTP endpoint for voicemail uploads
  • Background worker for transcription and email delivery
  • Multi-PBX support from a single STT server
  • IP-based or token-based access control
  • Optional preservation of original voicemail email body
  • Configurable text placement (above or below transcript)
  • Lightweight email via msmtp
  • Automated installer for Oracle Linux 9.5

How It Works

Two-component architecture: a lightweight script on each PBX, and a central transcription server.

PBX Side

A custom mail command (vm-mailcmd-stt.py) replaces FreePBX's default voicemail handler. When a voicemail arrives, it sends the audio file to the STT server via HTTP instead of emailing it directly.

Config: /etc/whisper-mailcmd.json

STT Server

A FastAPI server receives uploads and places them in a file-based queue. A background worker picks up jobs, transcribes the audio using faster-whisper, and emails the transcript to the voicemail recipient.

Config: /opt/whisper-stt/api/config.json

Requirements

PBX System

ComponentVersion
FreePBX15, 16, or 17 (or vanilla Asterisk)
Python3.x (for the mail command script)
AccessAbility to modify Voicemail Admin settings

STT Server

ComponentVersion
OSOracle Linux 9.5
Python3.9+
ffmpegLatest
faster-whisperLatest

Installation

Two quick installs — one on the STT server, one on each PBX.

STT Server Setup

Clone the repository

git clone https://github.com/voip-stuff/freepbx-voicemail-transcription.git
cd freepbx-voicemail-transcription

Run the installer

cd stt-server
bash install-ol9.5.sh

Installs all dependencies, sets up the Python venv, configures systemd services, creates queue directories, and configures msmtp.

Configure the server

Edit /opt/whisper-stt/api/config.json to set your allowed networks, authentication token, Whisper model size, and sender email address.

PBX Setup

Run the PBX installer

cd pbx-site
bash install-pbx.sh

Installs the custom mail command script and generates the initial configuration file.

Configure FreePBX

In FreePBX Admin → Settings → Voicemail Admin:

  • Set Email Body to include: To: ${VM_MAILBOX}
  • Set Mail Command to: /usr/local/sbin/vm-mailcmd-stt.py

Configure the PBX client

Edit /etc/whisper-mailcmd.json to set the STT server endpoint, authentication token, and whether to include the original voicemail email body.

Testing

Verify your setup with a simple curl command.

curl -X POST \ -H "X-Whisper-Token: YOUR_TOKEN" \ -F "audio=@/tmp/msg0000.wav" \ -F "to_email=you@example.com" \ -F "mailbox_id=1001" \ -F "caller_id_num=6025551234" \ -F "caller_id_name=Test Caller" \ -F "called_did=12535551234" \ -F "pbx_id=test-pbx" \ http://127.0.0.1:8080/v1/voicemail

A successful response returns: {"status":"queued","job_id":"JOB-xxx","message":"Voicemail accepted."}

Documentation

Full documentation is included in the repository:

  • architecture.md — System design and workflow
  • troubleshooting.md — Common issues and fixes
  • freepbx-voicemail-admin.md — FreePBX configuration
  • testing-with-curl.md — Testing methodology
  • email-configuration.md — msmtp and email setup

License

Released under the MIT License. Use it, modify it, deploy it — no restrictions, no license fees, no phone-home.

Get It on GitHub