From a7de6bfb0435a54f2c7e3c00c0d1f9e3fee9eed0 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Mon, 29 Dec 2025 22:47:18 -0500 Subject: [PATCH] Fix the calls directory bug --- Dockerfile | 3 +++ app/node_main.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index c933c07..172bb7d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,6 +34,9 @@ EXPOSE 8001 8081 # Create and set up the configuration directory VOLUME ["/configs"] +# Create the calls local cache directory +VOLUME ["/calls"] + # Set the working directory in the container WORKDIR /app diff --git a/app/node_main.py b/app/node_main.py index 82229bd..6f6af6b 100644 --- a/app/node_main.py +++ b/app/node_main.py @@ -247,7 +247,7 @@ async def mqtt_lifecycle_manager(): def upload_audio(call_id): if not AUDIO_BUCKET: return None - local_path = f"/tmp/{call_id}.mp3" + local_path = f"/calls/{call_id}.mp3" if not os.path.exists(local_path): return None try: @@ -278,7 +278,7 @@ async def mqtt_lifecycle_manager(): if response.status_code == 200: data = response.json() - LOGGER.debug(f"Response from OP25 API: {data}") + # LOGGER.debug(f"Response from OP25 API: {data}") current_tgid = 0 current_meta = {} @@ -344,7 +344,7 @@ async def mqtt_lifecycle_manager(): stream_url = get_current_stream_url() recorder_proc = await asyncio.create_subprocess_exec( "ffmpeg", "-i", stream_url, "-y", "-t", "300", - f"/tmp/{current_call_id}.mp3", + f"/calls/{current_call_id}.mp3", stdout=asyncio.subprocess.DEVNULL, stderr=asyncio.subprocess.DEVNULL )