Commit Graph

38 Commits

Author SHA1 Message Date
Andrew Stoltz
34dda0c99c feat(infra): prestage broader app exposure hardening 2026-06-04 15:55:07 -05:00
Codex
5ae50bd491 fix(telephony): init container runs as root to chown hostPath /tmp/tts-audio
The fix-data-perms init container chowns /data (PVC) and /shared-tts
(hostPath /tmp/tts-audio on rke2-agent1) to uid 1654 so the non-root
telephony-web app can write Piper TTS .sln16 files.

Without an explicit container-level securityContext override, the init
container inherits pod-level runAsNonRoot:true / runAsUser:1654 and
fails with 'chown: /shared-tts: Operation not permitted' the first
time the hostPath comes up root-owned after a node reboot.

Outage 2026-05-11 23:00 UTC: telephony-web in Init:CrashLoopBackOff for
9 hours (100+ restarts) until init container was bumped to runAsUser:0.
Live cluster patched in the same operation; this commit makes the fix
durable in git so ArgoCD sync preserves it.

See Notes memory: feedback_hostpath_initcontainer_chown_perms

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 18:37:15 -05:00
Andrew Stoltz
4848f72eec fc-telephony: bump web to v202604252156 (T7 step trail) 2026-04-25 21:56:14 -05:00
Andrew Stoltz
f5eafc5def fc-telephony: bump web to v202604252144
Live workflow position tracking + canvas overlay sprint.
- Schema: CallSession.CurrentStep* + CallLog.Step* (migration
  AddCallSessionWorkflowPosition)
- Real-time CallStepExecuted events on every step entry, both
  Asterisk and Twilio paths
- New /calls/{id}/workflow live workflow viewer with visited
  path overlay and pulsing current-step badge
- GET /api/sessions/{id}/path + MCP get_call_session_path
- ActiveCalls 30s -> 3s poll + Live indicator + per-row View
  Workflow link
- Asterisk regroup also rolls in: playback verification,
  fallback chain, MainLayout refresh

Tests: 11525 -> 11549 pass / 1 skip / 0 fail. Build 0E.
Source: master @ 05b3d1c.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 21:44:14 -05:00
Andrew Stoltz
9c555db083 telephony: bump web image to v202604170153 2026-04-16 20:56:30 -05:00
Andrew Stoltz
7aec403e96 Pin telephony-web v202604170059 2026-04-16 20:03:01 -05:00
Andrew Stoltz
29d557003f fix: deploy responsive telephony debug menu 2026-04-16 19:45:49 -05:00
Andrew Stoltz
ef0e1f2505 fix: update telephony web image tag 2026-04-16 19:30:36 -05:00
Andrew Stoltz
4f33d7a053 fix(telephony): chown /shared-tts in initContainer + harden security context
Two follow-ups to the Piper TTS wire-up landed in d3ffad9:

1. Telephony-web runs as uid 1654 (non-root), but the hostPath at
   /tmp/tts-audio is owned by root:root 0755. Pod couldn't write .sln16
   files — every Piper call would succeed at the HTTP layer and then
   fall back to the sound map when File.WriteAllBytesAsync threw
   "Permission denied." Extend the existing fix-data-perms initContainer
   to chown the shared-tts mount too (0755 world-readable, so the
   Asterisk pod — running as a different uid — can still read).

2. Pod security context now explicitly sets runAsNonRoot: true + runAsUser
   1654 + runAsGroup 1654 (cluster policy), matching the pattern used
   by every other FlowerCore service.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 16:29:21 -05:00
Andrew Stoltz
d3ffad9190 fix(telephony): PiperUrl 10.0.57.15 → .17 + shared-tts hostPath for TTS playback
Piper was never reachable on 10.0.57.15 — edge1's actual address is
10.0.57.17 (SSH config, project_edge1_sdcard memory). Every telephony
prompt hit the 8s HttpClient timeout and fell back to the built-in sound
map (vm-advopts, vm-goodbye, beep) instead of speaking the real workflow
text. Verified from noc1: `curl http://10.0.57.17:8500/health` returns
HTTP 200 in 6ms, `POST /tts` returns a 16kHz mono WAV in 606ms.

Changes:

- apps/telephony/telephony.yaml
  - `Tts.PiperUrl` → `http://10.0.57.17:8500`
  - NetworkPolicy egress allow → `10.0.57.17/32:8500`
  - Header comment now documents the POST /tts {"text":"..."} contract
  - telephony-web pod mounts `/shared-tts` from hostPath `/tmp/tts-audio`
    (rke2-agent1). This is where `AsteriskProvider.SpeakTextAsync` writes
    the synthesized .sln16 before calling ARI `Play sound:tts/<name>`.

- apps/asterisk/deployment.yaml
  - Asterisk pod mounts the same hostPath at
    `/var/lib/asterisk/sounds/tts` so it can read and play what
    telephony-web wrote. Both deployments have
    `nodeSelector: kubernetes.io/hostname: rke2-agent1` so the hostPath
    is guaranteed to be the same directory.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 16:19:48 -05:00
