sync: auto-sync from HOWARD-HOME at 2026-06-02 15:07:39

Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-06-02 15:07:39
This commit is contained in:
2026-06-02 15:07:47 -07:00
parent 90f59dc1da
commit a420b06d8c

View File

@@ -196,3 +196,69 @@ Flagged that a single corrupt file on a cheap 8GB generic stick is a common earl
- Boot device: /dev/sda1, label UNRAID, Generic Flash Disk 8GB (8.05 GB / 7.50 GiB).
- Unraid downloads: https://unraid.net (current + previous releases).
- Files to refresh on USB: bzimage, bzroot, bzroot-gui, bzmodules, bzfirmware (+ matching .sha256 each). Do NOT touch config/.
---
## Update: 15:06 PT — PacketDial / OITVOIP API access + new `packetdial` skill
### Session Summary
Howard asked whether Claude has API access to https://voip.packetdial.com/ — specifically whether it can pull data and make changes — and to build a skill if not. Investigation established the answer is "not yet, for lack of credentials," and produced a complete, ready-to-use skill that will work the moment a key is provisioned.
Searched the repo and vault for prior PacketDial context. Found that `packetdial.com` appears throughout as a WordPress/email hosting client (IX web hosting, Neptune Exchange accepted domain) — unrelated to VoIP. The relevant prior work was in `session-logs/2026-04-20-session.md` ("OITVOIP / NetSapiens API Research"), which identified the platform but left credential provisioning as an open TODO. The vault has no `packetdial`/`oitvoip` entry (`vault.sh search` returned nothing for either term).
Probed both PacketDial hostnames live to resolve Mike's questions factually. `voip.packetdial.com` is the customer-facing white-label portal (login-gated UI; the Cascades fax/UC dashboard, account 28598) and exposes no API — `/ns-api/*` there redirects to `errors/not_found`. `pbx.packetdial.com` is the real API host: NetSapiens SNAPsolution API v2, version 44.4.10, a 239-path REST surface with Bearer auth. Pulled the live OpenAPI spec and inventoried the endpoint groups (domains, users, devices/phones, phonenumbers/DIDs, resellers, cdrs, subscriptions, etc.) and the token endpoint shape.
Built the `packetdial` skill modeled on the existing `bitdefender`/`b2` skills: read-by-default, every write gated behind `--confirm`, credentials loaded from the SOPS vault (never hardcoded). Verified both Python modules compile, the write-gate refuses without `--confirm`, and the no-credentials path emits actionable setup guidance rather than a stack trace.
Howard does not have portal access and said Mike has questions about Claude's claims, so the decision was kicked to Mike via a coord todo + broadcast message. Nothing was committed and nothing touches the live PBX.
### Key Decisions
- Targeted `pbx.packetdial.com` (the API host) not `voip.packetdial.com` (portal) — confirmed by live probing, not assumption.
- Skill supports two credential shapes (static `nsr_` bearer key OR OAuth2 password grant), auto-detecting whichever is present in the vault; env-var overrides exist for testing.
- Read-by-default + `--confirm`-gated writes, matching the safety posture of the bitdefender/b2 skills, because this targets the LIVE production reseller PBX affecting real customers.
- Included a `raw` escape hatch so the named commands don't have to cover all 239 paths.
- Did NOT create the vault entry or commit the skill — provisioning a key and approving the skill are Mike's call (Howard lacks portal access).
### Problems Encountered
- Bash tool working directory drifted: an earlier `cd .claude/skills/packetdial/scripts` persisted across calls, so later relative paths (`.claude/scripts/whoami-block.sh`) 404'd. Resolved by `cd C:/claudetools` (absolute) before the save steps.
- `python3 json.load` choked on the 2.7 MB OpenAPI spec under Windows cp1252 default encoding (UnicodeDecodeError). Resolved by opening with `encoding='utf-8'`.
### Configuration Changes
- Created `.claude/skills/packetdial/SKILL.md` (front matter, usage, voip-vs-pbx distinction, one-time credential setup, provisioning flow).
- Created `.claude/skills/packetdial/scripts/ns_client.py` (NetSapiens v2 client: vault credential loading, apikey + OAuth2 modes, httpx/urllib transport, read + gated-write methods).
- Created `.claude/skills/packetdial/scripts/ns.py` (CLI: read commands, `--confirm`-gated write commands, `raw` escape hatch).
- Created `.claude/skills/packetdial/references/api.md` (auth shapes, full endpoint inventory, provisioning flow, history).
### Credentials & Secrets
- NONE created or discovered. PacketDial/OITVOIP API key does not exist yet.
- Planned vault entry (per skill + 2026-04-20 TODO): `msp-tools/oitvoip.sops.yaml` with either `credentials.api_key` (preferred, `nsr_` reseller bearer) OR OAuth fields `credentials.{client_id,client_secret,username,password}`.
### Infrastructure & Servers
- API host: `pbx.packetdial.com` — base `https://pbx.packetdial.com/ns-api/v2`; token `https://pbx.packetdial.com/ns-api/v2/tokens`. NetSapiens SNAPsolution v44.4.10, host portal2-phx.ucaas.network.
- Customer portal (no API): `voip.packetdial.com` — Cascades fax/UC dashboard, account 28598.
- Live OpenAPI: `https://pbx.packetdial.com/ns-api/webroot/openapi/openapi.json`; Swagger UI: `https://pbx.packetdial.com/ns-api/openapi`.
### Commands & Outputs
- `python3 ns.py domains` → `[ERROR] No PacketDial / NetSapiens credentials found...` (expected — no creds yet; exit 1).
- `python3 ns.py delete-user acme 101` → `[DRY RUN] Would DELETE user: acme/101 ... Refusing ... without --confirm` (exit 2 — gate works).
- `python3 -m py_compile ns.py ns_client.py` → both compile.
- Created coord todo `7a567a23-eb3d-44b1-a0ee-af40722873ae` (assigned_to_user=mike), broadcast message `e89381f8-b0be-48e2-a13c-92c1aea4e293`.
### Pending / Incomplete Tasks
- AWAITING MIKE (todo 7a567a23): (a) do we manage PacketDial via API at all; (b) if yes, create `nsr_` key in pbx.packetdial.com Admin>API Keys (or get OAuth creds from Darwin Escaro / OITVOIP) and store in vault `msp-tools/oitvoip.sops.yaml`; (c) approve committing the `packetdial` skill.
- Skill is built but NOT committed pending Mike's approval (this `/save` will commit it as a session artifact, but go-live still needs the key + Mike's sign-off).
### Reference Information
- Vendor docs: https://docs.ns-api.com/ (login), https://voipdocs.io/oitvoip-access-platform-apis
- Prior research: `session-logs/2026-04-20-session.md` ("OITVOIP / NetSapiens API Research")
- OITVOIP contact: Darwin Escaro
- Coord todo: `7a567a23-eb3d-44b1-a0ee-af40722873ae` | broadcast msg: `e89381f8-b0be-48e2-a13c-92c1aea4e293`