Skip to content

[codex] Add Twilio ConversationRelay voice channel#303

Draft
furukama wants to merge 1 commit intomainfrom
codex/twilio-voice-channel
Draft

[codex] Add Twilio ConversationRelay voice channel#303
furukama wants to merge 1 commit intomainfrom
codex/twilio-voice-channel

Conversation

@furukama
Copy link
Copy Markdown
Contributor

Summary

  • add a new voice channel powered by Twilio ConversationRelay, including webhook handling, websocket relay parsing, per-call session lifecycle, and Twilio request validation
  • wire voice into gateway startup, shutdown, status reporting, session/channel inference, and runtime config/secret resolution
  • cover the new behavior with unit and gateway tests, including custom webhook path routing and shared-secret-backed Twilio auth token handling

Why

HybridClaw did not have a voice channel implementation. This adds an inbound Twilio voice path that fits the existing text-channel gateway model while keeping Twilio-specific transport handling isolated under src/channels/voice/.

Impact

Users can enable a Twilio-backed voice channel through runtime config and handle live phone conversations through the existing gateway pipeline. The gateway also exposes clearer voice status and respects secret-backed Twilio credentials and configurable voice webhook paths.

Root Cause

There was no native voice transport, and the follow-up review fixes addressed two boundary issues discovered during implementation: voice route dispatch was hard-coded to /voice, and startup/signature validation bypassed the shared resolved Twilio auth token path.

Validation

  • npm run typecheck
  • npm run lint
  • npx vitest run --configLoader runner --config vitest.unit.config.ts tests/gateway-main.test.ts tests/gateway-http-server.test.ts tests/runtime-config.secret-refs.test.ts tests/voice.webhook.test.ts tests/voice.security.test.ts tests/voice.conversation-relay.test.ts tests/voice.runtime.test.ts
  • npx vitest run --configLoader runner --config vitest.unit.config.ts tests/channel-registry.test.ts tests/session-reset.test.ts tests/runtime-config.secret-refs.test.ts tests/voice.webhook.test.ts tests/voice.security.test.ts tests/voice.conversation-relay.test.ts tests/gateway-main.test.ts tests/gateway-status.test.ts

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