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>
This commit is contained in:
Andrew Stoltz
2026-04-16 16:19:48 -05:00
parent 403d061664
commit d3ffad9190
2 changed files with 52 additions and 34 deletions

View File

@@ -106,6 +106,11 @@ spec:
mountPath: /var/log/asterisk
- name: sounds
mountPath: /var/lib/asterisk/sounds/en
# Shared TTS audio — telephony-web writes .sln16 files here (as
# /shared-tts), Asterisk plays them via `sound:tts/<name>` which
# resolves to this mount. Both pods are pinned to rke2-agent1.
- name: shared-tts
mountPath: /var/lib/asterisk/sounds/tts
resources:
requests:
cpu: 100m
@@ -177,3 +182,7 @@ spec:
emptyDir: {}
- name: sounds
emptyDir: {}
- name: shared-tts
hostPath:
path: /tmp/tts-audio
type: DirectoryOrCreate