HomeVICIdial TutorialsVICIdial Non Agent API TutorialsHow to Get Call Status Statistics in VICIdial Using call_status_stats API

How to Get Call Status Statistics in VICIdial Using call_status_stats API

Call centers need detailed call status reports to track agent performance, campaign success, and overall call center efficiency. VICIdial, a powerful open-source call center solution, provides the call_status_stats API, which allows administrators to retrieve a summary of call statuses over a specific time period.

The call_status_stats API enables managers, supervisors, and analysts to analyze call results, providing insights into answered calls, dropped calls, busy signals, voicemails, abandoned calls, and more. This data is crucial for optimizing call center operations, improving lead management, and ensuring compliance.

Why Use the call_status_stats API?

Retrieve real-time or historical call status reports
Monitor agent efficiency and campaign effectiveness
Identify dropped calls, busy numbers, and unanswered calls
Optimize dialing strategies based on call status trends
Automate reporting for call center performance analysis

In this tutorial, we will cover:
🔹 How the call_status_stats 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 call_status_stats API efficiently

Let’s get started! 🚀


Understanding the call_status_stats API Function

The call_status_stats API enables users to retrieve statistics on different call statuses for a given time period, campaign, or agent.

What Information Does the call_status_stats API Provide?

Call Status (ANSWERED, DROP, BUSY, NO ANSWER, etc.)
Total Count for Each Status
Agent Performance by Call Status
Campaign Call Outcome Summary
Call Distribution Across Different Statuses

Common Use Cases for call_status_stats API

🔹 Managers tracking agent performance based on call statuses
🔹 Supervisors monitoring call center efficiency
🔹 Call center analysts optimizing dialer settings
🔹 CRM integrations that require call status updates
🔹 Compliance teams reviewing call disposition records


Step 1: Prerequisites for Using the API

Before using the call_status_stats API, ensure you have:

VICIdial installed and configured
An API-enabled user account with administrative permissions**
A valid date range, campaign ID, or agent ID for generating reports
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 call_status_statsto the **Allowed API Functions** (or set toALL`)
7️⃣ Click Save Changes

Now, your user is authorized to retrieve call status statistics 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

arduino
http://your-vicidial-server/vicidial/non_agent_api.php

🔹 Replace your-vicidial-server with your actual VICIdial instance.

Required Parameters for call_status_stats API

Parameter Description Example
function Specifies the API function (call_status_stats) call_status_stats
user VICIdial API username admin
pass VICIdial API password 1234
source Identifier for tracking API calls CallStatusReport
start_date The start date for the report 2024-02-01
end_date The end date for the report 2024-02-15
campaign_id (Optional) Filter results by campaign OUTBOUND_SALES
agent_id (Optional) Filter results by agent agent001

Step 3: Sending the API Request

Method 1: Retrieving Call Status Statistics via a Web Browser

Simply enter the following URL in your browser (replace credentials accordingly):

pgsql
http://your-vicidial-server/vicidial/non_agent_api.php?function=call_status_stats&user=admin&pass=1234&source=CallStatusReport&start_date=2024-02-01&end_date=2024-02-15

🔹 Press Enter, and the API should generate and display call statistics.


Method 2: Retrieving Call Status Statistics via cURL (Command Line)

For developers, cURL is a convenient tool for making API requests. Use the following command:

bash
curl -X GET "http://your-vicidial-server/vicidial/non_agent_api.php?function=call_status_stats&user=admin&pass=1234&source=CallStatusReport&start_date=2024-02-01&end_date=2024-02-15"

🔹 This will return a CSV-formatted summary of call statuses in the terminal.


Method 3: Retrieving Call Status Statistics via Postman

1️⃣ Open Postman
2️⃣ Set the request type to GET
3️⃣ Enter the API URL
4️⃣ Click Send
5️⃣ The call status report should appear in the response window


Step 4: Understanding API Responses

If the request is successful, VICIdial returns a CSV-formatted response with call status statistics:

pgsql
Call Status,Total Calls
ANSWERED,250
DROP,75
BUSY,40
NO ANSWER,55
VOICEMAIL,30
ABANDONED,20

Breaking Down the Response

Column Description
Call Status The outcome of the call (ANSWERED, DROP, BUSY, etc.)
Total Calls The number of calls with that status

Step 5: Handling Errors & Troubleshooting

If something goes wrong, VICIdial will return an error message instead of a report.

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=call_status_stats is included
ERROR: NO DATA FOUND No calls match the filters Adjust date range, campaign, or agent ID filters

Step 6: Best Practices for Using the call_status_stats API

Use this API to generate daily or weekly performance reports
Integrate call status reports with CRM for automated updates
Restrict API access to prevent unauthorized data retrieval
Log API calls for auditing and security tracking
Regularly review reports to optimize call center campaigns


Conclusion

The call_status_stats API function is an essential tool for tracking call outcomes in VICIdial. Whether you’re evaluating agent performance, measuring campaign success, or integrating data with CRM, this API provides accurate and actionable insights into call trends.

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

- Advertisement -spot_img

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Special Offerspot_img

Must Read

spot_img
spot_img
spot_img

Related Articles - Must Read

spot_img