From e695436fb364446c8b18330d5cb22e4661a4c991 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Thu, 28 May 2026 19:49:41 +0530 Subject: [PATCH] fix: fix inbound for Cloudonix with softphone --- api/services/telephony/providers/cloudonix/provider.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/services/telephony/providers/cloudonix/provider.py b/api/services/telephony/providers/cloudonix/provider.py index 28ebcea..5ea9c00 100644 --- a/api/services/telephony/providers/cloudonix/provider.py +++ b/api/services/telephony/providers/cloudonix/provider.py @@ -699,12 +699,16 @@ class CloudonixProvider(TelephonyProvider): if "Twilio-AccountSid" in trunk_headers: underlying_provider = "twilio" + direction = webhook_data.get("Direction", "inbound").lower() + if direction in {"inbound", "subscriber"}: + direction = "inbound" + return NormalizedInboundData( provider=CloudonixProvider.PROVIDER_NAME, call_id=call_id, from_number=webhook_data.get("From", ""), to_number=webhook_data.get("To", ""), - direction=webhook_data.get("Direction", "inbound").lower(), + direction=direction, call_status=webhook_data.get("CallStatus", "in-progress"), account_id=account_id, from_country=webhook_data.get("FromCountry"),