From 0908df73f8fe87ec2b15e4c4386162d19de5fa69 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 27 May 2026 14:54:25 +0530 Subject: [PATCH] fix: use NEXT_PUBLIC_BACKEND_URL if provided --- .../telephony-configurations/[configId]/page.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/src/app/telephony-configurations/[configId]/page.tsx b/ui/src/app/telephony-configurations/[configId]/page.tsx index 565b5f4..e1aa6dc 100644 --- a/ui/src/app/telephony-configurations/[configId]/page.tsx +++ b/ui/src/app/telephony-configurations/[configId]/page.tsx @@ -57,6 +57,15 @@ import { } from "@/components/ui/table"; import { useAuth } from "@/lib/auth"; +const INBOUND_WEBHOOK_PATH = "/api/v1/telephony/inbound/run"; + +function getInboundWebhookUrl(): string { + const backendUrl = + process.env.NEXT_PUBLIC_BACKEND_URL || + (typeof window !== "undefined" ? window.location.origin : ""); + return `${backendUrl}${INBOUND_WEBHOOK_PATH}`; +} + export default function TelephonyConfigurationDetailPage() { const router = useRouter(); const params = useParams<{ configId: string }>(); @@ -255,16 +264,17 @@ export default function TelephonyConfigurationDetailPage() {