Polycom Vvx
@shrug/polycom-vvxv2026.09.30.1
01README
Polycom VVX phone control + real-data idle display. One model type (@shrug/polycom-vvx/phone) with typed methods 1:1 to the verified REST/push surface (discover, dial, call-forward, config get/set, UI drive, screen capture, reboot) — serialized, dry-run-by-default writes, cert-pinned TLS — plus composeIdleSnapshot, a typed-primitive interpreter that turns declarative providers + recorded Grafana data into the {tiles,rows} snapshot the render daemon serves. Ships its companion render/serve daemon (display plane the phone polls) with token-auth'd endpoints. Vaulted Basic/Digest creds; single injectable fetch seam.
02Behaviors
@shrug/polycom-vvx/phonev2026.09.23.1polycom-vvx.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| phoneHost | string | Phone IP/host — the REST + push target (e.g. phone.example.test). |
| adminUser | string | HTTP Basic user for the REST API (Poly default 'Polycom'). |
| adminPassword | string | Web Config ADMIN password (also the REST password). CEL vault ref → |
| pushUser | string | Push (digest) user for the /push channel. |
| pushPassword | string | Push (digest) password. CEL vault ref → vault.get("vvx","<phone>/push"). |
| phoneCaCert | string | The phone's self-signed TLS cert (PEM) to PIN trust to -- REST/push then |
| serveBaseUrl | string | The render/serve daemon URL the phone points its mb.*/event at |
| grafanaModel | string | Grafana source model instance (@keeb/grafana/instance) whose recorded |
| grafanaRepoDir | string | Cross-repo path where the grafana model lives (for the compose workflow). |
| line | string | SIP line/registration index for dial + call-forward (default '1'). |
fn discover()
GET mgmt/device/info — model/fw/ip/mac/uptime (reboot detector + health probe).
fn callStatus()
GET webCallControl/callStatus — the 'is a call up?' check (4007 == no active call).
fn configGet(names: array)
POST mgmt/config/get {data:[names]} — per-param {Value,Source}; unknown
| Argument | Type | Description |
|---|---|---|
| names | array | Config parameter names to read. |
fn getForward(line?: string)
Read the local call-forward (divert.*) config for the line — the audit leg.
| Argument | Type | Description |
|---|---|---|
| line? | string | Registration index (defaults to globalArgs.line). |
fn captureScreen()
auth.htm -> session cookie -> GET /captureScreen/mainScreen — the real
fn dial(dest: string, line?: string, confirm: boolean)
POST callctrl/dial — place a live call. Dest MUST be a full SIP addr
| Argument | Type | Description |
|---|---|---|
| dest | string | Full SIP address, e.g. NUM@sip.example.test. |
| line? | string | Line index (defaults to globalArgs.line). |
| confirm | boolean | true to actually place the call. |
fn endCall(ref: string, confirm: boolean)
POST callctrl/endCall {Ref:<CallHandle>} — end the active call (Ref from
| Argument | Type | Description |
|---|---|---|
| ref | string | CallHandle from callStatus. |
| confirm | boolean | true to actually end the call. |
fn configSet(values: record, confirm: boolean)
POST mgmt/config/set {data:{param:value}} — FLAT body required (nested
| Argument | Type | Description |
|---|---|---|
| values | record | Flat param->value map. |
| confirm | boolean | true to actually write. |
fn reconcileForward(line?: string, busy?: string, noanswer?: string, naTimeout?: union, confirm: boolean)
Reconcile local call-forward (divert.*) to intent. Reads current config
| Argument | Type | Description |
|---|---|---|
| line? | string | Registration index (defaults to globalArgs.line). |
| busy? | string | Forward-on-busy target; '' clears+disables. |
| noanswer? | string | Forward-on-no-answer target; '' clears. |
| naTimeout? | union | Ring seconds before the no-answer forward fires. |
| confirm | boolean | true to apply the writes. |
fn simulateKeyEvent(keys: array, paceMs: number, confirm: boolean)
POST mgmt/simulateKeyEvent {Type:Tap,KeyName} — drive the on-device UI.
| Argument | Type | Description |
|---|---|---|
| keys | array | Ordered KeyNames to tap (see VALID_KEYS). |
| paceMs | number | Delay between taps (spec §8, ~0.9s). |
| confirm | boolean | true to actually send taps. |
fn reboot(confirm: boolean)
POST mgmt/safeRestart {} — restart the phone app/UCS (~90-120s down).
| Argument | Type | Description |
|---|---|---|
| confirm | boolean | true to actually reboot. |
fn pushAlert(uri?: string, message?: string, critical: boolean)
Push an alert to the phone via the /push (DIGEST) channel — a URI push
| Argument | Type | Description |
|---|---|---|
| uri? | string | URI push target (a path on the daemon). |
| message? | string | Inline content push text (<=1KB). |
| critical | boolean | true == interrupt-now priority. |
fn setDisplay(screen: string, critical: boolean)
Swap the phone's displayed screen: push a URI pointing mb at
| Argument | Type | Description |
|---|---|---|
| screen | string | Screen name served by the daemon at /s/<screen>. |
| critical | boolean | true == interrupt-now priority. |
fn composeIdleSnapshot(queryResults: record, seriesByProvider?: record, epoch?: number)
Compose the idle-display snapshot (spec §5): run the declarative
| Argument | Type | Description |
|---|---|---|
| queryResults | record | Recorded Grafana query results keyed by dataName; each has a |
| seriesByProvider? | record | Direct pre-parsed series keyed by provider id (test/override seam); |
| epoch? | number | Injectable epoch (seconds) for determinism. |
Resources
deviceInfo(infinite)— Device info from discover (mgmt/device/info) — reboot/health probe.
callStatus(infinite)— Active-call status (webCallControl/callStatus) + dial/endCall records.
configReadback(infinite)— Config get/set read-back (mgmt/config/*) incl. dry-run previews.
forwardAudit(infinite)— Call-forward (divert.*) audit + dry-run/applied reconcile record.
idleSnapshot(infinite)— The composed idle-display snapshot {tiles,rows,degraded,epoch} (spec §5).
pushRun(infinite)— Audit of pushes / display swaps / key events / reboots (idempotency + debug).
Files
screenCapture(image/bmp)— The phone's 320x240 framebuffer BMP from captureScreen (state oracle).
03Stats
A
93 / 100
Downloads
23
Archive size
51.1 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License1/2partial
no SPDX license declared
- Verified public repository2/2earned
04Platforms
05Labels