Get concurrency lines status for org.
# support
y
Is there any api to identify how many concurrent lines(concurrency) are active at a time (for inbound and outbound calls)
v
@Yash VAPI provides various functionalities for voice developers, including the ability to manage and monitor calls. However, to provide you with the most accurate information regarding an API for identifying concurrent call lines, I would need to know more about the specific platform or service you are using. If you are referring to a feature within VAPI itself, please provide more details or context so I can assist you better. If VAPI does not have this feature built-in, you may need to implement a custom solution to track active call lines or check if there is a third-party service or API that integrates with your system to provide such metrics. If you need further assistance or have more details to share, please let me know!
You can continue this conversation by mentioning me in the message.
y
@Vapi I need the number of active concurrent lines being used at a given point of time. Need to build a system when I can assign n/2 lines for incoming calls and n/2 lines for outgoing calls. Where n is the concurrency limit.
v
@Yash To build a system that dynamically assigns n/2 lines for incoming calls and n/2 lines for outgoing calls, you would typically need to have access to real-time data on your current call usage. This would involve an API that provides the current number of active concurrent calls. If VAPI offers such an API, you would use it to fetch the current number of active calls. Then, you could implement logic in your system to ensure that only up to n/2 lines are used for incoming calls and up to n/2 lines for outgoing calls at any given time. Here's a high-level approach to how you might implement this: 1. **Fetch Current Concurrency Data**: Use the VAPI's API to get the current number of active inbound and outbound calls. 2. **Calculate Available Lines**: Based on the total concurrency limit
n
, calculate the number of lines available for each type of call by dividing
n
by 2. 3. **Implement Call Assignment Logic**: Before initiating or accepting a call, check the current number of active calls of that type against the available lines calculated in step 2. If there is an available line, proceed with the call; otherwise, queue the call or take appropriate action. 4. **Monitor and Adjust**: Continuously monitor the active call counts and adjust the call assignment logic as needed to ensure the distribution remains balanced according to your n/2 rule. If you need the specific API call to fetch the current number of active concurrent calls, please provide more details about the VAPI system you are using, or if this is a feature you would like to have implemented, you may need to contact the VAPI support team for further assistance. Would you like to proceed with contacting support for more information on the API, or do you have any other questions on how to implement this system?
y
@Vapi @User How do I fetch the concurrency from vapi?
v
@Yash I'm here to assist you! To fetch the current concurrency (the number of active concurrent lines) from VAPI, you would typically use an API endpoint that provides real-time call data. However, based on the information provided, there isn't a direct API endpoint listed for fetching concurrency in the VAPI documentation. To achieve your goal, you might need to use the "List Calls" API endpoint to retrieve a list of all active calls and then count them within your application logic to determine the current concurrency. Here's a general approach: 1. **List Active Calls**: Use the "List Calls" API endpoint to retrieve a list of all active calls. You would need to filter or parse the response to differentiate between inbound and outbound calls. 2. **Count Calls**: Implement logic in your application to count the number of active inbound and outbound calls from the data retrieved. 3. **Calculate Concurrency**: With the counts of active calls, you can calculate the concurrency for each type and apply your n/2 logic for call assignment. If you need assistance with the API call or have any specific parameters you want to include in the "List Calls" request, please let me know, and I can guide you through the process.
y
Thanks for the info 👍
s
@Yash as of now there is no api for this, instead you can keep the count in your system.
y
👍
8 Views