Continous failed calls to VAPI server (Status 400 ...
# support
l
Hi! I'm having some problems since we increased the daily call volume to over 3000 calls a day. When all my agents are calling at the same time they are making max 14 calls at the same time, but I get lots of error when calling the VAPI server both to create a call (POST) and to get information from the call (GET). Some calls randomly return a 400 or 404 status. At first I thought we needed more concurrent lines, so we bought up to 20 concurrent lines, but still getting many errors. Is there a concurrency for the number of API calls that can be made to an endpoint from the same account? Could that be the problem?
v
Thank you for the details. To help narrow down the cause of the 400/404 errors, could you confirm if the errors occur only when you exceed your purchased concurrency (e.g., more than 20 simultaneous calls), or do they also happen when you are well below that limit? Sources: - [Call queue management with Twilio](https://docs.vapi.ai/calls/call-queue-management) - [Outbound campaigns overview](https://docs.vapi.ai/outbound-campaigns/overview) - [Vapi FAQ](https://docs.vapi.ai/faq) - [Vapi Enterprise Plans](https://docs.vapi.ai/enterprise/plans)
l
We never exceed our concurrency limit
@Vapi Support Bot
v
To help reduce 400/404 errors during high-volume API usage, try adding retry logic with exponential backoff to your API requests. Here’s a simple example in JavaScript using `axios`:
Copy code
js
async function apiCallWithRetry(url, options, retries = 3, delay = 500) {
  for (let i = 0; i < retries; i++) {
    try {
      return await axios(url, options);
    } catch (err) {
      if (i === retries - 1) throw err;
      await new Promise(res => setTimeout(res, delay * Math.pow(2, i)));
    }
  }
}
This approach helps handle temporary rate limits or network issues by spacing out retries automatically. For more details, see the [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)
l
@Vapi Support Bot for python requests?
v
Here's a Python example using
requests
with exponential backoff for retries:
Copy code
python
import time, requests

def api_call_with_retry(url, method="get", retries=3, delay=0.5, **kwargs):
    for i in range(retries):
        try:
            resp = requests.request(method, url, **kwargs)
            resp.raise_for_status()
            return resp
        except requests.RequestException as err:
            if i == retries - 1:
                raise
            time.sleep(delay * (2 ** i))
This will help handle temporary 400/404 errors by spacing out retries automatically. Adjust
retries
and
delay
as needed for your workload. For more, see the [Vapi tools documentation](https://docs.vapi.ai/tools/default-tools). Source: - [Default Tools | Vapi Documentation](https://docs.vapi.ai/tools/default-tools)
c
Hi Lucía, If you're experiencing issues with calls dropping immediately after a transfer initiation, you might want to review [this troubleshooting guide](https://docs.vapi.ai/phone-calling/transfer-calls/debug-forwarding-drops) that deals specifically with call forwarding problems. Ensure your assistant configuration does not override Vapi's call controls and verify that transfer modes are supported by both Vapi and your telephony provider. For a successful call transfer setup, make sure: -
phoneCallProviderBypassEnabled
is set to
false
and your assistant does not have
serverMessages
set to \["phone-call-control"\]. - The transfer scenario from your call origin to the destination is supported. - The end reason returned by the Vapi API is "assistant-forwarded-call". If the problem persists, checking telephony provider logs, such as Twilio or Vonage, could reveal more about potential network or setup issues.
l
Hi Aniah! My issue is not happening during transfer, but when initiating calls
Do you have any idea of what could be happening?
@Vapi Support Bot
v
Thanks for clarifying that the issue occurs during call initiation. To help us investigate further, could you please provide a recent example of a failed call attempt—specifically, the Call ID and timestamp from your Vapi dashboard where you received a 400 or 404 error? This will allow us to review the logs and pinpoint the cause. If you need help finding the Call ID, let me know! Sources: - [Call queue management with Twilio](https://docs.vapi.ai/calls/call-queue-management) - [Default Tools | Vapi Documentation](https://docs.vapi.ai/tools/default-tools) - [Debugging voice agents](https://docs.vapi.ai/debugging) - [How to Report Issues Effectively](https://docs.vapi.ai/issue-reporting)
c
Hello, Thanks for clarifying this. I'll pass this to the team and will be with you after investigation.
6 Views