feat(voice): expose voicemail controls on VoiceCall tool#61
Merged
Conversation
Lets the agent control what happens when voicemail picks up, instead of
always falling back to the gateway's hang-up default. Parsed from natural
language ("if it goes to voicemail, leave this message...") into structured
params rather than buried as if-then logic in the free-text task prompt.
Both fields are optional and only forwarded when present, so plain calls
are unchanged. The schema notes that voicemail is a one-way monologue so
the agent doesn't try to script a back-and-forth.
Depends on the gateway accepting these fields (blockrun voicemail PR) —
the gateway validates with strict mode, so deploy that first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds two optional params to the
VoiceCalltool so the agent can control voicemail behavior from natural language:voicemail_action:hangup|leave_message|ignorevoicemail_message: the message to speak whenleave_messageis setBefore this, a request like "call my client, and if it goes to voicemail leave this message..." had nowhere structured to go — it could only be stuffed into the free-text
taskprompt as fragile if-then logic. Now the agent parses intent into real params.The schema description spells out that voicemail is a one-way monologue (spoken once, no back-and-forth) so the model doesn't try to script a conversation with a recording.
Behavior
Both fields are optional and only forwarded when present, so ordinary calls are completely unchanged — voicemail still hangs up by default unless the user explicitly asks to leave a message.
Depends on the gateway accepting these fields — blockrun PR #26. The gateway validates the call body with
.strict(), so it will rejectvoicemail_*until that PR is merged and deployed. Merge + deploy blockrun #26 first, then this.(Safety cushion: the params are only sent when the user asks about voicemail, so even out of order, plain calls keep working — only the voicemail path would fail.)
Test plan
npm run buildpasses (tsc clean)voicemail_action: leave_message→ verify message is left