I am working on call transfer. However, I want the...
# ask-ai
m
I am working on call transfer. However, I want the call transfer to fail if the voicemail picks up of the transfer target
t
Thanks for reaching out, Daniel. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I understand how frustrating it can be when call transfers fail because voicemail picks up. To help with this, you can use a programmatic approach that includes a detection mechanism. While LiveKit doesn’t have a built-in voicemail detection feature, you can create one using an AI-driven agent that recognizes voicemail greetings by analyzing audio patterns. Once voicemail is detected, you can set up specific actions with a function tool, such as: • For outbound calls: Log the event, leave a message, and then hang up. • For warm transfers: Mark the transfer as failed, let the customer know, and tidy up the session. If you’d like, I’m here to guide you through implementing this detection logic or help you define the function tool. Just let me know how I can assist! Sources: Agents telephony integration | LiveKit Docs | examples/voice_agents/error_callback.py | agent.py
g
t
I'm happy to share that LiveKit supports voicemail detection using LLM-based identification of voicemail greetings, with an accuracy of around 70-80%. This works by having the LLM recognize voicemail content from real-time transcriptions and then trigger a custom tool function to manage the situation. Here’s how you can set this up: 1. Define a Tool Function: You’d create a function (for example,
detected_answering_machine
) that the LLM calls when it detects a voicemail greeting. This function can be used to log the event, leave a message, and hang up. 2. Ensure LLM Awareness: It’s important to prompt the LLM to listen for common voicemail phrases and activate the tool when detected. Having high-quality transcription really helps here. 3. Optional Silence Monitoring: You might also want to add silence monitoring to catch prolonged inactivity, which can complement the detection. If you’d like, I’m here to help you with setting up the tool function or configuring the LLM for voicemail detection—just let me know! Sources: Speech & Audio Processing | livekit/livekit_composite | DeepWiki | Agent Testing & Evaluation | livekit/livekit_composite | DeepWiki | Agents telephony integration | LiveKit Docs | Agents telephony integration | LiveKit Docs | livekit-agents/livekit/agents/voice/agent_session.py