Call logs are essential for tracking customer interactions, verifying call history, auditing agent performance, and ensuring compliance in a call center. VICIdial, a robust open-source call center solution, provides an efficient way to export call logs for specific phone numbers using the phone_number_log
API.
The phone_number_log
API allows administrators, managers, and analysts to extract call records associated with a specific phone number, helping with lead verification, customer support, legal compliance, and CRM integration.
Why Use the phone_number_log
API?
✅ Retrieve complete call history for a specific phone number
✅ Track inbound and outbound interactions with leads and customers
✅ Ensure compliance by maintaining accurate call records
✅ Integrate call logs with CRM, reporting, and analytics tools
✅ Verify agent performance and customer engagement levels
In this tutorial, we will cover:
🔹 How the phone_number_log
API works
🔹 How to configure and authenticate API access
🔹 How to construct and send API requests
🔹 Examples using a browser, cURL, and Postman
🔹 How to interpret API responses and troubleshoot errors
🔹 Best practices for using the phone_number_log
API efficiently
Let’s dive in! 🚀
Understanding the phone_number_log
API Function
The phone_number_log
API enables users to export call logs for a specific phone number. It retrieves details such as:
✔ Call Date and Time
✔ Inbound or Outbound Call Type
✔ Agent Handling the Call
✔ Lead ID Associated with the Number
✔ Call Status (Answered, Dropped, Voicemail, etc.)
✔ Call Duration
✔ Recording File Name (if available)
Common Use Cases for phone_number_log
API
🔹 Call center managers tracking customer communication history
🔹 Supervisors monitoring agent interactions with specific customers
🔹 Compliance officers verifying call records for regulatory purposes
🔹 CRM integrations requiring call logs for customer tracking
🔹 Legal teams retrieving call records for dispute resolution
Step 1: Prerequisites for Using the API
Before using the phone_number_log
API, ensure you have:
✅ VICIdial installed and configured
✅ An API-enabled user account with administrative permissions**
✅ A valid phone number to retrieve logs for
✅ VICIdial server access credentials
How to Enable API Access in VICIdial
1️⃣ Log in to the VICIdial Admin Panel
2️⃣ Navigate to Admin > Users
3️⃣ Select the user who will access the API
4️⃣ Set API Access to 1
(Enabled)
5️⃣ Set User Level to 8 or higher** (Admin-level access) 6️⃣ Add
phone_number_logto the **Allowed API Functions** (or set to
ALL`)
7️⃣ Click Save Changes
Now, your user is authorized to retrieve call logs for specific phone numbers using the API.
Step 2: Constructing the API Request
The VICIdial API uses HTTP GET requests, meaning you can access it via a browser, cURL, or API tools like Postman.
Base API URL
🔹 Replace your-vicidial-server
with your actual VICIdial instance.
Required Parameters for phone_number_log
API
Parameter | Description | Example |
---|---|---|
function |
Specifies the API function (phone_number_log ) |
phone_number_log |
user |
VICIdial API username | admin |
pass |
VICIdial API password | 1234 |
source |
Identifier for tracking API calls | PhoneLogExport |
phone_number |
The phone number to retrieve logs for | 18001234567 |
start_date |
(Optional) Start date for filtering logs | 2024-02-01 |
end_date |
(Optional) End date for filtering logs | 2024-02-15 |
Step 3: Sending the API Request
Method 1: Exporting Call Logs via a Web Browser
Simply enter the following URL in your browser (replace credentials accordingly):
🔹 Press Enter, and the API should generate and display call logs.
Method 2: Exporting Call Logs via cURL (Command Line)
For developers, cURL is a convenient tool for making API requests. Use the following command:
🔹 This will return a CSV-formatted list of call logs in the terminal.
Method 3: Exporting Call Logs via Postman
1️⃣ Open Postman
2️⃣ Set the request type to GET
3️⃣ Enter the API URL
4️⃣ Click Send
5️⃣ The call logs should appear in the response window
Step 4: Understanding API Responses
If the request is successful, VICIdial returns a CSV-formatted response containing call logs:
Breaking Down the Response
Column | Description |
---|---|
CallID |
Unique Call Identifier |
Phone Number |
The customer’s phone number |
Call Date |
Date and time of the call |
Agent |
Agent handling the call |
Call Type |
Inbound or Outbound |
Duration |
Total call duration |
Call Status |
Status (ANSWERED, ABANDONED, VOICEMAIL, etc.) |
Recording |
Recording file name (if available) |
Step 5: Handling Errors & Troubleshooting
If something goes wrong, VICIdial will return an error message instead of call logs.
Common Errors & Fixes
Error Message | Cause | Solution |
---|---|---|
ERROR: USER DOES NOT HAVE PERMISSION TO USE THIS FUNCTION |
Insufficient API permissions | Ensure user level is 8+ and API Access is enabled |
ERROR: INVALID USERNAME OR PASSWORD |
Wrong credentials | Verify API username and password |
ERROR: NO FUNCTION SPECIFIED |
Missing function parameter | Ensure function=phone_number_log is included |
ERROR: NO CALL LOGS FOUND |
No call records exist for the given number/date | Ensure the phone_number and date range are correct |
Conclusion
The phone_number_log
API function is an essential tool for retrieving call logs in VICIdial. Whether you’re analyzing inbound and outbound interactions, ensuring compliance, or integrating call data with external systems, this API provides quick and accurate access to call records.
Feel free to contact us or simply start a live chat to get connected to one of our team members. Here is our contact information.
Calling from US: +1 954-990-0053
Email: office@callix.ai