From 87516887ac7bb137471a49a987039da8471e5099 Mon Sep 17 00:00:00 2001 From: Sabiha Khan Date: Thu, 30 Apr 2026 11:35:32 +0530 Subject: [PATCH] fix: api trigger for telnyx & cloudonix --- 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(