From 6c4830cb5e45af57b9e89e3c8c87642110263c8a Mon Sep 17 00:00:00 2001 From: Sabiha Khan <87858386+chewwbaka@users.noreply.github.com> Date: Thu, 30 Apr 2026 11:54:12 +0530 Subject: [PATCH] fix: api trigger for telnyx & cloudonix (#258) --- api/routes/public_agent.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api/routes/public_agent.py b/api/routes/public_agent.py index 7bf372c..0763e9b 100644 --- a/api/routes/public_agent.py +++ b/api/routes/public_agent.py @@ -174,12 +174,17 @@ async def _initiate_call( f"&organization_id={trigger.organization_id}" ) - # 10. Initiate call via telephony provider + # 10. Initiate call via telephony provider. workflow_id and user_id are + # required by providers that build the media WebSocket URL at dial time + # (e.g. Telnyx, Cloudonix); without them the URL contains "None/None" and + # the stream connection fails. try: await provider.initiate_call( to_number=request.phone_number, webhook_url=webhook_url, workflow_run_id=workflow_run.id, + workflow_id=trigger.workflow_id, + user_id=api_key.created_by, ) except Exception as e: logger.warning(