V 2.0
Overall Count
Description
This API is designed to monitor and manage live call data across various categories and parameters. It provides a detailed view of all active and running calls for a user or organization. The system tracks call counts in real-time, offering insights into specific call types, campaigns, IVR interactions, and more.
Error Codes
| Error Code | Message | Description |
|---|---|---|
| 1000 | Invalid parameter | One or more request parameters are invalid. |
| 1001 | Invalid data type | The data type of a parameter is incorrect. |
| 1002 | UserId not provided | The userId parameter is missing in the request. |
| 1010 | Error in DB connect | Database connection error occurred. |
| 1015 | Permission denied | User does not have permission to access this API. |
| 1032 | Internal server error | An unexpected server-side error occurred. |
| 1043 | Agent is not logged in | The agent is not currently logged in. |
Notes
-
Authentication: Ensure that the
userIdandtokenare valid and match an active session to avoid authentication errors. -
Filtering Data: Use the
filterparameter to specify conditions like date ranges, call types, or other fields to refine the response data. -
Data Categorization: Metrics like
LCT,RCMPID, andDIDprovide a granular view of call statistics, useful for analytics and operational monitoring. - Error Handling: Always check the error codes in the response for debugging issues or invalid requests.
- Real-Time Updates: The API provides real-time data updates, making it suitable for live dashboards and monitoring systems.
- Scalability: Designed to handle high call volumes with detailed counters, ensuring insights across multiple campaigns or user groups.
Ecounters
Endpoint
-
Method: POST
-
Path:
deepcall/api/v2/overallCount/Ecounters
Description: Provides a comprehensive overview of all call counters, including live calls, running calls, and categorized counters such as DID numbers, DTMF calls, transferred calls, ghost calls, missed calls, and more.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ssid | String | No | Session ID for the user's current session. |
| userId | String | Yes | Unique identifier for the user. |
| token | String | Yes | Authorization token for the user session. |
| filter | Array | No | Array of filter conditions (e.g., date ranges, call types). |
| Field | Array | No | Array of additional fields to include in the response. |
Field Descriptions
| Field | Description |
|---|---|
| UC | Unique Call |
| TC | Approached Call |
| MC | Missed Counts |
| AC | Answered Count |
| CM | Completely Missed |
| PM | Partially Missed |
| CA | Completely Answered |
| FR_CAN_FR_PM_N | Retried and Answered Count Des |
| GH_UC | Ghost Calls Unique |
| FR_UC | FailOver Retry Unique Call |
| FR_CM | FailOver Retry Completely Missed |
| FR_PM | FailOver Retry Partially Missed |
| FR_CA | FailOver Retry Completely Answered |
| FR_GH_UC | FailOver Retry Ghost Unique Call |
| FR_GH_N | FailOver Retry Ghost on Node |
| FR_UC_N | Retry Counts2 |
| FR_CM_N | Retried and Missed Count |
| FR_PM_N | Retried and Partially Missed Count |
| FR_CA_N | Retried and Completely Answered Count |
| avgRingTime | Average Ring Time |
| avgHoldTime | Average Hold Time |
| ringTime | Actual Ring Time |
| holdTime | Actual Hold Time |
| actualTT | Actual Talk Time |
| avgTalkTime | Average Talk Time |
Response
The response includes the following counters and their descriptions:
| Field | Description |
|---|---|
| LCT | Total live call counts categorized as: IBD (Inbound), OBD (Outbound), BRD (Broadcast), QC (Quick). |
| RC | Total number of active calls across all campaigns. |
| RCMPID | Running calls grouped by campaign IDs. |
| LIVR | Live IVR calls grouped by IVR IDs. |
| CMPID | Total call counts grouped by campaign IDs. |
| DID | Call counters based on DID numbers (Direct Inward Dialing). |
| DTMF | Call counters categorized by DTMF (Dual-tone Multi-frequency signaling) input. |
| GHC | Ghost call counter, tracking calls that were initiated but failed to connect properly. |
| TRSC | Transferred call counter, tracking the number of calls transferred. |
| MC | Missed call counter, tracking the number of calls not answered. |
| TC | Total calls counter, representing the aggregate of all calls. |
| repeatCall | Repeat call counter, tracking calls from the same number within a specific period. |
| freshCall | Fresh call counter, tracking first-time calls from unique numbers. |
| CNC | Connect call counter, tracking successfully connected calls. |
| ucBl | User balance, tracking the remaining account balance for the user. |
Ecounters
var axios = require('axios');
var data = '{"ssid":"{{ssid}}"}';
var config = {
method: 'post',
url: '{{brand}}/api/v2/overallCount/Ecounters',
headers: {
'Content-Length': ''
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
setUrl('{{brand}}/api/v2/overallCount/Ecounters');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'Content-Length' => ''
));
$request->setBody('{"ssid":"{{ssid}}"}');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}import http.client
conn = http.client.HTTPSConnection("{{brand}}")
payload = "{\"ssid\":\"{{ssid}}\"}"
headers = {
'Content-Length': ''
}
conn.request("POST", "/api/v2/overallCount/Ecounters", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))var client = new RestClient("{{brand}}/api/v2/overallCount/Ecounters");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
var body = @"{" + "\n" +
@" ""ssid"":""{{ssid}}""" + "\n" +
@"}";
request.AddParameter("text/plain", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);curl --location -g --request POST '{{brand}}/api/v2/overallCount/Ecounters' \
--data-raw '{
"ssid":"{{ssid}}"
}'var request = http.Request('POST', Uri.parse('{{brand}}/api/v2/overallCount/Ecounters'));
request.body = '''{\n "ssid":"{{ssid}}"\n}''';
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "%7B%7Bbrand%7D%7D/api/v2/overallCount/Ecounters"
method := "POST"
payload := strings.NewReader(`{
"ssid":"{{ssid}}"
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}POST /api/v2/overallCount/Ecounters HTTP/1.1
Host: {{brand}}
Content-Length: 25
{
"ssid":"{{ssid}}"
}OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "{\n \"ssid\":\"{{ssid}}\"\n}");
Request request = new Request.Builder()
.url("{{brand}}/api/v2/overallCount/Ecounters")
.method("POST", body)
.addHeader("Content-Length", "")
.build();
Response response = client.newCall(request).execute();var myHeaders = new Headers();
myHeaders.append("Content-Length", "");
var raw = "{\n \"ssid\":\"{{ssid}}\"\n}";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{{brand}}/api/v2/overallCount/Ecounters", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "%7B%7Bbrand%7D%7D/api/v2/overallCount/Ecounters");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Content-Length: ");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
const char *data = "{\n \"ssid\":\"{{ssid}}\"\n}";
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
#import
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"%7B%7Bbrand%7D%7D/api/v2/overallCount/Ecounters"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"Content-Length": @""
};
[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"{\n \"ssid\":\"{{ssid}}\"\n}" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER); open Lwt
open Cohttp
open Cohttp_lwt_unix
let postData = ref "{\n \"ssid\":\"{{ssid}}\"\n}";;
let reqBody =
let uri = Uri.of_string "%7B%7Bbrand%7D%7D/api/v2/overallCount/Ecounters" in
let headers = Header.init ()
|> fun h -> Header.add h "Content-Length" ""
in
let body = Cohttp_lwt.Body.of_string !postData in
Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
body |> Cohttp_lwt.Body.to_string >|= fun body -> body
let () =
let respBody = Lwt_main.run reqBody in
print_endline (respBody)$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Length", "")
$body = "{`n `"ssid`":`"{{ssid}}`"`n}"
$response = Invoke-RestMethod '{{brand}}/api/v2/overallCount/Ecounters' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Jsonrequire "uri"
require "net/http"
url = URI("{{brand}}/api/v2/overallCount/Ecounters")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Content-Length"] = ""
request.body = "{\n \"ssid\":\"{{ssid}}\"\n}"
response = http.request(request)
puts response.read_body
printf '{
"ssid":"{{ssid}}"
}'| http --follow --timeout 3600 POST '{{brand}}/api/v2/overallCount/Ecounters' \
Content-Length:import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
var semaphore = DispatchSemaphore (value: 0)
let parameters = "{\n \"ssid\":\"{{ssid}}\"\n}"
let postData = parameters.data(using: .utf8)
var request = URLRequest(url: URL(string: "{{brand}}/api/v2/overallCount/Ecounters")!,timeoutInterval: Double.infinity)
request.addValue("", forHTTPHeaderField: "Content-Length")
request.httpMethod = "POST"
request.httpBody = postData
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
semaphore.signal()
return
}
print(String(data: data, encoding: .utf8)!)
semaphore.signal()
}
task.resume()
semaphore.wait()
Example Response
[{"key":"Date"
"value":"Wed
27 Nov 2024 06:53:38 GMT"}
{"key":"Content-Type"
"value":"application\/json; charset=utf-8"}
{"key":"Content-Length"
"value":"282"}
{"key":"Connection"
"value":"keep-alive"}
{"key":"Access-Control-Allow-Origin"
"value":"*"}
{"key":"Access-Control-Allow-Methods"
"value":"POST
GET
OPTIONS
PATCH
DELETE"}
{"key":"Access-Control-Allow-Headers"
"value":"X-Requested-With
content-type"}
{"key":"Access-Control-Allow-Credentials"
"value":"true"}
{"key":"Vary"
"value":"Origin"}
{"key":"ETag"
"value":"W\/\"11a-HFF66YNcSs5WoIJy6+TSUnmUgDk\""}
{"key":"Strict-Transport-Security"
"value":"max-age=31536000; includeSubDomains"}]
{
"message": {
"LCT": {},
"RCMPID": {},
"RC": 0,
"LIVR": {},
"LDID": {},
"cBl": 0,
"CT": {
"CTC": 2
},
"CST": {
"3": 1,
"6": 1
},
"CMPID": {},
"DID": {},
"DTMF": {},
"DTMFV": {},
"DTMFI": {},
"DTMFINV": {},
"GHC": 0,
"FWC": 0,
"TRSC": 2,
"MC": 0,
"ucBl": 0,
"TC": 2,
"repeatCall": 0,
"freshCall": 2,
"CHSR": 0,
"CNC": 2
},
"status": "success"
}