From bc861f1ccce9e87c91c8df7ca9e2992d0161ac08 Mon Sep 17 00:00:00 2001 From: Adam Moussa Date: Wed, 17 Jun 2026 11:44:51 -0400 Subject: [PATCH] Fix holiday router 3CX IVR calls (Receptionists entity, not IVRs) get_ivr/set_ivr_routes/extract_ivr_routes targeted a nonexistent IVRs entity set with an Options[].Route/TimeoutForward shape. The live 3CX IVR is the Receptionists entity: the no-input/timeout route is the scalar TimeoutForwardDN, and the key-0 route is a child of the Forwards collection (matched by Input=='0'), written via a parent deep-PATCH. Routes are now represented as destination numbers. Caught by the live prod round-trip test (get_ivr returned 405) before any holiday ran; rewritten and re-verified against the live PBX. v1.11.1. --- template.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/template.yaml b/template.yaml index 98e9aea..9ecbc77 100644 --- a/template.yaml +++ b/template.yaml @@ -282,6 +282,29 @@ Resources: Description: "Update 3CX queue at 5pm EDT weekends" Enabled: true + # Lambda error alarm for the ring scheduler. Mirrors the account-wide + # operational convention (Lambda-Errors-, threshold 1 over one 5-min + # period, Sum, missing=notBreaching) and pages the same site-alerts SNS topic + # → AWS Chatbot → Slack as the other afterhours-* functions. + RingSchedulerErrorAlarm: + Type: AWS::CloudWatch::Alarm + Properties: + AlarmName: !Sub "Lambda-Errors-${RingSchedulerFunction}" + AlarmDescription: "Ring scheduler Lambda reported one or more errors" + Namespace: AWS/Lambda + MetricName: Errors + Dimensions: + - Name: FunctionName + Value: !Ref RingSchedulerFunction + Statistic: Sum + Period: 300 + EvaluationPeriods: 1 + Threshold: 1 + ComparisonOperator: GreaterThanOrEqualToThreshold + TreatMissingData: notBreaching + AlarmActions: + - !Sub "arn:aws:sns:${AWS::Region}:${AWS::AccountId}:site-alerts" + # --- Holiday Router (repoints 3CX IVR/queue for a holiday day-shift) --- # Invoked with {"action": "activate"|"deactivate", "date": ""} at # 08:00 ET (activate) and 17:00 ET (deactivate) for each holiday date. Both