agents
agents copied to clipboard
How to prevent the worker from shutting down on its own and outbound call disconnection?
I am facing one issue as when i make the outbound call call getting triggered when i pick up the call intro audio is played after that when i am speaking not able to respond and participant getting disconnected automatically after 25 sec of call and call getting disconnected automatically
Can you share steps or example that can reproduce this issue?
@longcw please check this log
- DEV livekit.agents - Watching /root/sip_twilio/voice-agent 2025-06-30 11:59:16,704 - DEBUG asyncio - Using selector: EpollSelector 2025-06-30 11:59:16,709 - INFO livekit.agents - starting worker {"version": "1.1.1", "rtc-version": "1.0.8"} 2025-06-30 11:59:16,709 - INFO livekit.agents - preloading plugins {"packages": ["livekit.plugins.openai", "livekit.plugins.silero", "livekit.plugins.deepgram", "livekit.plugins.cartesia"]} 2025-06-30 11:59:16,711 - INFO livekit.agents - see tracing information at http://localhost:33279/debug 2025-06-30 11:59:16,726 - INFO livekit.agents - registered worker {"id": "AW_HGmM5ewHBN4Y", "url": "wss://livekit.slingo.ai", "region": "", "protocol": 15} 2025-06-30 11:59:32,940 - INFO livekit.agents - received job request {"job_id": "AJ_QpScvRuh9GJN", "dispatch_id": "AD_KZmBhEmJVXN5", "room_name": "my-room21", "agent_name": "", "resuming": false} 2025-06-30 11:59:33,650 - INFO livekit.agents - initializing process {"pid": 19571} 2025-06-30 11:59:33,658 - INFO livekit.agents - process initialized {"pid": 19571, "elapsed_time": 0.01} 2025-06-30 11:59:33,658 - DEBUG asyncio - Using selector: EpollSelector {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 11:59:34,080 - calling-agent - INFO - 🚀 === STARTING VOICE AGENT SESSION === 2025-06-30 11:59:34,080 - calling-agent - INFO - Agent: SalesAgent 2025-06-30 11:59:34,080 - calling-agent - INFO - Room: my-room21 2025-06-30 11:59:34,080 - INFO agents - SalesAgent 'Akash' initialized with enhanced VAD settings {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 11:59:34,080 - calling-agent - INFO - 🚀 === STARTING VOICE AGENT SESSION === 2025-06-30 11:59:34,080 - INFO calling-agent - 🚀 === STARTING VOICE AGENT SESSION === {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 11:59:34,080 - calling-agent - INFO - Agent: SalesAgent 2025-06-30 11:59:34,080 - INFO calling-agent - Agent: SalesAgent {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 11:59:34,080 - calling-agent - INFO - Room: my-room21 2025-06-30 11:59:34,080 - INFO calling-agent - Room: my-room21 {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 11:59:34,089 - DEBUG livekit.agents - http_session(): creating a new httpclient ctx {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 11:59:34,091 - INFO agents - SalesAgent 'Akash' session started - generating initial greeting {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 11:59:34,091 - DEBUG livekit.agents - start reading stream {"participant": "phone_user", "source": "SOURCE_MICROPHONE", "pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 11:59:35,182 - INFO livekit.agents - LLM metrics: ttft=0.33, input_tokens=601, cached_input_tokens=0, output_tokens=422, tokens_per_second=388.70 {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 11:59:37,427 - INFO livekit.agents - TTS metrics: ttfb=0.5966716620605439, audio_duration=114.42 {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 11:59:39,108 - INFO livekit.agents - STT metrics: audio_duration=5.00 {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 11:59:44,169 - INFO livekit.agents - STT metrics: audio_duration=5.05 {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 11:59:49,189 - INFO livekit.agents - STT metrics: audio_duration=5.05 {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 11:59:54,219 - INFO livekit.agents - STT metrics: audio_duration=5.00 {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 11:59:59,239 - INFO livekit.agents - STT metrics: audio_duration=5.05 {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 12:00:02,947 - DEBUG livekit.agents - closing agent session due to participant disconnect {"participant": "phone_user", "reason": "CLIENT_INITIATED", "pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 12:00:02,948 - DEBUG livekit.agents - stream closed {"participant": "phone_user", "source": "SOURCE_MICROPHONE", "pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 12:00:02,953 - WARNING livekit.agents - rotate_segment called while previous segment is still being rotated {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 12:00:02,957 - DEBUG livekit.agents - session closed {"reason": "participant_disconnected", "error": null, "pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 12:00:22,982 - DEBUG livekit.agents - shutting down job task {"reason": "", "user_initiated": false, "pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 12:00:22,983 - INFO livekit.agents - process exiting {"reason": "", "pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 12:00:22,984 - calling-agent - INFO - 📊 === SESSION USAGE SUMMARY === 2025-06-30 12:00:22,984 - calling-agent - INFO - Usage Summary: UsageSummary(llm_prompt_tokens=601, llm_prompt_cached_tokens=0, llm_completion_tokens=422, tts_characters_count=1943, stt_audio_duration=25.14999999999995) 2025-06-30 12:00:22,984 - calling-agent - INFO - 📊 === SESSION USAGE SUMMARY === 2025-06-30 12:00:22,984 - INFO calling-agent - 📊 === SESSION USAGE SUMMARY === {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 12:00:22,984 - calling-agent - INFO - Usage Summary: UsageSummary(llm_prompt_tokens=601, llm_prompt_cached_tokens=0, llm_completion_tokens=422, tts_characters_count=1943, stt_audio_duration=25.14999999999995) 2025-06-30 12:00:22,984 - INFO calling-agent - Usage Summary: UsageSummary(llm_prompt_tokens=601, llm_prompt_cached_tokens=0, llm_completion_tokens=422, tts_characters_count=1943, stt_audio_duration=25.14999999999995) {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"} 2025-06-30 12:00:22,984 - DEBUG livekit.agents - http_session(): closing the httpclient ctx {"pid": 19571, "job_id": "AJ_QpScvRuh9GJN"}
duplicates https://github.com/livekit/agents/issues/2759