Call Detail Records

This API allows you to retrieve the call detail records.

Sample Request

curl --request GET \
     --url https://api-smartflo.tatateleservices.com/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": 406,
  "limit": 20,
  "size": 20,
  "page": 1,
  "results": [    
     {
      "id": "663c6bc92b66f80b611f8f40",
      "call_id": "1715235734.129662",
      "uuid": "48e0d4fbe3ad9",
      "direction": "inbound",
      "description": "Call answered",
      "detailed_description": null,
      "status": "answered",
      "blocked_number_id": null,
      "recording_url": "https://cloudphone.tatateleservices.com/file/recording?callId=1715235734.129662&type=rec&token=d48061c8381229980fa3dbac677add32",
      "service": "Dialer",
      "date": "2024-05-09",
      "time": "11:52:14",
      "end_stamp": "2024-05-09 11:53:02",
      "broadcast_id": null,
      "dtmf_input": null,
      "call_duration": 48,
      "answered_seconds": 31,
      "minutes_consumed": 0,
      "charges": 0,
      "department_name": null,
      "agent_number": "Extension-06047530219",
      "agent_number_with_prefix": "Extension-06047530219",
      "agent_name": "Parag Yadav",
      "client_number": "919650134255",
      "did_number": "+918069651170",
      "reason": "disconnected_by_caller",
      "hangup_cause": "Normal clearing",
      "notes": null,
      "contact_details": {
        "id": 35866918,
        "field_0": "+919650134255",
        "field_1": "parag"
      },
      "missed_agents": [],
      "call_flow": [
        {
          "type": "init",
          "value": "1715235734.129662",
          "time": 1715235734.438,
          "readableTime": "09-05-2024 11:52:14"
        },
        {
          "app_data": "test parag dialer",
          "app_id": "53273",
          "app_name": "Dialer Campaign",
          "dept_dialst": "Answered",
          "id": "10060",
          "name": "AHMM",
          "ringst": 1,
          "time": 1715235734.438,
          "type": "Inbound Queue",
          "readableTime": "09-05-2024 11:52:14"
        },
        {
          "type": "Customer",
          "dialst": "Answered",
          "time": 1715235734.541,
          "readableTime": "09-05-2024 11:52:14"
        },
        {
          "type": "Agent",
          "id": "05047530422",
          "name": "Parag Yadav",
          "num": "Extension-06047530219",
          "dialst": "Dialed",
          "app_id": 53273,
          "time": 1715235747.393,
          "readableTime": "09-05-2024 11:52:27"
        },
        {
          "type": "Agent",
          "id": "05047530422",
          "name": "Parag Yadav",
          "num": "Extension-06047530219",
          "dialst": "Answered",
          "app_id": 53273,
          "time": 1715235751.901,
          "readableTime": "09-05-2024 11:52:31"
        },
        {
          "type": "Agent-Hangup",
          "id": "05047530422",
          "name": "Parag Yadav",
          "time": 1715235782.812,
          "readableTime": "09-05-2024 11:53:02"
        },
        {
          "type": "Hangup",
          "time": 1715235782.812,
          "readableTime": "09-05-2024 11:53:02"
        }
      ],
      "accountid": "Shrish.test",
      "agent_ring_time": "N.A.",
      "circle": {
        "operator": "Airtel India",
        "circle": "Delhi"
      },
      "agent_hangup_data": [
        {
          "id": "05047530422",
          "name": "Parag Yadav(Extension-06047530219)",
          "timegroup_id": null,
          "timegroup_name": null,
          "disposition": "ANSWERED",
          "time": 1715235747.393,
          "readableTime": "09-05-2024 11:52:27"
        }
      ],
      "transfer_missed_agent": [],
      "call_hint": "dialer",
      "support_api_call": false,
      "lead_id": "62415995212bae083f1e4592",
      "is_incoming_from_broadcast": false,
      "caller_id_num": "+919650134255",
      "sip_agent_ids": null,
      "dialer_call_details": {
        "customer_ring_time": 0,
        "call_wait_time": 18,
        "agent_talk_time": 30,
        "total_hold_duration": null,
        "hold_count": null,
        "disposition_id": null,
        "total_call_duration": 48,
        "disposition_name": "Undisposed",
        "disposition_code": "UNDIS",
        "hangup_cause": 16,
        "sub_disposition_id": null,
        "sub_disposition_name": null,
        "sub_disposition_code": null,
        "call_type": "inbound",
        "dialin_enabled": null,
        "dialout_enabled": true,
        "campaign_id": 53273,
        "campaign_name": "test parag dialer",
        "list_id": "149897",
        "list_name": "test parag",
        "extension_dialer": true,
        "dialer_queue_details": [
          {
            "queue_details": {
              "app_data": "test parag dialer",
              "app_id": "53273",
              "app_name": "Dialer Campaign",
              "dept_dialst": "Answered",
              "id": "10060",
              "name": "AHMM",
              "ringst": 1,
              "time": 1715235734.438,
              "type": "Inbound Queue",
              "readableTime": "09-05-2024 11:52:14"
            },
            "missed_by": [],
            "answered_by": {
              "type": "Agent",
              "id": "05047530422",
              "name": "Parag Yadav",
              "num": "Extension-06047530219",
              "dialst": "Answered",
              "app_id": 53273,
              "time": 1715235751.901,
              "readableTime": "09-05-2024 11:52:31"
            }
          }
        ],
        "dialer_queue_transfer_details": [],
        "inbound_queue": "AHMM",
        "is_short_call": "No",
        "sla_status": "Call answered outside SLA",
        "feedback_rating": null,
        "feedback_recording_type": null,
        "disposition_duration": 0,
        "first_call_resolution": "No",
        "agent_call_duration": "Parag Yadav: 31",
        "agents_call_details": {
          "05047530422": {
            "hold_duration": 0,
            "hold_count": 0
          }
        }
      },
      "custom_status": null,
      "voicemail_recording": false,
      "aws_call_recording_identifier": "4a2085b89941a442783d7d79414ac3bd"
    },.......
  ]
}

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!