Skip to content

fix(ai_agents): align Telnyx SIP example with Call Control events#2181

Open
a692570 wants to merge 1 commit into
TEN-framework:mainfrom
a692570:codex/fix-telnyx-call-control-events
Open

fix(ai_agents): align Telnyx SIP example with Call Control events#2181
a692570 wants to merge 1 commit into
TEN-framework:mainfrom
a692570:codex/fix-telnyx-call-control-events

Conversation

@a692570
Copy link
Copy Markdown
Contributor

@a692570 a692570 commented Jun 3, 2026

Summary

  • use Telnyx Call Control REST endpoints directly for dial, answer, and hangup
  • parse Telnyx webhook event payloads and update sessions from call_control_id
  • set stream_codec and stream_bidirectional_codec to PCMU so inbound and outbound media match the example's mu-law audio conversion
  • send bidirectional media frames in the Telnyx media shape without Twilio streamSid or extra stream_id fields
  • encode Call Control command paths
  • remove the unused Telnyx Python SDK dependency and align README API examples with the implemented routes
  • add focused tests for Telnyx URL building, webhook parsing, session updates, dial payloads, cleanup hangup behavior, and outbound media payload shape

Testing

  • python3 ai_agents/agents/examples/voice-assistant-sip-telnyx/tenapp/test_telnyx_call_control_events.py
  • python3 -m py_compile ai_agents/agents/examples/voice-assistant-sip-telnyx/tenapp/ten_packages/extension/main_python/server.py ai_agents/agents/examples/voice-assistant-sip-telnyx/tenapp/ten_packages/extension/main_python/extension.py ai_agents/agents/examples/voice-assistant-sip-telnyx/tenapp/test_telnyx_call_control_events.py
  • git diff --check

Secret scan

  • scanned the PR diff for key, token, password, bearer, authorization, private key, GitHub token, Slack token, AWS key, and Telnyx key patterns
  • matches were only code field names and the test placeholder test-key

@a692570 a692570 changed the title Align Telnyx SIP example with Call Control events fix(ai_agents): align Telnyx SIP example with Call Control events Jun 3, 2026
@a692570 a692570 force-pushed the codex/fix-telnyx-call-control-events branch from 7cf7bf0 to db4274b Compare June 3, 2026 04:05
@a692570 a692570 changed the title fix(ai_agents): align Telnyx SIP example with Call Control events Fix Telnyx Call Control handling in SIP example Jun 3, 2026
@a692570 a692570 changed the title Fix Telnyx Call Control handling in SIP example fix(ai_agents): align Telnyx SIP example with Call Control events Jun 3, 2026
@a692570 a692570 force-pushed the codex/fix-telnyx-call-control-events branch from db4274b to 5730d3d Compare June 3, 2026 04:26
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