From 8f75422e1c952316c5be08da8ec34fc48132553f Mon Sep 17 00:00:00 2001 From: Adam Moussa <166072409+amoussa1229@users.noreply.github.com> Date: Tue, 12 May 2026 20:00:04 -0400 Subject: [PATCH] =?UTF-8?q?Update=20README=20with=20deprecation=20notice?= =?UTF-8?q?=20=E2=80=94=20merged=20into=20afterhours-shift-manager?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 67 ++++--------------------------------------------------- 1 file changed, 4 insertions(+), 63 deletions(-) diff --git a/README.md b/README.md index d3e930c..511147a 100644 --- a/README.md +++ b/README.md @@ -1,66 +1,7 @@ -# 3CX Ring Group Scheduler +> **This repository has been archived.** The ring scheduler was merged into [afterhours-shift-manager](https://github.com/Sea-Haven-Industries/afterhours-shift-manager) as a 4th Lambda function in [PR #62](https://github.com/Sea-Haven-Industries/afterhours-shift-manager/pull/62). The CloudFormation stack `ring-scheduler-3cx` has been deleted. All future development happens in the afterhours-shift-manager repo. -AWS Lambda that automatically updates the after-hours and holiday forwarding destinations on a 3CX ring group daily at 8am ET. +--- -## How it works +# 3CX Ring Group Scheduler (Archived) -- Two EventBridge rules fire daily (one for EST, one for EDT) to handle DST -- Lambda checks if it's actually 8am Eastern — skips if not -- Reads the weekly schedule from `config/schedule.yaml` -- Authenticates to 3CX V20 XAPI via OAuth2 -- Updates the ring group's "office closed" and "holiday" routing - -## Schedule config - -Edit `config/schedule.yaml` to change the weekly schedule or add exception dates: - -```yaml -ring_group_number: "800" - -weekly_schedule: - Monday: "114" - Tuesday: "115" - Wednesday: "114" - Thursday: "115" - Friday: "116" - Saturday: "100" - Sunday: "100" - -exceptions: - "2026-12-25": "100" -``` - -## Setup - -### 1. Create 3CX API client - -In 3CX Admin Console > Integrations > API, create a new client with XAPI access enabled. - -### 2. Store credentials in SSM - -```bash -aws ssm put-parameter --name /3cx-scheduler/domain --value "yourcompany.3cx.us" --type SecureString -aws ssm put-parameter --name /3cx-scheduler/client_id --value "your-client-id" --type SecureString -aws ssm put-parameter --name /3cx-scheduler/client_secret --value "your-secret" --type SecureString -``` - -### 3. Deploy - -```bash -sam build -sam deploy --stack-name ring-scheduler-3cx --resolve-s3 --capabilities CAPABILITY_IAM --parameter-overrides Timezone=America/New_York -``` - -## Manual invocation - -```bash -# Run using today's schedule -aws lambda invoke --function-name 3cx-ring-group-scheduler \ - --payload '{"force": true}' \ - --cli-binary-format raw-in-base64-out output.json - -# Override to a specific extension -aws lambda invoke --function-name 3cx-ring-group-scheduler \ - --payload '{"force": true, "override_extension": "100"}' \ - --cli-binary-format raw-in-base64-out output.json -``` +This Lambda updated after-hours and holiday forwarding on a 3CX ring group daily at 8am ET. It has been superseded by the `afterhours-ring-scheduler` function in the [afterhours-shift-manager](https://github.com/Sea-Haven-Industries/afterhours-shift-manager) stack, which uses the 3CX Queue API at extension 801 and reads schedules from DynamoDB instead of a YAML config file.