Andrew Stoltz
ab7435a43a Update Agent Zero, Asterisk, and Telephony K8s manifests
- Update agent-zero deployment configuration
- Update Asterisk configmap and deployment
- Update telephony service manifest

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 19:12:08 -05:00
Andrew M. Stoltz
090b29933f telephony-web v20260325d: global search, error pages, quick-create wizard 2026-03-25 17:58:56 -05:00
Andrew M. Stoltz
987b73c537 telephony-web v20260325c: workflow config validation, enhanced health checks, response compression, Serilog request logging 2026-03-25 17:47:27 -05:00
Andrew M. Stoltz
bf12474de9 telephony-web v20260325b: add SMS UnreadCount/LastMessagePreview columns to schema drift 2026-03-25 08:19:58 -05:00
Andrew M. Stoltz
f366dd5c90 telephony-web v20260325a: fix billing/RBAC 500s — replace IDbContextFactory with direct TelephonyDbContext injection 2026-03-25 08:11:59 -05:00
Andrew M. Stoltz
50146f8355 telephony-web v20260324n: rebuild-schema admin endpoint for production DB migration 2026-03-24 19:45:06 -05:00
Andrew M. Stoltz
ace06c5fb9 telephony-web v20260324m: model-driven schema drift — auto-creates ALL missing tables 2026-03-24 19:28:08 -05:00
Andrew M. Stoltz
7ed834f056 telephony-web v20260324l: schema drift fix for CustomRoles table 2026-03-24 19:03:26 -05:00
Andrew M. Stoltz
2b04c9e292 telephony-web v20260324k: RBAC policy editor, billing dashboard, 11081 tests ALL PASS 2026-03-24 18:55:03 -05:00
Andrew M. Stoltz
fafc2e510b telephony-web v20260324j: recording playback, SMS enhancements, notifications polish, dashboard shortcuts, all 11049 tests pass 2026-03-24 18:22:46 -05:00
Andrew M. Stoltz
fb1c622e62 telephony-web v20260324i: break-glass UI, 5 MCP tools, survey editor config, step palette 2026-03-24 17:37:19 -05:00
Andrew M. Stoltz
40cb7faef5 telephony-web v20260324h: setup wizard, REST smoke tests, survey route fix 2026-03-24 17:16:09 -05:00
Andrew M. Stoltz
bd79279b28 telephony-web v20260324g: schema drift fix (BridgeEvents, SurveyResponses tables), survey route fix 2026-03-24 16:53:21 -05:00
Andrew M. Stoltz
35b6b4f8e5 telephony-web v20260324f: remove Scalar/OpenApi packages (Swashbuckle conflict) 2026-03-24 16:06:11 -05:00
Andrew M. Stoltz
8d8b76c82b Fix telephony-web: revert Scalar (Swashbuckle conflict), use v20260324e 2026-03-24 16:02:32 -05:00
Andrew M. Stoltz
42d2894ed1 Update telephony-web image tag to v20260324d (Scalar API docs, webhook config, surveys, templates, member portal) 2026-03-24 15:55:40 -05:00
f07c79fc4c telephony-web: hostNetwork + node affinity with asterisk for ARI localhost access 2026-03-15 18:55:36 +00:00
995ca8af48 Add intra-namespace ARI egress (port 8088) for WebSocket connection 2026-03-15 18:44:07 +00:00
f918091f3f Fix ARI config: clean JSON with both Ari + Telephony.Asterisk sections 2026-03-15 18:34:23 +00:00
d66db38638 Add both Ari + Telephony:Asterisk config sections for daemon + HTTP client 2026-03-15 18:27:32 +00:00
c7e59df880 Fix ARI config path: Ari -> Telephony.Asterisk to match AsteriskOptions.SectionName 2026-03-15 18:26:04 +00:00
adf8f40fe2 Switch to Asterisk provider + add ARI config for star code handling 2026-03-15 18:24:03 +00:00
84a590dfba Allow selenium namespace ingress to telephony for UI testing 2026-03-15 16:38:19 +00:00
Blue Jay
1d8e2e9a1c Add internal DNS IngressRoutes: telephony, grafana, prometheus, cockpit
- telephony.iamworkin.lan: cert-manager TLS + IngressRoute to telephony-web:5100
- grafana.iamworkin.lan: proxy to noc1:3000 via headless Service + Endpoints
- prometheus.iamworkin.lan: proxy to noc1:9091 via headless Service + Endpoints
- cockpit.iamworkin.lan: proxy to noc1:9090 with insecureSkipVerify (self-signed)
- All certs issued by step-ca-acme ClusterIssuer
- NetworkPolicy restricts noc-proxy to Traefik ingress + noc1 egress only
2026-03-11 14:21:26 -05:00
8bb1279800 Add SIP/RTP NetworkPolicy rules for Asterisk PBX ingress and egress 2026-03-11 08:19:12 +00:00
aadb110bc9 fix: add fsGroup + init container for SQLite write permissions 2026-03-11 04:08:22 +00:00
8cabee134f Migrate telephony to telephony.flowercore.io, dual-host IngressRoute, CF origin cert 2026-03-11 03:43:48 +00:00
Andrew M. Stoltz
848eb83f83 Deploy FlowerCore.Telephony: Blazor+REST+Twilio IVR
- Local container image (fc-telephony-web:latest) on all 3 RKE2 nodes
- 1Password OnePasswordItem for Twilio credentials (optional: true)
- Cloudflare origin cert for telephony.iamwork.in
- Piper TTS egress to edge1:8500
- SQLite with 5Gi Longhorn PVC
- NetworkPolicy: Traefik ingress, DNS, TTS, Twilio API egress
2026-03-10 12:02:08 -05:00