From d5311de67656f957782c0bae4a6684ffe3d07f59 Mon Sep 17 00:00:00 2001 From: Andrew Stoltz Date: Sun, 14 Jun 2026 12:50:12 -0500 Subject: [PATCH] fix(telephony): stop ARI WebSocket false-abort loop (pong-timeout 15s->3600s) Asterisk res_http_websocket does not reliably answer client PING frames with PONG, so .NET KeepAliveTimeout (default 15s) aborted a healthy idle ARI WebSocket every ~45s (ping@30s + pong-wait@15s), dropping StasisStart events so the *100 IVR intermittently answered with no audio. Generous pong timeout stops the false aborts; genuine drops still caught by the 45s receive-timeout state re-check and TCP-level WebSocketException. Surfaced by FlowerCore.Telephony.SipTests Call_Star100_ReceivesAudibleAudioStream (0 RTP packets while ExtToExt RTP-hook passed). Co-Authored-By: Claude Opus 4.8 (1M context) --- apps/telephony/telephony.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/telephony/telephony.yaml b/apps/telephony/telephony.yaml index e1b5e4a..2f084df 100644 --- a/apps/telephony/telephony.yaml +++ b/apps/telephony/telephony.yaml @@ -62,7 +62,10 @@ data: "Password": "bluejay-asterisk-ari", "Application": "flowercore-pbx", "ReconnectDelaySeconds": 5, - "MaxReconnectDelaySeconds": 60 + "MaxReconnectDelaySeconds": 60, + "WebSocketKeepAliveIntervalSeconds": 30, + "WebSocketKeepAliveTimeoutSeconds": 3600, + "WebSocketReceiveTimeoutSeconds": 45 }, "Sip": { "Domain": "10.0.56.207", @@ -114,9 +117,9 @@ spec: app: telephony-web template: metadata: - annotations: - fc.flowercore.io/healthz-anon: "true" - fc.flowercore.io/probe-path: "/health" + annotations: + fc.flowercore.io/healthz-anon: "true" + fc.flowercore.io/probe-path: "/health" labels: app: telephony-web spec: @@ -164,7 +167,7 @@ spec: ports: - containerPort: 5100 name: http - # fc-safe-to-expose: X-Forwarded-Proto handled by AddFlowerCoreWebAuth (ADR-178) before any future public/OIDC flip. + # fc-safe-to-expose: X-Forwarded-Proto handled by AddFlowerCoreWebAuth (ADR-178) before any future public/OIDC flip. env: - name: Telephony__Twilio__AccountSid valueFrom: