Send AI TTS audio to live caller during auto-respond

The auto-respond function played AI TTS to the local Loopback channel
but didn't send it over WebSocket to the live caller in the browser.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-05 16:53:41 -07:00
parent eaedc4214b
commit 97d37f3381

View File

@@ -1022,6 +1022,13 @@ async def _check_ai_auto_respond(real_caller_text: str, real_caller_name: str):
) )
thread.start() thread.start()
# Also send to active real caller so they hear the AI
if session.active_real_caller:
caller_id = session.active_real_caller["caller_id"]
asyncio.create_task(
caller_service.send_audio_to_caller(caller_id, audio_bytes, 24000)
)
# --- Follow-Up & Session Control Endpoints --- # --- Follow-Up & Session Control Endpoints ---