Files
asterisk-voicemail/CHANGELOG.md
jp 05c5dbe45a MySQL backend + CDR + contacts email + matcher fix
- vm_store: MySQL (PyMySQL) default backend, SQLite fallback
- CDR: cdr_adaptive_odbc + res_odbc + MariaDB ODBC driver + Master.csv backfill
- contacts: full E.164 matching, WORK-email preference, junk-name guard
- backfill scripts: vm_migrate_sqlite_to_mysql.py, vm_backfill_contacts.py,
  vm_backfill_cdr.py
- live: 131 messages migrated, 7591 CDR rows backfilled
2026-08-13 13:09:03 +01:00

48 lines
2.7 KiB
Markdown

# Changelog
## 1.1.0 — 2026-08-13
- **Storage migrated to MySQL**: `vm_store` now defaults to MySQL (PyMySQL)
when `/opt/vm-transcribe/db_secret` is present, with a root-owned
least-priv `asterisk` user. SQLite remains as a fallback when
`VM_STORE=sqlite` is set or no secret file exists.
- **Asterisk CDR → MySQL**: CDRs now write to MySQL via `cdr_adaptive_odbc`
+ `res_odbc` + the MariaDB ODBC driver. Backfill script `vm_backfill_cdr.py`
imports `Master.csv` history into MySQL (7,591 rows).
- **Contacts email support**: `vm_contacts` now returns `(name, email)`,
preferring `TYPE=WORK` addresses from vCard. `messages.contact_email` column
backfilled.
- **Full E.164 matching**: contacts matcher uses the full digit string (up to
15 digits) instead of last-9; added a guard so emoji/placeholder contacts
cannot shadow real names.
- **Migrations**: `vm_migrate_sqlite_to_mysql.py` and `vm_backfill_cdr.py`
added under `src/` for first-run and CDR backfill.
## 1.0.0 — 2026-08-13
Initial build on mail.txt3.net (Debian 12, Asterisk 20, Apache 2.4, Postfix).
- **Transcription**: per-voicemail `mailcmd` (`vm_mailcmd.py`) transcribes the
attached recording with faster-whisper `base.en` (CPU, int8, VAD-filtered).
- **Summarisation**: local extractive summariser with intent tags and spoken-
digit callback-number extraction. No LLM, by choice.
- **Email**: rebuilt `multipart/alternative` notification (plain + styled HTML)
with the recording attached; relays the original Asterisk message unchanged on
any error (fail-safe).
- **Telegram** (optional): per-mailbox routed voice-note DM with summary caption
and transcript follow-up; degrades sendVoice → sendDocument → sendMessage.
- **Contacts** (optional): caller-ID → name via `file` (vCard/CSV export),
`google` (People API OAuth), or `carddav` (app password; Nextcloud/Fastmail/
iCloud). Last-9-digit matching. Note: Google app passwords do not work.
- **Web portal**: FastAPI app at `https://vm.txt3.net` — PIN login (mailbox +
voicemail PIN from `voicemail.conf`), list, play, download, delete, per-user
settings. Zero JavaScript, `script-src 'none'` CSP, loopback-only backend
behind an Apache TLS reverse proxy. Brute-force lockout per (mailbox, IP).
- **Storage**: SQLite store with content-addressed audio (decoupled from
Asterisk's renumbering) and DB-backed sessions.
- **Backfill**: `vm_import.py` imports and transcribes existing spool recordings;
idempotent on `(mailbox, origtime, callerid)`. Backfilled 157 historical
messages on first run (3m40s, 0 failures).
- **Packaging**: venv at `/opt/vm-transcribe`, systemd `vm-portal.service`,
Apache vhost + certbot TLS, `install.sh`.