Commit graph

6 commits

Author SHA1 Message Date
Adam Moussa
bbc113497a
feat(3cx): sync office department blfs via xapi (PLAT-116) (#80)
Some checks failed
Deploy / deploy (push) Has been cancelled
* feat(3cx): sync office department BLFs via XAPI

Keep unlock and lockdown keys in the templates and write colleague plus shared-parking BLFs per extension so phones skip their own line.

* fix(3cx): preserve parking BLF IDs and fail the job on PATCH errors
2026-08-27 14:58:55 -04:00
Adam Moussa
ccbc98962b Add lockdown mode and CI/CD pipeline (#3)
* Add lockdown profile toggle endpoints with T58W linekey support

Add a new Lambda handler that toggles Elements lockdown profiles
(Bohemia and Ronkonkoma) via the Elements API, with status
verification before and after each toggle. Returns Yealink XML
to control linekey LEDs (green=inactive, red=locked down).

Also brings both Lambda handlers into compliance with system
standards: Node 22.x runtime, arm64 architecture, 60-day log
retention, and kebab-case function names.

* Add lockdown poller Lambda and fix lockdown handler responses

- Add VPC-connected poller Lambda that monitors lockdown status via
  Elements API every 15 seconds (4 polls per 1-min EventBridge schedule)
- Handle Elements API rate limits (429) with retry-after support
- Fix lockdown handler to use TextScreen XML instead of Execute XML
  (Execute shows globe icon on T58W, TextScreen renders properly)
- Fix Elements API status parsing to be case-insensitive
- Trust toggle action instead of re-checking status (eventual consistency)
- Configure push_xml.server = any in T58W template for Push XML support
- Clear action_url.setup_completed (poller replaces boot-time check)
- Update README with lockdown architecture and known LED limitation

Note: T58W line key LED color does not change to reflect lockdown
status. Execute LED commands are transient on the T58W - the phone's
XML Browser key type immediately overrides them.

* Add buildspec for CodePipeline CI/CD

* Update README with CI/CD pipeline details
2026-05-01 18:52:37 -04:00
Adam Moussa
f4c6a2719a Apply display settings to T58W template to match T54W templates
Backlight dims to level 1 after 5 min, screensaver and power saving
disabled.
2026-04-27 13:47:49 -04:00
Adam Moussa
dbb42547fa Enable BLF list subscriptions in T58W template
Add phone_setting.blf_list_enable = 1 which was present in the T54W
template but missing from the stock T5x base. Without it, BLF and
shared parking keys show X's instead of green/red status.
2026-04-27 13:26:30 -04:00
Adam Moussa
7f985d4b75 Fix T58W template: use y1 prefix for custom y-file and clean up names
Change y000000000150.cfg → y100000000150.cfg across all three references
(deviceconfig filename, model filename, auto_provision.common_file_name)
to avoid conflicting with the stock 3CX template, consistent with the
T54W templates. Also update the second data section friendly name.
2026-04-27 13:10:24 -04:00
Adam Moussa
6f029963e9 Add Yealink T58W door unlock 3CX template
Based on the official 3CX T5x template, stripped to T58W-only with the
door unlock URL hardcoded on line key 2 (type 17/URL). Keys 3+ remain
managed by 3CX BLF as usual.
2026-04-27 13:08:57 -04:00