fix(asterisk): actually install core sounds (en, ulaw 1.6.1)
The install-sounds init container was a stub that left /var/lib/asterisk/sounds/en empty. Result: every SpeakText fallback path (vm-advopts, vm-goodbye, characters:*, digits/*, beep, pbx-invalid) resolved to a missing file, Asterisk silently failed each Playback, zero RTP was produced, and callers heard dead air. This is why dialing *0 (Settings Menu) or *100 (Debug IVR) "picks up quietly" — there is literally nothing to stream. Replaced the stub with alpine:3.20 + curl + tar that downloads the pinned asterisk-core-sounds-en-ulaw-1.6.1.tar.gz (~10 MB) from downloads.asterisk.org and unpacks it into the sounds emptyDir. Idempotent — skips download if vm-goodbye is already present. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,22 +16,39 @@ spec:
|
|||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: asterisk
|
app: asterisk
|
||||||
spec:
|
spec:
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/hostname: rke2-agent1
|
kubernetes.io/hostname: rke2-agent1
|
||||||
hostNetwork: true
|
hostNetwork: true
|
||||||
dnsPolicy: ClusterFirstWithHostNet
|
dnsPolicy: ClusterFirstWithHostNet
|
||||||
securityContext:
|
securityContext:
|
||||||
fsGroup: 0
|
fsGroup: 0
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: install-sounds
|
- name: install-sounds
|
||||||
image: busybox:latest
|
# Downloads Asterisk core sounds (en, ulaw) into the sounds emptyDir
|
||||||
command:
|
# volume so the base Asterisk image (which ships no sounds) can play
|
||||||
- sh
|
# vm-advopts, vm-goodbye, digits/*, characters/*, beep, etc. Skips
|
||||||
- -c
|
# the download if the directory already contains sound files —
|
||||||
- |
|
# re-running the pod after a hot image reload reuses the unpack.
|
||||||
mkdir -p /sounds/en &&
|
image: alpine:3.20
|
||||||
echo "Leaving /var/lib/asterisk/sounds/en empty until the sound bootstrap lane is fixed."
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
set -eu
|
||||||
|
if [ -f /sounds/en/vm-goodbye.ulaw ] || [ -f /sounds/en/vm-goodbye.gsm ]; then
|
||||||
|
echo "Sounds already present — skipping download."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "Installing curl + tar..."
|
||||||
|
apk add --no-cache curl tar gzip >/dev/null
|
||||||
|
cd /tmp
|
||||||
|
echo "Downloading Asterisk core sounds (en, ulaw) 1.6.1..."
|
||||||
|
curl -fsSLO https://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-ulaw-1.6.1.tar.gz
|
||||||
|
echo "Extracting to /sounds/en ..."
|
||||||
|
mkdir -p /sounds/en
|
||||||
|
tar -xzf asterisk-core-sounds-en-ulaw-1.6.1.tar.gz -C /sounds/en
|
||||||
|
echo "Done — $(ls /sounds/en | wc -l) files installed."
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: sounds
|
- name: sounds
|
||||||
mountPath: /sounds/en
|
mountPath: /sounds/en
|
||||||
|
|||||||
Reference in New Issue
Block a user