Skip to content

docs: document the call.ending phone number hook and hook filters - #1323

Merged
stephenvapiai merged 2 commits into
VapiAI:mainfrom
chiranjeet-vapi:docs/phone-number-hooks-call-ending
Oct 14, 2026
Merged

stephenvapiai merged 2 commits into
VapiAI:mainfrom
chiranjeet-vapi:docs/phone-number-hooks-call-ending

Conversation

@chiranjeet-vapi

@chiranjeet-vapi chiranjeet-vapi commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Description

  • fern/phone-numbers/phone-number-hooks.mdx says hooks support only call.ringing. The API also accepts call.ending, and call.ringing accepts a caller-prefix filter; neither was documented.
  • Documents call.ending: it runs only when the inbound assistant request fails, takes a single do action (transfer or say), and can filter on call.endedReason with the six assistant-request ended reasons. Names the resulting ended reasons (call.ending.hook-executed-transfer / -say, already listed on the ended-reasons page).
  • Documents the startsWith filter on call.ringing (key: "number", prefixes without +).
  • Clarifies that call.ringing takes a do array and the first action runs.

Evidence

  • live API spec (https://api.vapi.ai/api-json, 2026-10-14):
    • PhoneNumberHookCallEnding.do is a single oneOf (TransferPhoneNumberHookAction, SayPhoneNumberHookAction); PhoneNumberHookCallRinging.do is an array.
    • PhoneNumberCallEndingHookFilter: type enum oneOf, key enum call.endedReason, oneOf items enum: the six assistant-request-* reasons listed in the page.
    • PhoneNumberCallRingingHookFilter: type enum startsWith, key enum number, "Do not include the + prefix."
  • fern/calls/call-ended-reason.mdx already lists call.ending.hook-executed-say and call.ending.hook-executed-transfer.
  • That call.ending fires only on assistant-request failure, and that the first do action runs for call.ringing: verified against the current API implementation.

Testing Steps

  • fern check (pinned 5.151.1) passes locally
  • Check the preview deployment for the changed page

PhoneNumberHookCallEnding runs only when the inbound assistant request
fails, takes a single do action, and filters on call.endedReason with the
six assistant-request ended reasons. call.ringing also accepts a
startsWith filter on the caller number. Neither was documented.
@chiranjeet-vapi
chiranjeet-vapi force-pushed the docs/phone-number-hooks-call-ending branch from ff384c9 to bca404d Compare October 14, 2026 04:09
@chiranjeet-vapi
chiranjeet-vapi marked this pull request as ready for review October 14, 2026 16:42
@lightsage-app

lightsage-app Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Lightsage docs evals

Waiting for the staging docs URL before running evals.

Lightsage will start the selected PR evals automatically when GitHub reports a successful docs deployment for this PR. This usually happens within 15 minutes.

Commit: e6fdee2
Status: waiting for staging docs URL

@stephenvapiai
stephenvapiai merged commit 6eed450 into VapiAI:main Oct 14, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants