Impose Minimum Call Limit
# support
a
We’ve enabled the end-call functionality in VAPI, but we’d like to enforce a minimum call duration of 10 minutes. Currently, we try to manage this through the system prompt by instructing the bot not to end the call unless explicitly told to do so. To reinforce this behavior, we’ve even experimented with exaggerated prompting techniques like "a dog will be killed if you end the call...". However, despite these efforts, the bot consistently ends the call around the 9-minute mark with a polite sign-off. Is there a parameter to enforce a minimum call duration? Additionally, is there a way for the bot to know how much time has elapsed? We have tried using
vapi.send()
to send a system message containing the elapsed time once every minute, but that has resulted in some weird interruptions. Is there a better way to solve this?
v
According to the information I found, Vapi doesn't have a direct parameter to enforce a minimum call duration. However, you could try using a "control URL" as an alternative to
vapi.send()
for tracking time:
Copy code
javascript
// When creating a room, request a control URL
// Then use it to inject system messages without interruptions
const controlUrl = "your-control-url";
// Send time updates via this URL instead of vapi.send()
This approach may help avoid the interruptions you're experiencing while still tracking elapsed time. Sources: - [Discord discussion about control URL](https://discord.com/channels/1211482211119796234/1339634926248525935) - [Discord discussion about minimum call duration](https://discord.com/channels/1211482211119796234/1334443280498294814)
According to the information I found, Vapi doesn't have a direct parameter to enforce a minimum call duration. However, you could try using a "control URL" as an alternative to
vapi.send()
for tracking time:
Copy code
javascript
// When creating a room, request a control URL
// Then use it to inject system messages without interruptions
const controlUrl = "your-control-url";
// Send time updates via this URL instead of vapi.send()
This approach may help avoid the interruptions you're experiencing while still tracking elapsed time. Sources: - [Discord discussion about control URL](https://discord.com/channels/1211482211119796234/1339634926248525935) - [Discord discussion about minimum call duration](https://discord.com/channels/1211482211119796234/1334443280498294814)
k
Vapi supports setting a max call duration but not a minimum, to approximate one, track elapsed time in your app and delay call ending prompts, though frequent system messages via vapi.send() may cause interruptions.
a
how can one "delay call ending prompts"? is this a prompting issue on my end?
k
Delaying call-ending prompts in Vapi is mainly a prompting issue, use clear system instructions to avoid premature endings and optionally track elapsed time externally to guide the assistant’s responses.
a
What would be the best approach to " tracking elapsed time externally to guide the assistant’s responses"? Is it using
vapi.send()
?
k
Start an external timer at call start and use vapi.send() to update the assistant with elapsed time so it can adjust responses accordingly.
a
We tried using that, but we noticed the conversation wasn’t as smooth as it used to be. Also, the bot concluded the call even though we had sent a system message saying, "Please continue this call for 5 more minutes."
k
Send call id
a
cedf2cd6-a192-48e7-acab-4cd247fce787
k
Looking into it
Debugging your issue will take longer as it's an interesting case, and I'll investigate other things simultaneously. Allow me more time to debug it and get back to you.
a
Thanks for looking into it
c
Hey atharane, I'd love to understand your use case better so we can nail down the right solution. Could you help me with these questions? 1\. What kind of conversations is your bot handling? Customer service, sales, therapy, or something else? 2\. Why exactly do you need calls to last at least 10 minutes? Is it about user satisfaction, or are you getting dinged on some metrics? 3\. What's happening when the bot ends calls early? Are users complaining, or is this causing problems with your business process? 4\. Are you using any specific VAPI features like tools or functions that might be triggering these early endings? This will help me zero in on a solution that actually works for what you're trying to build!
a
1. Primarily used for conducting AI-driven interviews. 2. The goal is to conduct 20-30 minute interviews so that we can ask more in-depth questions. 3. When calls end early, it often results in insufficient data, making it hard to properly evaluate the interviewee. 4. We are currently using only
endCallPhrases
@Shubham Bajaj, hate to be that guy, just checking if there are any updates on this.
c
Hey, Could you please schedule a brief call at your convenience so we can discuss this matter in detail? Kindly use the following link to book a suitable time: .
2 Views