Skip to content

feat(telnyx): auto-provisioned Media Streaming transport (API key only)#1

Closed
lucasassisrosa wants to merge 1 commit into
feat/telnyx-framework-providerfrom
feat/telnyx-media-streaming
Closed

feat(telnyx): auto-provisioned Media Streaming transport (API key only)#1
lucasassisrosa wants to merge 1 commit into
feat/telnyx-framework-providerfrom
feat/telnyx-media-streaming

Conversation

@lucasassisrosa

Copy link
Copy Markdown
Collaborator

Separate transport track for the Telnyx framework provider, stacked on ServiceNow#173.

Reach the AI Assistant via Call Control + Media Streaming WebSocket (bidirectional PCMU) instead of anonymous WebRTC — no ICE/DTLS/SRTP, so the b2bua-rtc media interop bug (VSDK-277) does not apply.

You provide only a Telnyx API key. eva.assistant.telnyx_provisioning discovers or creates everything else (Call Control connection, an idle caller-ID number, outbound voice profile) — reuse-first, idempotent, buys nothing. It emits the EVA_MODEL__S2S_PARAMS and telnyx_server auto-selects the media-streaming transport.

docs/telnyx_media_streaming.md explains the flow and the one operational difference from the WebRTC path: public ingress (Telnyx must reach EVA for call webhooks + the media WebSocket → tunnel or Ingress).

Exercised against a live account (inspect + --provision). 5 unit tests, 211 pass, ruff clean.

🤖 Generated with Claude Code

…an API key

Separate track from the direct-WebRTC path: reach the AI Assistant via a Call Control
outbound call + Media Streaming WebSocket (bidirectional PCMU) instead of anonymous WebRTC.
No ICE/DTLS/SRTP, so the b2bua-rtc media interop bug (VSDK-277) does not apply. The
TelnyxCallControlTransport and its selection already exist on this branch; this adds the
piece that was missing: turning a bare API key into a working configuration.

eva.assistant.telnyx_provisioning:
  - Discovers or creates every account resource the transport needs: a Call Control
    Application (the connection, carrying the webhook URL + outbound settings), an idle
    phone number for caller ID, and an outbound voice profile.
  - Reuse-first and idempotent: reuses an existing profile, an existing eva-media-streaming
    connection, and an UNATTACHED active number (so it never disturbs a number already
    routing traffic). Re-running is a no-op; a changed public URL re-points the webhook.
  - Read-only inspect by default; creation gated behind --provision. Buys nothing.
  - Emits the EVA_MODEL__S2S_PARAMS to drop into .env; telnyx_server then selects the
    media-streaming transport automatically (_use_call_control keys on connection_id +
    webhook_base_url).

Exercised against a live account: inspect correctly reports the missing connection;
--provision created a Call Control app + attached an idle US number + reused the existing
outbound profile, all free.

docs/telnyx_media_streaming.md explains the flow and, in particular, PUBLIC INGRESS: unlike
the outbound-only WebRTC path, Media Streaming requires Telnyx to connect back to EVA (call
webhooks + the media WebSocket), so EVA needs a publicly reachable HTTPS/WSS URL -- a tunnel
(cloudflared/ngrok) for a laptop/locked-down pod, or a real Ingress/LoadBalancer for a
deployment.

5 unit tests (mocked httpx). 211 tests pass, ruff clean.
@lucasassisrosa

Copy link
Copy Markdown
Collaborator Author

Reopening against ServiceNow/eva (upstream), stacked on ServiceNow#173.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant