feat(telnyx): auto-provisioned Media Streaming transport (API key only)#1
Closed
lucasassisrosa wants to merge 1 commit into
Closed
feat(telnyx): auto-provisioned Media Streaming transport (API key only)#1lucasassisrosa wants to merge 1 commit into
lucasassisrosa wants to merge 1 commit into
Conversation
…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.
Collaborator
Author
|
Reopening against ServiceNow/eva (upstream), stacked on ServiceNow#173. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_provisioningdiscovers or creates everything else (Call Control connection, an idle caller-ID number, outbound voice profile) — reuse-first, idempotent, buys nothing. It emits theEVA_MODEL__S2S_PARAMSandtelnyx_serverauto-selects the media-streaming transport.docs/telnyx_media_streaming.mdexplains 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