Call Records (CDR)
Call Detail Records
A call detail record is a data record produced by a telephone exchange.
The record contains various attributes of the call, such as time, duration, completion status, source number, and destination number.
A detailed list of call logs can be retrieved using the below method.
curl --request GET \
--url https://api.servetel.in/v1/call/records \
--header 'accept: application/json' \
--header 'authorization: Bearer yourtokenhere'
Query Parameters
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 |
Note:
Names of the agents/department/ivr/broadcast will take values in lowercase
{
"count": 1,
"limit": 20,
"size": 20,
"page": 1,
"results": [{
"id": 1,
"call_id": "123456789.987654321",
"uuid": "5e3c0abcdefghty",
"direction": "inbound",
"description": "Call answered by Test Agent 1 (919876543210)",
"detailed_description": null,
"status": "answered",
"blocked_number_id": null,
"recording_url": "https://recording_path/123/123_recording_id.mp3",
"service": "Agent: Test Agent 1",
"date": "2020-01-01",
"time": "11:59:59",
"end_stamp": "2020-01-01 11:59:59",
"broadcast_id": null,
"dtmf_input": null,
"call_duration": 1,
"answered_seconds": 1,
"minutes_consumed": 1,
"charges": 0,
"department_name": null,
"agent_number": "+919876543210",
"agent_name": "Test Agent 1",
"client_number": "+919874563210",
"did_number": "+911204000000",
"reason": null,
"hangup_cause": "Normal clearing",
"notes": null,
"contact_details": {
"field_0": "+919874563210",
"field_1": "Test Client"
},
"missed_agents": [{
"name": "Test Agent 2",
"number": "+919874561230"
}],
"call_flow": [{
"type": "init",
"value": "123456789.987654321",
"time": "1577879999"
}]
}]
}
Updated 4 months ago