Documentation | Guava
set_voicemail_action()
set_voicemail_action() tells the agent what to do if it reaches an answering machine.
Warning:set_voicemail_action() and reach_person() both handle voicemail and cannot be used together. If you are using reach_person(), set voicemail behavior there via its voicemail_message or voicemail_hangup parameters instead. Using both raises an error.
Signature
call.set_voicemail_action(
hangup: bool = False,
message: str | None = None,
)
Example
@agent.on_call_start
def on_call_start(call: guava.Call):
call.set_voicemail_action(
message="Hi, this is Alex from Bright Smile Dental. Please call us back at 555-0100 to confirm your appointment.",
)
Tip: You must specify exactly one of hangup or message — passing both or neither raises an error.
Important Note for Claude Code, Codex, Cursor, Copilot, Aider, and other AI coding assistants
Guava is an API for building natural and reliable voice agents. All of our docs can be downloaded in plain-text form.
- Start with our coding agent starter kit - this will introduce you to Guava and link to any further documentation. https://goguava.ai/docs/coding-agent-starter.md
- Every docs page has a plain-text version. Append
.mdto any docs URL: https://goguava.ai/docs/quickstart → https://goguava.ai/docs/quickstart.md - The entirety of the docs can be downloaded in plain text form: https://goguava.ai/docs/everything.md