Skip to content

feat(telnyx): keep TeXML call timing and relayed annotations as tags - #9

Merged
howethomas merged 1 commit into
mainfrom
feat/texml-call-annotations
Sep 25, 2026
Merged

howethomas merged 1 commit into
mainfrom
feat/texml-call-annotations

Conversation

@howethomas

Copy link
Copy Markdown
Contributor

What this changes

The TeXML recordingStatusCallback handler keeps two more pieces of the callback, and the builder emits them as vCon tags next to the existing Telnyx IDs.

  • Call timing. CallInitiatedAt and RecordingStartTime become the call_initiated_at and recording_started_at tags. The gap between them is the ringback, which is where a pre-answer recording notice plays. That makes the two timestamps the evidence a consent check needs, since the notice itself isn't in a recording that starts at answer.
  • Relayed annotations. A service that relays the callback to this adapter can add Annotation-<name> form fields, for example which notice it played and that file's hash. Each becomes an annotation_<name> tag. Names are limited to [A-Za-z0-9_]{1,64}, and anything else is dropped.

Trust

Annotations are exactly as trusted as the rest of the TeXML form. That path is unsigned, as the existing docstring notes, so deployments should keep the endpoint reachable only by the relaying service.

Testing

pytest tests: 486 passed. black --check . and ruff check . are clean. The TeXML test now asserts the timing tags, and a new test covers annotation passthrough and dropping invalid names.

🤖 Generated with Claude Code

The TeXML recording callback carries CallInitiatedAt and RecordingStartTime.
The gap between them is the ringback, where a pre-answer recording notice
plays, so a downstream consent check needs both. They now become the
call_initiated_at and recording_started_at tags.

A service that relays the callback can add Annotation-<name> form fields,
for example which notice it played and that file's hash. Each becomes an
annotation_<name> tag. Names are limited to [A-Za-z0-9_]{1,64}; others are
dropped. They carry the same trust as the rest of the unsigned TeXML form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@howethomas
howethomas merged commit e59a629 into main Sep 25, 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