Allow audio to be uploaded and managed for a PBX
  • PHP 62.4%
  • JavaScript 25.3%
  • CSS 12.3%
Find a file
2026-05-29 05:48:23 -04:00
api allow ! and 1 on typewriter 2026-05-29 05:48:23 -04:00
cron Do not process transcriptions if opted out of AI 2026-05-20 12:24:13 -04:00
images add dot leader 2026-05-14 22:08:28 -04:00
logs separate audio processing in separate job 2026-03-27 22:27:36 -04:00
scripts make ftp deploy less noisy 2026-05-29 03:29:08 -04:00
uploads/audio upload and manage audio files 2026-03-27 01:29:14 -04:00
.gitignore add in ability to upload via ftp 2026-05-28 23:35:21 -04:00
.htaccess setup authentication 2026-03-27 00:53:59 -04:00
.user.ini show upload error and increase file size limit 2026-03-27 22:55:00 -04:00
accept-terms.php add legal notice 2026-03-27 11:18:02 -04:00
admin-audio-phone-list.php royal visit voicemail box 2026-05-08 17:34:36 -04:00
change-password.php setup authentication 2026-03-27 00:53:59 -04:00
common.js show progress bar as files are uploaded 2026-05-29 03:20:14 -04:00
config.sample.php create audio for teletype TTY 2026-04-01 22:44:14 -04:00
dashboard.js show html dialog to delete and toast 2026-05-29 03:47:59 -04:00
dashboard.php move audio files to dashboard 2026-05-29 03:31:52 -04:00
db.php setup authentication 2026-03-27 00:53:59 -04:00
edit-audio.js allow ! and 1 on typewriter 2026-05-29 05:48:23 -04:00
edit-audio.php allow ! and 1 on typewriter 2026-05-29 05:48:23 -04:00
forgot-password.php setup authentication 2026-03-27 00:53:59 -04:00
ftp.deploy.json.example add manifest to only upload changed files 2026-05-28 23:38:56 -04:00
ftp.regaldragondanceparty.com.json.example add in ability to upload via ftp 2026-05-28 23:35:21 -04:00
functions.php condense TTY fields 2026-05-29 02:13:00 -04:00
index.php move hero and recent contributions to home page 2026-05-20 10:49:33 -04:00
legal-notice.php add legal notice 2026-03-27 11:18:02 -04:00
legal-summary.php create audio for teletype TTY 2026-04-01 22:44:14 -04:00
legal.php add legal notice 2026-03-27 11:18:02 -04:00
login.php create TTY voice mailbox 2026-05-08 00:28:19 -04:00
logout.php setup authentication 2026-03-27 00:53:59 -04:00
phone-warrenty.conf phone warrenty adventure 2026-05-08 17:35:08 -04:00
qr-code.php QR Code Generator 2026-05-08 01:04:08 -04:00
README.md use .gitignore to exclude files, as well as a few other files 2026-05-29 00:08:03 -04:00
register.php create TTY voice mailbox 2026-05-08 00:28:19 -04:00
reset-password.php setup authentication 2026-03-27 00:53:59 -04:00
schema.sql number profiles controlled by audio file 2026-05-20 10:39:27 -04:00
style.css add buttons for nonstandard keys 2026-05-29 05:24:06 -04:00
tty-message.php create TTY voice mailbox 2026-05-08 00:28:19 -04:00

Phone Exhibit

Converts audio files with a high pass filter 300-3000 Hz into 8kHz 16bit PCM mono WAV files to simulate telephone quality audio, and a format that can be used with an Asterisk PBX server.

  • Copy config.sample.php to config.php and modify settings
  • request/install ffmpeg on your server
  • getID3: https://github.com/JamesHeinrich/getID3 and put in /lib/getid3
  • Install minimodem and use which miinimodem to determine where it is installed

AI transcriptions and Minimodem is used for TTY Teletype machines.

FTP Publishing

Do not store FTP credentials inside this project, even in ignored files. If credentials are saved anywhere under the project folder, they can be read by local tools working in the repo.

This repo includes a deploy script at scripts/deploy-ftp.php that reads secrets from a JSON file in your home directory and deploy settings from a JSON file in the project.

  1. Copy ftp.regaldragondanceparty.com.json.example to ~/ftp.regaldragondanceparty.com.json.
  2. Fill in your FTP host, port, username, password, passive mode, SSL choice, and timeout in the home-directory copy.
  3. Copy ftp.deploy.json.example to ftp.deploy.json.
  4. Set remotePath in ftp.deploy.json to the destination folder on the server.
  5. Optionally change manifestPath in ftp.deploy.json if you want the remote manifest stored somewhere other than .ftp-deploy-manifest.json.
  6. Run php scripts/deploy-ftp.php.

Deploy behavior:

  • If a remote manifest already exists, the script downloads it first.
  • Only files whose hash or size changed are uploaded.
  • Files that failed in a prior run are listed separately in the manifest and retried after all other changed files.
  • During upload, the remote manifest is checkpointed about every 10 seconds.
  • If an upload fails, the script still tries to save a partial manifest for files already uploaded successfully and records the failed file separately for deferred retry next time.
  • The manifest also records startedAt, lastCheckpointAt, completedAt, and an errors list for the current deploy attempt.
  • Files matching .gitignore are excluded by default, except content under lib/ remains deployable.
  • The remote manifest is added or updated after the deploy finishes.

You can also pass a custom config path: php scripts/deploy-ftp.php ~/some-other-config.json

Server details:

  • Host: ftp.regaldragondanceparty.com
  • Protocol: ftp
  • Port: 21

Recommended upload excludes:

  • Anything matched by .gitignore, except lib/
  • README.md
  • .gitignore
  • schema.sql
  • *.example
  • ftp.deploy.json
  • scripts/

Cron Jobs

Master worker, calls all other cron jobs to process audio files.

* * * * * /usr/bin/php /home/USER/public_html/phone/cron/cron.php >> /home/USER/logs/cron-$(date +\%Y-\%m-\%d).log 2>&1

Delete old logs

0 3 * * * find /path/to/logs -name "cron-*.log" -mtime +90 -delete