Ahmer
09/22/2025, 6:05 PMVapi Support Bot
09/22/2025, 6:06 PMmaxDurationSeconds property in your call configuration. Here’s a sample snippet:
json
{
"maxDurationSeconds": 120
}
This will automatically end the call after 2 minutes, regardless of user input.
Note: Automatic transfer after max duration is not directly supported in the found documentation.
[Reference](https://docs.vapi.ai/calls/assistant-based-warm-transfer#transfer-assistant-properties)
Source:
- [Assistant-based warm transfer](https://docs.vapi.ai/calls/assistant-based-warm-transfer#transfer-assistant-properties)Chiranjeet Mishra
09/23/2025, 4:41 PMmaxDuration setting and hooks to handle call duration limits.
1. First, set the maxDuration for the call [1](https://docs.vapi.ai/assistants/assistant-hooks):
{ "maxDurationSeconds": 120 // 2 minutes}
2. Then, you can use call.ending hooks to handle the timeout gracefully :
{
"hooks": [
{
"on": "call.ending",
"filters": [
{
"type": "oneOf",
"key": "call.endedReason",
"oneOf": [
"exceeded-max-duration"
]
}
],
"do": [
{
"type": "say",
"exact": "I apologize, but our time limit has been reached. I'll transfer you to a representative."
},
{
"type": "tool",
"tool": {
"type": "transferCall",
"destinations": [
{
"type": "number",
"number": "+1234567890",
"callerId": "+1987654321"
}
]
}
}
]
}
]
}
The call will automatically end after the specified duration, and you can either:
- Simply end the call
- Transfer to another number
- Speak a message before ending
- Combine multiple actionsAhmer
09/24/2025, 12:17 PM