Skip to content

feat(voice-call): add Telnyx realtime media streams#79324

Closed
ifthikar-razik wants to merge 1 commit into
openclaw:mainfrom
ifthikar-razik:ifthikar/aif-126-enhanced-voice-call-plugin-telnyx-first-voice-ai
Closed

feat(voice-call): add Telnyx realtime media streams#79324
ifthikar-razik wants to merge 1 commit into
openclaw:mainfrom
ifthikar-razik:ifthikar/aif-126-enhanced-voice-call-plugin-telnyx-first-voice-ai

Conversation

@ifthikar-razik

Copy link
Copy Markdown

Summary

  • add Telnyx Call Control streaming_start support for realtime voice bridges
  • allow realtime.enabled with Telnyx while preserving Twilio, Plivo, mock, and dev fallback behavior
  • normalize Telnyx realtime WebSocket start frames and outbound media pacing for bidirectional PCMU/RTP streams
  • document Telnyx as the recommended production Voice Call provider and add coverage for Telnyx realtime paths

Validation

  • npm test -- extensions/voice-call/src/config.test.ts extensions/voice-call/src/providers/telnyx.test.ts extensions/voice-call/src/webhook/realtime-handler.test.ts
  • npm run lint -- extensions/voice-call/index.ts extensions/voice-call/README.md extensions/voice-call/src/config.ts extensions/voice-call/src/providers/base.ts extensions/voice-call/src/providers/telnyx.ts extensions/voice-call/src/webhook/realtime-handler.ts extensions/voice-call/src/webhook/realtime-audio-pacer.ts extensions/voice-call/src/manager.ts extensions/voice-call/src/runtime.ts extensions/voice-call/src/types.ts extensions/voice-call/src/config.test.ts extensions/voice-call/src/providers/telnyx.test.ts extensions/voice-call/src/webhook/realtime-handler.test.ts
  • npm run format:check -- extensions/voice-call/index.ts extensions/voice-call/README.md extensions/voice-call/src/config.ts extensions/voice-call/src/providers/base.ts extensions/voice-call/src/providers/telnyx.ts extensions/voice-call/src/webhook/realtime-handler.ts extensions/voice-call/src/webhook/realtime-audio-pacer.ts extensions/voice-call/src/manager.ts extensions/voice-call/src/runtime.ts extensions/voice-call/src/types.ts extensions/voice-call/src/config.test.ts extensions/voice-call/src/providers/telnyx.test.ts extensions/voice-call/src/webhook/realtime-handler.test.ts
  • npm run tsgo:test:extensions
  • npm run build

@openclaw-barnacle openclaw-barnacle Bot added channel: voice-call Channel integration: voice-call size: M triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 8, 2026
@clawsweeper

clawsweeper Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

Summary
The PR adds Telnyx realtime media stream support to the Voice Call plugin, including provider stream startup, realtime WebSocket handling, config validation, docs, and tests.

Reproducibility: yes. for the review finding by source inspection: the PR stores provider metadata in the stream token and then reads callerMeta.provider, while the current token consumer still returns only from, to, and direction. No real Telnyx runtime reproduction was provided by the contributor.

Real behavior proof
Needs real behavior proof before merge: Missing: the PR body lists tests/build only and no after-fix Telnyx call proof; the contributor should add redacted screenshot/recording, terminal or live output, logs, or a linked artifact to the PR body for automatic re-review, or ask a maintainer to comment @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, ask a maintainer to comment @clawsweeper re-review.

Next step before merge
Needs contributor real behavior proof and a PR author fix for the token metadata bug; automation should not repair or merge while the proof gate is missing.

Security
Cleared: No concrete security or supply-chain regression found; the diff adds no dependencies or workflow changes and keeps Telnyx API calls on the existing guarded host path.

Review findings

  • [P2] Preserve provider metadata when consuming stream tokens — extensions/voice-call/src/webhook/realtime-handler.ts:624
Review details

Best possible solution:

Preserve provider metadata through stream-token consumption, add focused coverage that Telnyx outbound audio emits Telnyx-shaped media/clear behavior, keep docs/changelog aligned, and require redacted live Telnyx call proof before merge.

Do we have a high-confidence way to reproduce the issue?

Yes for the review finding by source inspection: the PR stores provider metadata in the stream token and then reads callerMeta.provider, while the current token consumer still returns only from, to, and direction. No real Telnyx runtime reproduction was provided by the contributor.

Is this the best way to solve the issue?

No: the direction is plausible, but the current diff is not mergeable because it drops the provider metadata needed to select Telnyx outbound audio framing. The safer solution is to preserve that metadata through consumeStreamToken and cover the outbound Telnyx pacer path.

Full review comments:

  • [P2] Preserve provider metadata when consuming stream tokens — extensions/voice-call/src/webhook/realtime-handler.ts:624
    buildProviderStreamUrl stores provider: "telnyx" in the pending stream token, but consumeStreamToken still returns only from, to, and direction. That leaves callerMeta.provider undefined here, so Telnyx streams use the Twilio-style clear/media/mark frames instead of the Telnyx branch this PR added.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.86

What I checked:

Likely related people:

  • steipete: Recent Telnyx provider fixes, outbound realtime stream fixes, Voice Call refactors, and the original Voice Call parity work all route through this account in GitHub commit history. (role: maintainer and feature-history owner; confidence: high; commits: 42c17adb5e4d, 8a9d02dd82d4, 31d8fdb52587; files: extensions/voice-call/src/providers/telnyx.ts, extensions/voice-call/src/manager.ts, extensions/voice-call/src/webhook/realtime-handler.ts)
  • vincentkoc: Recent commits changed Talk lifecycle logging, diagnostics, and bounded realtime audio pacing around the same realtime handler and pacer paths. (role: recent realtime and audio-path maintainer; confidence: medium; commits: 16321a27b64c, e2501b2d6db2, 7050af56d400; files: extensions/voice-call/src/webhook/realtime-handler.ts, extensions/voice-call/src/webhook/realtime-audio-pacer.ts)
  • scoootscooob: Recent commits added and refined realtime Meet voice agent behavior and the Twilio realtime audio pacer that this PR extends for Telnyx. (role: adjacent realtime voice contributor; confidence: medium; commits: 79dd65e20889, 309ff6bada57, 7fc9a82dca2f; files: extensions/voice-call/src/webhook/realtime-handler.ts, extensions/voice-call/src/webhook/realtime-audio-pacer.ts)

Remaining risk / open question:

  • No after-fix real Telnyx call/WebSocket/audio proof is attached; the PR body only lists local validation commands.
  • The current diff appears to leave Telnyx outbound audio on the Twilio frame branch because token metadata is discarded before callerMeta.provider is read.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 2d1f4f909ed6.

@ifthikar-razik

Copy link
Copy Markdown
Author

Closing this PR because the target repo/format is incorrect. We'll reopen using the correct workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: voice-call Channel integration: voice-call size: M triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant