simultaneous outbound calls
# support
f
Hello Vapi Support Team, I would like to know if there is a native setting in Vapi to: - Limit the number of simultaneous outbound calls (for example, launching calls 3 at a time only), - Automatically retry calls that did not connect (no answer, busy, failed).
v
To limit the number of simultaneous outbound calls (e.g., 3 at a time), implement concurrency control in your queue processing logic. Here’s a code snippet using Redis to check active calls before launching a new one:
Copy code
js
if (activeCalls >= MAX_CONCURRENCY) {
  return; // Wait until a slot is free
}
// Proceed to dequeue and launch the next call
Set
MAX_CONCURRENCY
to your desired limit (e.g., 3). This ensures only the allowed number of calls are active at any time. For full implementation details, see the [Vapi call queue management guide](https://docs.vapi.ai/calls/call-queue-management). Source: - [Call queue management with Twilio](https://docs.vapi.ai/calls/call-queue-management)
f
i'm not using API
c
Hi francis45, To limit the number of simultaneous outbound calls in Vapi and manage their flow, you can set up concurrency control and queue management using Twilio. Vapi itself does not natively queue calls beyond the concurrency limit for outbound calls; instead, calls that exceed the concurrency capacity typically return an error. For your use case of launching a limited number of calls (e.g., 3 at a time), you would: 1. Implement logic to check the active call count using Redis or a similar service before launching a new call. 2. Use a queue management system to hold and process additional calls when concurrency slots become available. Here’s a simplified approach:
Copy code
js
if (activeCalls >= MAX_CONCURRENCY) {
  return; // Wait until a slot is free
}
// Proceed to dequeue and launch the next call
Set
MAX_CONCURRENCY
to 3 to ensure that only three calls are active at any time. For automatically retrying calls that do not connect, you would manually handle retries based on the call status returned after each attempt. Use a status check for conditions like "no answer" or "busy," and then enqueue for a retry. For more detailed guidance, refer to the [Vapi call queue management guide](https://docs.vapi.ai/calls/call-queue-management).