get https://api.servetel.in/v1/call/records
This API allows you to retrieve the call detail records.
Sample Request
curl --request GET \
--url https://api.servetel.in/v1/call/records \
--header 'accept: application/json'
📘 Important!
Before we begin, note that the * sign denotes the mandatory variables in each table.
Request Variables (Query Params)
The following parameter is required to retrieve the call detail records.
Variable Name | Description | Data Type |
---|---|---|
from_date | Date from where records need to be fetched Format: Y-m-d H:i:s | String |
to_date | Date till where records need to be fetched Format: Y-m-d H:i:s | String |
page | Page number | String |
limit | Number of records to be fetched | String |
agents | Array of agents containing values in below format: agent|id. | Array |
department | Unique IDs of departments | Array |
ivr | Unique IDs of IVRs | Array |
call_type | Type of the call. [ c = answered, m = missed ] | String |
callerid | Caller ID of the client [clients number] | String |
destination | Servetel number where incoming call is directed | String |
direction | Direction of the call (inbound/outbound) | String |
duration | Total duration of the call | String |
operator | Mathematical operator to be used for duration filter Allowed filters: [>, <, >=, <=, !=] | String |
services | Comma (,) separated services. | String |
broadcast | Whether records for broadcast is to be fetched or not. | String |
did_number | Number from which the call is routed from. | String |
Note: Names of the agents/department/ivr/broadcast will take values in lowercase.
Sample Response
{
"count": 1,
"limit": 20,
"size": 1,
"page": 1,
"results": [
{
"id": "66339a440ac50d47500dbc9e",
"call_id": "1714657799.11930963",
"uuid": "66339a0b7cfde",
"direction": "outbound",
"description": "Call answered by customer",
"detailed_description": null,
"status": "answered",
"blocked_number_id": null,
"recording_url": "https://customer.servetel.in/file/recording?callId=1714657799.11930963&type=rec&token=6a49cfa0f91dba7b6e23bd1f67c3775e",
"service": "Agent",
"date": "2024-05-02",
"time": "19:19:59",
"end_stamp": "2024-05-02 19:20:57",
"broadcast_id": null,
"dtmf_input": null,
"call_duration": 54,
"answered_seconds": 40,
"minutes_consumed": 2,
"charges": 0,
"department_name": null,
"agent_number": "+919888889999",
"agent_number_with_prefix": "+9198998889529",
"agent_name": "pqrs",
"client_number": "+91700003233",
"did_number": "+918069858731",
"reason": "disconnected_by_caller",
"hangup_cause": "Normal clearing",
"notes": null,
"contact_details": null,
"missed_agents": [],
"call_flow": [
{
"type": "init",
"value": "1714657799.11930963",
"time": "1714657803",
"readableTime": "02-05-2024 19:20:03"
},
{
"type": "Agent",
"id": "050109590016",
"name": "xyz",
"dialst": "Dialed",
"num": "+9198000099929",
"time": 1714657803,
"readableTime": "02-05-2024 19:20:03"
},
{
"type": "ClickToCall",
"name": "SIP/+20607011215773@TATA-BLR-UNLIMITED-8069182000_6163f238316cf",
"time": 1714657803,
"readableTime": "02-05-2024 19:20:03"
},
{
"type": "Agent",
"id": null,
"name": null,
"number": "20607011215773",
"time": 1714657817,
"dialst": "Answered",
"readableTime": "02-05-2024 19:20:17"
},
{
"anstime": 1714657817,
"time": 1714657857
},
{
"type": "hangup",
"time": 1714657857,
"readableTime": "02-05-2024 19:20:57"
}
],
"accountid": "Demo Account",
"agent_ring_time": "N.A.",
"circle": {
"operator": "Jio",
"circle": "Delhi"
},
"agent_hangup_data": null,
"transfer_missed_agent": [],
"call_hint": "clicktocall",
"support_api_call": false,
"lead_id": null,
"is_incoming_from_broadcast": false,
"caller_id_num": "+918069858731",
"sip_agent_ids": null,
"dialer_call_details": null,
"custom_status": null,
"voicemail_recording": false,
"aws_call_recording_identifier": "a72e103c2a8f6a5f418443801d25e7cc"
}
]
}
Response Variables
The response returned is as following:
Variable Name | Description | Data Type |
---|---|---|
count | Number of records that are fetched. | Integer |
limit | Number of records to be fetched. | Integer |
size | Integer | |
page | Index of the page. | Integer |
results[].id | Unique ID of the record. | String |
results[].call_id | The unique ID of the call that allows customers to fetch call related details. For example,1627373566.350603. | String |
results[].uuid | The call ID of the number that helps to track the different triggers for a particular call. For example, 61111f5e708c5. | String |
results[].direction | The direction of the call. The possible values are:
| String |
results[].description | Description of the call detail record. | String |
results[].detailed_description | Detailed description of the call detail record. | String |
results[].status | The status of the call response. For example, missed | String |
results[].blocked_number_id | Unique ID of the blocked number. | String |
results[].recording_url | The URL of the recorded call. | String |
results[].service | The type of call services. For example, Click to Call. Note: These are separated by commas. | String |
results[].date | The date on which the call was made. For example, the format is YYYY-MM-DD (2021-03-10). | String |
results[].time | The time on which the call was made. For example, the format is hh:mm:ss, (17:16:18). | String |
results[].end_stamp | The time_stamp on which the call was made. For example, the format is YYYY-MM-DD hh:mm:ss, (2021-03-10 17:16:18). | String |
results[].broadcast_id | The ID of the braodcast call. For example: 3432. | String |
results[].dtmf_input | The number pressed by the customer on hearing the IVR. For example: 3432. | String |
results[].call_duration | The total duration of the call. For example, 30. | Integer |
results[].answered_seconds | The total duration of the call in seconds after getting answered. For example, 90. | Integer |
results[].minutes_consumed | The time in minutes consumed in the call. For example, 2. | Integer |
results[].charges | charged at applied to the call. | |
results[].department_name | Name of the department. | String |
results[].agent_number | Number of the agent. | String |
results[].agent_number_with_prefix | Number of the agent with prefix. | String |
results[].agent_name | Name of the agent. | String |
results[].client_number | Number of the client to whom the call was connected. | String |
results[].did_number | The DID from which the agent makes or receives the call. For example, 918069010149. | String |
results[].reason | Hangup reason. (Used internally) | String |
results[].hangup_cause | Cause for hanging up the call. | String |
results[].notes | Call note added to the call. | Object |
results[].contact_details | The contact number and name of the client. For example, 91XXXXXXXXX. | Object |
results[].missed_agents | The details of the agents who missed the call. | Array |
results[].call_flow | Complete call flow of the call, details can vary depending upon the type of call. | Array |
results[].account_id | Client ID of the user. | String |
results[].agent_ring_time | Time duration for which the call was ringed for the agent. | String |
results[].circle.operator | Operator of the circle. | String |
results[].circle.circle | State of the circle. | String |
results[].agent_hangup_data | All details of the call after being disposed. | String |
results[].transfer_missed_agent | Whether the transferred agent missed the call or not. | Array |
results[].call_hint | Type of the call. For example: C2C, dialer, etc. | String |
results[].support_api_call | Whether the support API is called or not. | Boolean |
results[].lead_id | Unique ID of the lead. | String |
results[].is_incoming_from_broadcast | Whether the call is an incoming on broadcast. | Boolean |
results[].caller_id_num | Caller ID number of the call. | String |
results[].dialer_call_details | Call details in case the type of the call is dialer. | Object |
results[].voicemail_recording | Whether the call is on voicemail or not. | Boolean |
results[].aws_call_recording_identifier | Unique identifier when the call is uploaded on AWS. | String |