Phone Ringing
# support
b
I searched for functuality of my agents to only answer the phone after say 3-4 rings. I did not see the availability to be able to do this.
@Vapi
v
@brandon holley I'm glad you reached out for assistance! Currently, VAPI does not offer a built-in feature to configure agents to answer calls after a specific number of rings directly through the API. However, this functionality might be implemented at the application level, depending on how your voice application is set up. If you're looking to add this feature, you might consider implementing a delay in your application logic before answering the call. This could be done by counting the ring events or setting a timer based on the average duration of the rings you wish to wait before answering. If you need more specific guidance on how to implement this in your application or if there are any other ways we can assist you with your voice application, please let us know!
b
Can you clarify what you mean by the application level? Where would I go to set the second duration? @Vapi
v
@brandon holley Certainly! By "application level," I mean the logic and behavior you define in the software application that interacts with the VAPI. This is the code that you write and control, which uses the VAPI to handle voice calls. To set a duration in seconds before answering a call, you would typically do this within your application's call handling logic. Here's a general outline of how you might implement this: 1. **Detect Incoming Call**: Your application receives a notification of an incoming call through a webhook event or similar mechanism provided by VAPI. 2. **Start Timer**: Instead of immediately answering the call, you start a timer within your application. This timer would be set for the duration you want to wait (e.g., the equivalent time of 3-4 rings). 3. **Wait**: Your application waits for the timer to expire. During this time, the call continues to ring on the caller's end. 4. **Answer Call**: Once the timer expires (after the set duration), your application sends a command to VAPI to answer the call. The exact implementation details, such as how to start a timer and handle asynchronous events, will depend on the programming language and framework you're using for your application. If you're using JavaScript with Node.js, for example, you might use
setTimeout()
to create the delay. If you need further assistance with the code or have any other questions, please let us know!
@brandon holley I'm glad you reached out for assistance! Currently, VAPI does not have a built-in feature to configure agents to answer calls after a specific number of rings. However, this functionality can often be managed by the telephony system or platform you are using in conjunction with VAPI. I would recommend checking the settings of your telephony provider or the system that handles incoming calls to see if such an option is available. If you need further assistance with VAPI or have any other questions, feel free to ask!
You can continue this conversation by mentioning me in the message.
s
@brandon holley this is not supported with Vapi, instead you have to check with your telephony provider they can only help you out for this.
d
@Shubham Bajaj By telephony provider do you mean either Twilio or Vonage, which are the only two supported by Vapi as far as I'm aware?