- Detect voicemail systems automatically.
- Control how your agent responds.
- End calls cleanly after voicemail handling.
Setup
ImportVoiceMailDetector and put it on the Pipeline, alongside the providers. Give it an llm to classify with, and the runtime runs the detector when the session is started with zeroruntime.invoke().
To set up outbound calling and routing rules, check out Handling Calls.
How it works
The detector buffers the opening speech on an outbound call forduration seconds, then
asks the llm to classify the transcript as a human or a voicemail greeting (a one-word
yes/no). Detection is handled by the runtime, which calls the agent’s on_voicemail back
when it fires. Pass callback= on the detector instead to route it to a plain function.
Parameters
What’s Next
DTMF Events
Capture caller key presses.
Call Transfer
Move a live call to another number.