Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Troubleshooting Voice Calls

Debugging Tools

debugging-tools page anchor

Twilio offers several tools for investigating the interaction between Twilio and your application. If a call fails to go through, or your voice call behaves unexpectedly, the Debugger and Request Inspector should be your first stops for debugging.


logs page anchor

Found in your Twilio console, the Logs(link takes you to an external page) contain detailed log of activities within your application, from error logs to specific logs around the APIs you use. These logs can help you dive deeper and understand which Twilio resources were impacted (and by whom).

To get to the debugger, open the console navigation and toggle to the Monitor tab and select Logs to access your error logs:

When this tab is selected, you can click on 'Logs' to expand log options, expand Errors to find Error Logs.

Once in the error logs, you can dig into detailed logs, such as these HTTP retrieval failures, to understand the root cause of your problem.

We can see two red bar lines on a graph showing the dates of errors.

You can set your own Alert triggers(link takes you to an external page) via the console. These will notify you via webhook or email when an error occurs on your account.

The Twilio Console logs also provide you with information regarding the requests Twilio makes to your application and the responses Twilio receives. You will be able to access logs for any Twilio product you work with. Twilio keeps these logs for 90 days.

  • Log into your Twilio account
  • Access your call logs by navigating the Monitor tab, expanding Logs , and clicking on the product you need to examine, like Calls or Messaging logs.
Navigate to Messaging Twilio Console, then click on 'Logs' to open logs and select 'Messaging'.
We see fields for searching by Message SID, Start Fate & Time, End Date & Time, From, To, and Status.
  • Once you're in your voice logs, find the message where the problem occurred. Click the hyperlinked date to dig down into the details for this message.
Twilio console showing Messaging log details.

Now we can inspect the request!

If any HTTP requests were logged for the event you're investigating, you will find the Request Inspector at the bottom of the page, where you can see all of the data, response headers, and any errors that may have been returned.

A detailed view of the messaging request inspector. We see the type of request (GET).

In the above screenshot, Twilio made a request to but failed to send the message to the end user due to an invalid phone number.

All Twilio-generated error codes are documented here. Find your error code and dig into causes and possible solutions.

"An application error has occurred" on your call

an-application-error-has-occurred-on-your-call page anchor

An 'application error' means that the code Twilio is trying to fetch at the URL specified on your servers is either unavailable or has errors in it. You can check the URL for a given phone number via your console(link takes you to an external page) or within your application's instructions for handling a call.

Find the URL configured for use with a phone number in the phone numbers Console.

If you see this error, check your Twilio account's debugger logs(link takes you to an external page) for more details.

Note: Your server must be publicly accessible for Twilio to reach it. If you're building and testing locally, we recommend you use ngrok(link takes you to an external page) for testing your webhooks. You can follow this guide(link takes you to an external page) to learn how to use ngrok with Twilio.

How to Stop Receiving Calls

how-to-stop-receiving-calls page anchor

If you do not want to receive any phone calls with your Twilio phone number, you must remove the Voice Request URL from your Twilio phone number(link takes you to an external page) and leave that field blank. Without a Voice Request URL, this phone number is considered 'out of service' for inbound calls. You will not be charged for any incoming calls, nor will these calls be received and logged in your account.

To reject phone calls coming from specific phone numbers, use the <Reject> verb. As long as <Reject> is the first verb in your response to the call, Twilio will not answer the call. If any other TwiML verbs are used before <Reject>, your application will receive the call and your account will be billed.

Issues with <Gather>

issues-with-gather page anchor

There is no test which can be done to definitively determine the origin of a problem with <Gather>. The best approach to take is to do everything possible to isolate the issue. Try the following:

  1. Use several different phones from different carriers. If the issue occurs reliably, but only on phones from a particular carrier, you might want to contact that carrier directly to report the issue. If the problem occurs reliably on multiple telephones from multiple service providers, please contact Twilio support(link takes you to an external page) .
  2. If the issue happens only intermittently, it may be due to environmental factors or the style of use from a particular user. Try to see if there is a particular user, phone or location that experiences this issue more often.
  3. Check how your application handles <Gather> . <Gather> may receive all of the inputs from your user, but your application may not properly handle the request at the URL specified in <Gather action=""> . Be sure to check that action="" points to the correct location, and that your specified location can accept requests made with the method you are using.

For more help implementing <Gather>, please see this guide.

Twilio supports calling worldwide, but international permissions must be explicitly enabled. You can enable international permissions here(link takes you to an external page).

If your account is not yet set up for international dialing, you should request access(link takes you to an external page). After your account has been granted access, revisit the Global Permissions page(link takes you to an external page) and enable any country you wish to call.

Recording Resource Exceptions

recording-resource-exceptions page anchor

The Recording API may occasionally throw an exception along the lines of:

Twilio\Exceptions\RestException: [HTTP 400] Unable to create record: Requested resource is not eligible for recording (uncaught exception) at /path/to/your/twilio/code.file

The call resource could be ineligible for recording for a number of reasons, but it typically means that you're trying to record a call that has already been completed (for example, both parties hung up) or a call that never established (for example, a failed call, or a call in which the caller hung up before media started flowing.)

You can get more detailed information about the phone call by using the REST API or through your call logs in the Twilio Console(link takes you to an external page).

You can always check the real-time status of Twilio systems via the Twilio status page(link takes you to an external page). If anything is wrong on our end, you'll see it there.

Voice Insights and Add-Ons

voice-insights-and-add-ons page anchor

If you're looking for additional insights into your voice calls, you may want to consider Voice Insights(link takes you to an external page), which gives you use real-time data about call quality, carrier analytics, and WebRTC performance to proactively assist customers and minimize support time.

If you're still having trouble with your Twilio Voice calls, you can reach out to our support team(link takes you to an external page) for help.

Rate this page: