Skip to content

Emit a recording-set dialog for multi-recording SignalWire calls - #17

Merged
howethomas merged 1 commit into
mainfrom
thomashowe/con-1105-recording-set
Sep 26, 2026
Merged

howethomas merged 1 commit into
mainfrom
thomashowe/con-1105-recording-set

Conversation

@howethomas

Copy link
Copy Markdown
Contributor

Emits a recording-set dialog for SignalWire calls with more than one recording (draft-ietf-vcon-vcon-core-04 §4.3.1.2, 4.3.6, 4.3.7).

SignalWire is the one adapter here that already puts several recordings of a call into one vCon. They were flat sibling dialogs with nothing linking them.

Changes

  • When a call has more than one recording, one recording-set dialog is appended after the segments, so existing indices used by attachments and analysis do not move. It carries recordings (the segment indices), both call parties, the earliest segment start, and a whole-call duration only when every segment has a start and a duration.
  • Each segment gets a recording_set back-index.
  • The set dialog carries no content fields.
  • Single-recording calls are unchanged.
  • recording-set is added to the vcon library's Dialog.VALID_TYPES at import, since the current library release rejects it.
  • WG schema vendored under tests/schema/; jsonschema added to the dev extra.

Other platforms

Twilio, Telnyx, Bandwidth, Asterisk and FreeSWITCH do produce segmented recordings, but each arrives as a separate webhook and becomes its own vCon. A recording-set there first needs correlation across webhook deliveries.

Found, not fixed

With download_recordings=False, a SignalWire dialog has a url but no content_hash, which the WG schema rejects. The new schema tests configure a publisher to avoid it.

Tests

677 passed (baseline 665); black and ruff clean.

🤖 Generated with Claude Code

SignalWire's poller can return more than one Recording object for a
single call; the builder already emitted one "recording" dialog per
recording but with no linkage between them. Per
draft-ietf-vcon-vcon-core-04 Sec. 4.3.1.2/4.3.6/4.3.7, group these
under a "recording-set" dialog: its recordings array indexes the
member recording dialogs, and its own start/duration/parties describe
the call as a whole; each recording dialog gets a recording_set
back-reference. Single-recording calls are unchanged (no set dialog).

The installed vcon-lib (pypi vcon 0.9.6) predates the "recording-set"
type, so it's added to Dialog.VALID_TYPES locally; recordings/
recording_set pass through vcon-lib's default (non-strict) property
handling unfiltered.

Vendors the WG JSON Schema into tests/schema/ and adds jsonschema as a
dev dependency so the new dialog shape (and the unchanged single-
segment shape) can be validated directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@howethomas
howethomas merged commit 8d6a2c0 into main Sep 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant