Skip to main content

Polycom Vvx

@shrug/polycom-vvxv2026.09.30.1· 24d agoBEHAVIORS
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.

02Behaviors1
@shrug/polycom-vvx/phonev2026.09.23.1polycom-vvx.ts

Global Arguments

ArgumentTypeDescription
phoneHoststringPhone IP/host — the REST + push target (e.g. phone.example.test).
adminUserstringHTTP Basic user for the REST API (Poly default 'Polycom').
adminPasswordstringWeb Config ADMIN password (also the REST password). CEL vault ref →
pushUserstringPush (digest) user for the /push channel.
pushPasswordstringPush (digest) password. CEL vault ref → vault.get("vvx","<phone>/push").
phoneCaCertstringThe phone's self-signed TLS cert (PEM) to PIN trust to -- REST/push then
serveBaseUrlstringThe render/serve daemon URL the phone points its mb.*/event at
grafanaModelstringGrafana source model instance (@keeb/grafana/instance) whose recorded
grafanaRepoDirstringCross-repo path where the grafana model lives (for the compose workflow).
linestringSIP 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
ArgumentTypeDescription
namesarrayConfig parameter names to read.
fn getForward(line?: string)
Read the local call-forward (divert.*) config for the line — the audit leg.
ArgumentTypeDescription
line?stringRegistration 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
ArgumentTypeDescription
deststringFull SIP address, e.g. NUM@sip.example.test.
line?stringLine index (defaults to globalArgs.line).
confirmbooleantrue to actually place the call.
fn endCall(ref: string, confirm: boolean)
POST callctrl/endCall {Ref:<CallHandle>} — end the active call (Ref from
ArgumentTypeDescription
refstringCallHandle from callStatus.
confirmbooleantrue to actually end the call.
fn configSet(values: record, confirm: boolean)
POST mgmt/config/set {data:{param:value}} — FLAT body required (nested
ArgumentTypeDescription
valuesrecordFlat param->value map.
confirmbooleantrue 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
ArgumentTypeDescription
line?stringRegistration index (defaults to globalArgs.line).
busy?stringForward-on-busy target; '' clears+disables.
noanswer?stringForward-on-no-answer target; '' clears.
naTimeout?unionRing seconds before the no-answer forward fires.
confirmbooleantrue to apply the writes.
fn simulateKeyEvent(keys: array, paceMs: number, confirm: boolean)
POST mgmt/simulateKeyEvent {Type:Tap,KeyName} — drive the on-device UI.
ArgumentTypeDescription
keysarrayOrdered KeyNames to tap (see VALID_KEYS).
paceMsnumberDelay between taps (spec §8, ~0.9s).
confirmbooleantrue to actually send taps.
fn reboot(confirm: boolean)
POST mgmt/safeRestart {} — restart the phone app/UCS (~90-120s down).
ArgumentTypeDescription
confirmbooleantrue 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
ArgumentTypeDescription
uri?stringURI push target (a path on the daemon).
message?stringInline content push text (<=1KB).
criticalbooleantrue == interrupt-now priority.
fn setDisplay(screen: string, critical: boolean)
Swap the phone's displayed screen: push a URI pointing mb at
ArgumentTypeDescription
screenstringScreen name served by the daemon at /s/<screen>.
criticalbooleantrue == interrupt-now priority.
fn composeIdleSnapshot(queryResults: record, seriesByProvider?: record, epoch?: number)
Compose the idle-display snapshot (spec §5): run the declarative
ArgumentTypeDescription
queryResultsrecordRecorded Grafana query results keyed by dataName; each has a
seriesByProvider?recordDirect pre-parsed series keyed by provider id (test/override seam);
epoch?numberInjectable 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