Call Detail 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 NameDescriptionData Type
from_dateDate from where records need to be fetched
Format: Y-m-d H:i:s
String
to_dateDate till where records need to be fetched
Format: Y-m-d H:i:s
String
pagePage numberString
limitNumber of records to be fetchedString
agentsArray of agents containing values in below format:
agent|id.
Array
departmentUnique IDs of departmentsArray
ivrUnique IDs of IVRsArray
call_typeType of the call.
[ c = answered, m = missed ]
String
calleridCaller ID of the client
[clients number]
String
destinationServetel number where incoming call is directedString
directionDirection of the call (inbound/outbound)String
durationTotal duration of the callString
operatorMathematical operator to be used for duration filter

Allowed filters:
[>, <, >=, <=, !=]
String
servicesComma (,) separated services.String
broadcastWhether records for broadcast is to be fetched or not.String
did_numberNumber 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 NameDescriptionData Type
countNumber of records that are fetched.Integer
limitNumber of records to be fetched.Integer
sizeInteger
pageIndex of the page.Integer
results[].idUnique ID of the record.String
results[].call_idThe unique ID of the call that allows customers to fetch call related details. For example,1627373566.350603.String
results[].uuidThe call ID of the number that helps to track the different triggers for a particular call. For example, 61111f5e708c5.String
results[].directionThe direction of the call. The possible values are:
  • Inbound
  • Outbound
String
results[].descriptionDescription of the call detail record.String
results[].detailed_descriptionDetailed description of the call detail record.String
results[].statusThe status of the call response. For example, missedString
results[].blocked_number_idUnique ID of the blocked number.String
results[].recording_urlThe URL of the recorded call.String
results[].serviceThe type of call services. For example, Click to Call.
Note: These are separated by commas.
String
results[].dateThe date on which the call was made. For example, the format is YYYY-MM-DD (2021-03-10).String
results[].timeThe time on which the call was made. For example, the format is hh:mm:ss, (17:16:18).String
results[].end_stampThe 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_idThe ID of the braodcast call. For example: 3432.String
results[].dtmf_inputThe number pressed by the customer on hearing the IVR. For example: 3432.String
results[].call_durationThe total duration of the call. For example, 30.Integer
results[].answered_secondsThe total duration of the call in seconds after getting answered. For example, 90.Integer
results[].minutes_consumedThe time in minutes consumed in the call. For example, 2.Integer
results[].chargescharged at applied to the call.
results[].department_nameName of the department.String
results[].agent_numberNumber of the agent.String
results[].agent_number_with_prefixNumber of the agent with prefix.String
results[].agent_nameName of the agent.String
results[].client_numberNumber of the client to whom the call was connected.String
results[].did_numberThe DID from which the agent makes or receives the call. For example, 918069010149.String
results[].reasonHangup reason. (Used internally)String
results[].hangup_causeCause for hanging up the call.String
results[].notesCall note added to the call.Object
results[].contact_detailsThe contact number and name of the client. For example, 91XXXXXXXXX.Object
results[].missed_agentsThe details of the agents who missed the call.Array
results[].call_flowComplete call flow of the call, details can vary depending upon the type of call.Array
results[].account_idClient ID of the user.String
results[].agent_ring_timeTime duration for which the call was ringed for the agent.String
results[].circle.operatorOperator of the circle.String
results[].circle.circleState of the circle.String
results[].agent_hangup_dataAll details of the call after being disposed.String
results[].transfer_missed_agentWhether the transferred agent missed the call or not.Array
results[].call_hintType of the call. For example: C2C, dialer, etc.String
results[].support_api_callWhether the support API is called or not.Boolean
results[].lead_idUnique ID of the lead.String
results[].is_incoming_from_broadcastWhether the call is an incoming on broadcast.Boolean
results[].caller_id_numCaller ID number of the call.String
results[].dialer_call_detailsCall details in case the type of the call is dialer.Object
results[].voicemail_recordingWhether the call is on voicemail or not.Boolean
results[].aws_call_recording_identifierUnique identifier when the call is uploaded on AWS.String
Language
Click Try It! to start a request and see the response here!