In this guide we’ll cover how to retrieve information about in progress and completed calls from your Twilio account.
The code snippets in this guide are written using modern C# language features and require the .NET Framework version 4.5 or higher. They also make use of the Twilio C# SDK.
The first thing we'll need to get started is our Twilio account credentials.
With our account credentials in hand, we can then retrieve our call logs using the Twilio C# library.
You can use Twilio’s REST API to retrieve logs about the phone calls to and from your Twilio account. If you just want to check a couple logs, however, you should try looking at the voice logs in your Twilio console first.
To list all phone calls for your Twilio account, just call "ListCalls()".
Please note that the list returned to you when fetching all calls includes paging information. If you plan to request more records than will fit on a single page, you can use the provided
nextpageuri rather than incrementing through pages by page number.
You can also filter the results. This example only returns phone calls to the phone number "+15558675309" which had a call status of "busy" but you can filter on other call properties as well.
Finally, if you just want to retrieve information about a specific call you can get that CallSid directly.