orange-boots-48752
12/10/2025, 1:51 PMtall-airline-16756
12/10/2025, 1:51 PMtall-airline-16756
12/10/2025, 1:52 PMsip.callStatus = active).
Short answer: SIP signaling won’t reliably tell you human vs voicemail. Use audio/behavioral signals instead.
Recommended approaches (pick one or combine):
• Silence / speech-pattern detection
◦ Monitor user_started_speaking / user_ended_speaking events. If no speech occurs for several seconds after sip.callStatus becomes active (e.g., 5–10s), it’s likely voicemail. Quick short interactive speech soon after answer suggests a human.
• Transcription / keyword detection
◦ Transcribe the first few seconds and check for voicemail phrases like “you’ve reached”, “leave a message”, “after the beep”, etc. A match → voicemail.
• LLM / heuristic classifier on initial audio
◦ Run a short classifier on the initial N seconds of audio (silence patterns + transcript). This reduces false positives vs simple silence rules.
Notes:
• wait_until_answered: true (CreateSIPParticipant) returns only after answer but does not distinguish voicemail from a human — both can result in active.
• These methods are probabilistic; combining silence detection + transcription gives the best practical accuracy.
If you’d like, tell me: 1) How you currently receive speech events/transcripts (Agents events or other), and 2) The exact timing you consider acceptable for detection (e.g., 5s, 10s),
and I’ll give a concise implementation sketch you can drop into your agent flow.
Sources: Agents Framework | livekit/livekit_composite | DeepWiki | Agents telephony integration | LiveKit docs | SIP APIs | LiveKit docs | Agent session | LiveKit docs