Call centers rely on Direct Inward Dialing (DID) numbers to manage inbound calls efficiently. Tracking and exporting call logs for specific DIDs is crucial for reporting, analytics, billing, and compliance. VICIdial, a leading open-source call center solution, provides the did_log_export
API, which allows administrators to extract call logs for a specific DID (Direct Inward Dialing) number in a structured format.
The did_log_export
API enables supervisors, managers, and compliance officers to export call records associated with a particular DID number, making it easier to analyze call traffic, verify billing details, and integrate with third-party reporting tools.
Why Use the did_log_export
API?
✅ Retrieve all call logs associated with a specific DID
✅ Analyze inbound call traffic for reporting and optimization
✅ Ensure compliance by maintaining proper call log records
✅ Verify billing and call routing accuracy
✅ Integrate call log data with external analytics platforms
In this tutorial, we will cover:
🔹 How the did_log_export
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 did_log_export
API efficiently
Let’s dive in! 🚀
Understanding the did_log_export
API Function
The did_log_export
API enables users to export call logs associated with a specific DID. This is particularly useful for:
✔ Generating reports on inbound call activity
✔ Ensuring accurate call tracking and auditing
✔ Analyzing call trends for workforce optimization
✔ Verifying customer call records for dispute resolution
Common Use Cases for did_log_export
API
🔹 Call center managers analyzing inbound call volume for each DID
🔹 Billing departments verifying call charges for DID usage
🔹 Compliance teams maintaining records for regulatory purposes
🔹 CRM integrations that require detailed call logs per DID
Step 1: Prerequisites for Using the API
Before using the did_log_export
API, ensure you have:
✅ VICIdial installed and configured
✅ An API-enabled user account with administrative permissions**
✅ A valid DID number for which to export call logs
✅ 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
did_log_exportto the **Allowed API Functions** (or set to
ALL`)
7️⃣ Click Save Changes
Now, your user is authorized to retrieve DID call logs 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 did_log_export
API
Parameter | Description | Example |
---|---|---|
function |
Specifies the API function (did_log_export ) |
did_log_export |
user |
VICIdial API username | admin |
pass |
VICIdial API password | 1234 |
source |
Identifier for tracking API calls | DID_Report |
did_pattern |
The DID number to filter call logs | 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 |
DID |
Direct Inward Dialing number |
Call Date |
Date of the call |
Caller ID |
Phone number of the caller |
Call Status |
Status (Answered, Abandoned, Voicemail, etc.) |
Duration |
Total call duration |
Agent |
Agent handling the call |
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=did_log_export is included |
ERROR: NO CALL LOGS FOUND |
No call records exist for the given DID/date | Ensure the did_pattern and date range are correct |
Step 6: Best Practices for Using the did_log_export
API
✅ Use this API to generate automated DID reports for analysis
✅ Ensure API access is restricted to authorized users
✅ Integrate call log exports with CRM or analytics tools
✅ Regularly monitor and store call logs for compliance and audits
✅ Optimize database performance by archiving old logs
Conclusion
The did_log_export
API function is an essential tool for retrieving call logs in VICIdial. Whether you’re analyzing inbound traffic, ensuring compliance, or integrating call data with external systems, this API provides fast 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