- PHP 62.4%
- JavaScript 25.3%
- CSS 12.3%
| api | ||
| cron | ||
| images | ||
| logs | ||
| scripts | ||
| uploads/audio | ||
| .gitignore | ||
| .htaccess | ||
| .user.ini | ||
| accept-terms.php | ||
| admin-audio-phone-list.php | ||
| change-password.php | ||
| common.js | ||
| config.sample.php | ||
| dashboard.js | ||
| dashboard.php | ||
| db.php | ||
| edit-audio.js | ||
| edit-audio.php | ||
| forgot-password.php | ||
| ftp.deploy.json.example | ||
| ftp.regaldragondanceparty.com.json.example | ||
| functions.php | ||
| index.php | ||
| legal-notice.php | ||
| legal-summary.php | ||
| legal.php | ||
| login.php | ||
| logout.php | ||
| phone-warrenty.conf | ||
| qr-code.php | ||
| README.md | ||
| register.php | ||
| reset-password.php | ||
| schema.sql | ||
| style.css | ||
| tty-message.php | ||
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.
- Copy
ftp.regaldragondanceparty.com.json.exampleto~/ftp.regaldragondanceparty.com.json. - Fill in your FTP host, port, username, password, passive mode, SSL choice, and timeout in the home-directory copy.
- Copy
ftp.deploy.json.exampletoftp.deploy.json. - Set
remotePathinftp.deploy.jsonto the destination folder on the server. - Optionally change
manifestPathinftp.deploy.jsonif you want the remote manifest stored somewhere other than.ftp-deploy-manifest.json. - 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 anerrorslist for the current deploy attempt. - Files matching
.gitignoreare excluded by default, except content underlib/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, exceptlib/ README.md.gitignoreschema.sql*.exampleftp.deploy.jsonscripts/
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