- CREATE TABLE contacts (number_e164 UNIQUE, name, email) in asterisk DB
- new lookup_mysql() backend, registered as first in _BACKENDS
- vm_import_contacts.py: import VCF into MySQL (527 added)
- contacts.conf: backends=mysql,file
- live: 16 of 130 messages resolved via MySQL contacts
- Index by full E.164 digits instead of last-9 only; previously different
people sharing a 9-digit suffix collided and lookups returned the wrong
name. Resolve now tries longest match first.
- match_digits default 9 -> 15 in code and example config.
- Skip emoji/punctuation-only contact names so a junk card can't shadow a
real one when a number is duplicated in the export.
- Verified: 513 contacts self-consistent; 6 remaining collisions are genuine
duplicate entries in the source VCF (two cards, same number), not a matcher
error.
Also: placed /home/jp/contacts.vcf at /var/lib/vm-transcribe/contacts.vcf
(640 asterisk:asterisk), set backends=file, cleared stale cache, restarted
vm-portal.