This method lets you retrieve details of all completed calls. The maximum number of results that you can fetch with a single API call is 20.
GET
https://api.plivo.com/v1/Account/{auth_id}/Zentrunk/Call/
All of these optional arguments let you filter which calls you retrieve details for.
from_number | The number from which the calls were made. You can filter the details by using the exact number or the prefix. |
to_number | The destination number to which the calls were made. You can filter the details by using the exact number or the prefix. |
call_direction | The direction of the call. Allowed values: inbound, outbound |
bill_duration | Filters calls by billed duration in seconds. The filter can be used in five forms:
|
end_time | Filters calls by completion time. The time format expected is YYYY-MM-DD HH:MM[:ss[.uuuuuu]]. The filter can be used in five forms:
You can combine these filters to get call detail records that were added during a particular time range. |
Note: You can retrieve only calls made in the last 90 days via APIs. Timestamps need to be UTC timestamps. |
|
hangup_cause_code | Retrieves calls that were hung up with a specific hangup cause code. Refer to our list of hangup causes and sources |
hangup_source | Retrieves calls that were hung up by a specific hangup source. Refer to our list of hangup causes and sources. Allowed values: customer, carrier, zentrunk |
limit | Limits the number of results retrieved. The maximum it can be set to is 20. Defaults to 20. |
offset | Denotes the number of value items by which the results should be offset. For example, if the results contains 1,000 values and limit is set to 10 and offset is set to 705, then values 706 through 715 are displayed in the results. This parameter is also used for pagination of the results. |
stir_verification | For outbound calls: Gives details about the STIR/SHAKEN attestation assigned to the call by Plivo. For inbound calls: Gives details about the attestation received on the call. Allowed values:
|
Returns the call objects that match the filters specified in the request.
{
"api_id": "a04ad809-3b78-4bbe-9baf-acfc7800b10f",
"meta": {
"limit": 20,
"offset": 0,
"total_count": 2,
"previous": null,
"next": null
},
"objects": [
{
"call_uuid": "90b6eb07-796c-4d86-a4fd-44ed11667ddb",
"from_number": "+12025551111",
"to_number": "+13128574907",
"call_direction": "outbound",
"call_duration": 4,
"bill_duration": 60,
"end_time": "2022-12-06 07:02:00",
"hangup_cause_name": "normal_hangup",
"hangup_source": "carrier",
"total_rate": "0.03000",
"total_amount": "0.00200",
“billed_duration”: 60,
"initiation_time": "2022-12-06 07:01:48",
"answer_time": "2022-12-06 07:01:56",
"trunk_domain": "93667062664669661.ap-south-1.zt.plivo.com",
"from_country": "IN",
"to_country": "IN",
"transport_protocol": "udp",
"srtp": false,
"hangup_cause_code": 3000,
"secure_trunking": false,
"secure_trunking_rate": "0.00000",
"stir_verification": "Verified",
"attestation_indicator": "A"
},
{
"call_uuid": "0b6eb07-796c-4d86-a4fd-44ed11667ddbe",
"from_number": "+912235328936",
"to_number": "+919943720205",
"call_direction": "outbound",
"trunk_id": "0b6eb07-796c-4d86-a4fd-44ed11667ddb",
"call_duration": 4,
"bill_duration": 4,
"end_time": "2022-12-06 07:02:00",
"hangup_cause_name": "normal_hangup",
"hangup_source": "carrier",
"total_rate": "0.03000",
"total_amount": "0.00200",
“billed_duration”: 60,
"initiation_time": "2022-12-06 07:01:48",
"answer_time": "2022-12-06 07:01:56",
"trunk_domain": "93667062664669661.ap-south-1.zt.plivo.com",
"from_country": "IN",
"to_country": "IN",
"transport_protocol": "udp",
"srtp": false,
"hangup_cause_code": 3000,
"secure_trunking": false,
"secure_trunking_rate": "0.00000",
"stir_verification": "Not Applicable",
"attestation_indicator": "null"
}
]
}