Ops hardening: lead re-import, SMS health-watch, ambient office murmur

- scripts/reimport_leads.py drains appointment_requests.jsonl into Odoo
  (fallback leads were captured but invisible to staff forever); server.py
  now warns at startup when leads are pending.
- scripts/healthwatch.sh (cron, every minute): after 3 consecutive /health
  failures sends a Twilio SMS to ALERT_SMS_TO (30-min cooldown) + a recovery
  SMS. systemd handles restarts; this makes a human aware when that isn't
  enough. Tested end-to-end (DOWN + RECOVERED SMS delivered).
- Ambient office murmur (assets/office_ambience.wav, generated by
  scripts/make_ambience.py from low-passed unintelligible Kokoro babble +
  room tone) mixed continuously into outbound audio via pipecat
  SoundfileMixer, so callers hear a live office instead of dead silence
  while the agent thinks. AMBIENT_VOLUME/AMBIENT_ENABLED to tune/disable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tocmo0nlord
2026-07-04 16:35:34 +00:00
parent 80e0bbe899
commit 1e7b7844a4
8 changed files with 292 additions and 0 deletions

View File

@@ -75,3 +75,13 @@ VAD_STOP_SECS=0.5
# checklist into the system prompt each turn + merges VAD-fragmented user turns, so the
# local 8B stops re-asking for name/reason/phone. Default: on for ollama, off for anthropic.
#CALL_STATE_TRACKING=true
# Ambient office murmur mixed into outbound audio (masks reply latency; file from
# scripts/make_ambience.py). AMBIENT_VOLUME=0 or AMBIENT_ENABLED=false disables.
#AMBIENT_SOUND=assets/office_ambience.wav
#AMBIENT_VOLUME=0.10
# Hard timeout for every Odoo XML-RPC round-trip (a HUNG Odoo must not hold call slots).
#ODOO_TIMEOUT_SECS=15
# Health-watch alerting (scripts/healthwatch.sh via cron): SMS on sustained /health
# failure. From = your Twilio number; To = the phone that should get the alert.
TWILIO_PHONE_NUMBER=+1...
ALERT_SMS_TO=+1...