No way to hangup all incoming call
# support
j
we have requirement when plan is expired or credit exhausted, all incoming call should be hangup so as of now there is not way to support this.
v
Vapi does not currently support a direct way to hang up all incoming calls via a global setting or hook. However, you can use a phone number hook to play a message when a call is ringing, effectively informing callers that inbound calls are disabled (e.g., due to plan expiration):
Copy code
json
{
  "hooks": [{
    "on": "call.ringing",
    "do": [{
      "type": "say",
      "exact": "Inbound calling is disabled due to plan expiration."
    }]
  }]
}
This will not forcibly hang up the call, but it will prevent the call from being answered by your system. [See documentation for details](https://docs.vapi.ai/phone-numbers/phone-number-hooks#example-say-message-on-call-ringing). Source: - [Phone Number Hooks Documentation](https://docs.vapi.ai/phone-numbers/phone-number-hooks)
k
Implement a webhook that checks the caller’s plan or credit status on each incoming call, if expired or exhausted, respond with an error in the assistant-request webhook to trigger Vapi’s automatic hangup, and optionally add a Hangup node in your call flow to ensure calls end cleanly..