# Call Detail Records

Manage your call detail records.

## List CDRs

> Retrieve a collection of call detail records.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[{"name":"CDR","description":"Manage your call detail records.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/cdrs":{"get":{"tags":["CDR"],"operationId":"listCDRs","summary":"List CDRs","description":"Retrieve a collection of call detail records.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64","minimum":0,"description":"Total number of resource.\n"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of CDR.\n"},"caller":{"type":"string","maxLength":256,"description":"The caller number of the call.\n"},"caller_domain":{"type":"string","maxLength":1024,"description":"The caller domain of the call.\n"},"caller_display_name":{"type":"string","maxLength":1024,"description":"The caller display name of the call.\n"},"callee":{"type":"string","maxLength":256,"description":"The callee number of the call.\n"},"callee_domain":{"type":"string","maxLength":1024,"description":"The callee domain of the call.\n"},"callee_display_name":{"type":"string","maxLength":1024,"description":"The callee display name of the call.\n"},"started_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The start time of the call.\n"},"rang_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The ringing time of the call.\n"},"answered_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The answer time of the call.\n"},"ended_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The end time of the call.\n"},"call_id":{"type":"string","description":"The call ID of CDR.\n"},"direction":{"type":"string","enum":["INBOUND_CALL","OUTBOUND_CALL","EXTENSION_CALL","INBOUND_OUTBOUND_CALL"],"description":"The direction of CDR:\n- `INBOUND_CALL`:\n- `OUTBOUND_CALL`:\n- `EXTENSION_CALL`:\n- `INBOUND_OUTBOUND_CALL`:\n"},"end_reason":{"type":"string","enum":["CALLER_DISCONNECTED","CALLEE_DISCONNECTED","BLIND_TRANSFER_COMPLETED","CONSULT_TRANSFER_COMPLETED","REPLACED","REFERRED","REDIRECTED","CANCELLED"],"description":"The ended reason of CDR:  \nCan be either:  \n- `CALLER_DISCONNECTED`:\n- `CALLEE_DISCONNECTED`:\n- `BLIND_TRANSFER_COMPLETED`:\n- `CONSULT_TRANSFER_COMPLETED`:\n- `REPLACED`:\n- `REFERRED`:\n- `REDIRECTED`:\n- `CANCELLED`:\n"},"reroute_reason":{"type":"string","enum":["TRANSFER","OVERFLOW","CAPACITY_BLOCKED","QUEUE_EXIT","QUEUE_ABANDONED","REDIRECT","FORWARDING_UNCONDITIONAL","FORWARDING_BUSY","FORWARDING_NO_ANSWER","FORWARDING_NOT_REACHABLE","FORWARDING_EXCEPTION","FORWARDING_LUNCH","FORWARDING_BUSINESS_TRIP","FORWARDING_AWAY","FORWARDING_NIGHT_MODE","DISA"],"description":"The reroute reason of CDR:  \nCan be either:  \n- `TRANSFER`:\n- `OVERFLOW`:\n- `CAPACITY_BLOCKED`:\n- `QUEUE_EXIT`:\n- `QUEUE_ABANDONED`:\n- `REDIRECT`:\n- `FORWARDING_UNCONDITIONAL`:\n- `FORWARDING_BUSY`:\n- `FORWARDING_NO_ANSWER`:\n- `FORWARDING_NOT_REACHABLE`:\n- `FORWARDING_EXCEPTION`:\n- `FORWARDING_LUNCH`:\n- `FORWARDING_BUSINESS_TRIP`:\n- `FORWARDING_AWAY`:\n- `FORWARDING_NIGHT_MODE`:\n- `DISA`:\n"},"status_code":{"type":"integer","description":"The status code of CDR.\n"},"destination":{"type":"string","description":"The destination number of CDR.\n"},"outbound_caller_id":{"type":"string","minLength":1,"maxLength":64,"description":"Outbound caller id.\n"},"did_cid":{"type":"string","description":"The DID CID of CDR.\n"},"trunk":{"type":"string","description":"The trunk name of CDR.\n"},"duration":{"type":"integer","format":"int32","description":"The total talk time for a session (in seconds).\n"},"service_number":{"type":"string","description":"The service number of the call.\n"},"user_data":{"type":"string","description":"The additional custom user data of CDR.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Retrieve CDR detailed information.

> Retrieve details of CDR.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[{"name":"CDR","description":"Manage your call detail records.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/cdrs/{id}":{"get":{"tags":["CDR"],"operationId":"retrieveCDR","summary":"Retrieve CDR detailed information.","description":"Retrieve details of CDR.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of CDR.\n"},"description":"The unique ID of the CDR."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"caller":{"type":"string","maxLength":256,"description":"The caller number of the call.\n"},"caller_domain":{"type":"string","maxLength":1024,"description":"The caller domain of the call.\n"},"caller_display_name":{"type":"string","maxLength":1024,"description":"The caller display name of the call.\n"},"callee":{"type":"string","maxLength":256,"description":"The callee number of the call.\n"},"callee_domain":{"type":"string","maxLength":1024,"description":"The callee domain of the call.\n"},"callee_display_name":{"type":"string","maxLength":1024,"description":"The callee display name of the call.\n"},"started_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The start time of the call.\n"},"rang_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The ringing time of the call.\n"},"answered_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The answer time of the call.\n"},"ended_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The end time of the call.\n"},"call_id":{"type":"string","description":"The call ID of CDR.\n"},"direction":{"type":"string","enum":["INBOUND_CALL","OUTBOUND_CALL","EXTENSION_CALL","INBOUND_OUTBOUND_CALL"],"description":"The direction of CDR:\n- `INBOUND_CALL`:\n- `OUTBOUND_CALL`:\n- `EXTENSION_CALL`:\n- `INBOUND_OUTBOUND_CALL`:\n"},"end_reason":{"type":"string","enum":["CALLER_DISCONNECTED","CALLEE_DISCONNECTED","BLIND_TRANSFER_COMPLETED","CONSULT_TRANSFER_COMPLETED","REPLACED","REFERRED","REDIRECTED","CANCELLED"],"description":"The ended reason of CDR:  \nCan be either:  \n- `CALLER_DISCONNECTED`:\n- `CALLEE_DISCONNECTED`:\n- `BLIND_TRANSFER_COMPLETED`:\n- `CONSULT_TRANSFER_COMPLETED`:\n- `REPLACED`:\n- `REFERRED`:\n- `REDIRECTED`:\n- `CANCELLED`:\n"},"reroute_reason":{"type":"string","enum":["TRANSFER","OVERFLOW","CAPACITY_BLOCKED","QUEUE_EXIT","QUEUE_ABANDONED","REDIRECT","FORWARDING_UNCONDITIONAL","FORWARDING_BUSY","FORWARDING_NO_ANSWER","FORWARDING_NOT_REACHABLE","FORWARDING_EXCEPTION","FORWARDING_LUNCH","FORWARDING_BUSINESS_TRIP","FORWARDING_AWAY","FORWARDING_NIGHT_MODE","DISA"],"description":"The reroute reason of CDR:  \nCan be either:  \n- `TRANSFER`:\n- `OVERFLOW`:\n- `CAPACITY_BLOCKED`:\n- `QUEUE_EXIT`:\n- `QUEUE_ABANDONED`:\n- `REDIRECT`:\n- `FORWARDING_UNCONDITIONAL`:\n- `FORWARDING_BUSY`:\n- `FORWARDING_NO_ANSWER`:\n- `FORWARDING_NOT_REACHABLE`:\n- `FORWARDING_EXCEPTION`:\n- `FORWARDING_LUNCH`:\n- `FORWARDING_BUSINESS_TRIP`:\n- `FORWARDING_AWAY`:\n- `FORWARDING_NIGHT_MODE`:\n- `DISA`:\n"},"status_code":{"type":"integer","description":"The status code of CDR.\n"},"destination":{"type":"string","description":"The destination number of CDR.\n"},"outbound_caller_id":{"type":"string","minLength":1,"maxLength":64,"description":"Outbound caller id.\n"},"did_cid":{"type":"string","description":"The DID CID of CDR.\n"},"trunk":{"type":"string","description":"The trunk name of CDR.\n"},"duration":{"type":"integer","format":"int32","description":"The total talk time for a session (in seconds).\n"},"cost":{"type":"number","format":"double","description":"The cost for this call.\n"},"billed_account":{"type":"string","description":"The account name for billing.\n"},"service_number":{"type":"string","description":"The service number of the call.\n"},"user_data":{"type":"string","description":"The additional custom user data of CDR.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## List call logs

> Retrieve a collection of call logs.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[{"name":"CDR","description":"Manage your call detail records.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/calllogs":{"get":{"tags":["CDR"],"operationId":"listCallLogs","summary":"List call logs","description":"Retrieve a collection of call logs.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64","minimum":0,"description":"Total number of resource.\n"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of CDR.\n"},"session_id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The session ID of call log.\n"},"caller":{"type":"string","maxLength":256,"description":"The caller number of the call.\n"},"caller_domain":{"type":"string","maxLength":1024,"description":"The caller domain of the call.\n"},"caller_display_name":{"type":"string","maxLength":1024,"description":"The caller display name of the call.\n"},"callee":{"type":"string","maxLength":256,"description":"The callee number of the call.\n"},"callee_domain":{"type":"string","maxLength":1024,"description":"The callee domain of the call.\n"},"callee_display_name":{"type":"string","maxLength":1024,"description":"The callee display name of the call.\n"},"started_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The start time of the call.\n"},"rang_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The ringing time of the call.\n"},"answered_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The answer time of the call.\n"},"ended_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The end time of the call.\n"},"call_id":{"type":"string","description":"The call ID of CDR.\n"},"direction":{"type":"string","enum":["INBOUND_CALL","OUTBOUND_CALL","EXTENSION_CALL","INBOUND_OUTBOUND_CALL"],"description":"The direction of CDR:\n- `INBOUND_CALL`:\n- `OUTBOUND_CALL`:\n- `EXTENSION_CALL`:\n- `INBOUND_OUTBOUND_CALL`:\n"},"end_reason":{"type":"string","enum":["CALLER_DISCONNECTED","CALLEE_DISCONNECTED","BLIND_TRANSFER_COMPLETED","CONSULT_TRANSFER_COMPLETED","REPLACED","REFERRED","REDIRECTED","CANCELLED"],"description":"The ended reason of CDR:  \nCan be either:  \n- `CALLER_DISCONNECTED`:\n- `CALLEE_DISCONNECTED`:\n- `BLIND_TRANSFER_COMPLETED`:\n- `CONSULT_TRANSFER_COMPLETED`:\n- `REPLACED`:\n- `REFERRED`:\n- `REDIRECTED`:\n- `CANCELLED`:\n"},"reroute_reason":{"type":"string","enum":["TRANSFER","OVERFLOW","CAPACITY_BLOCKED","QUEUE_EXIT","QUEUE_ABANDONED","REDIRECT","FORWARDING_UNCONDITIONAL","FORWARDING_BUSY","FORWARDING_NO_ANSWER","FORWARDING_NOT_REACHABLE","FORWARDING_EXCEPTION","FORWARDING_LUNCH","FORWARDING_BUSINESS_TRIP","FORWARDING_AWAY","FORWARDING_NIGHT_MODE","DISA"],"description":"The reroute reason of CDR:  \nCan be either:  \n- `TRANSFER`:\n- `OVERFLOW`:\n- `CAPACITY_BLOCKED`:\n- `QUEUE_EXIT`:\n- `QUEUE_ABANDONED`:\n- `REDIRECT`:\n- `FORWARDING_UNCONDITIONAL`:\n- `FORWARDING_BUSY`:\n- `FORWARDING_NO_ANSWER`:\n- `FORWARDING_NOT_REACHABLE`:\n- `FORWARDING_EXCEPTION`:\n- `FORWARDING_LUNCH`:\n- `FORWARDING_BUSINESS_TRIP`:\n- `FORWARDING_AWAY`:\n- `FORWARDING_NIGHT_MODE`:\n- `DISA`:\n"},"status_code":{"type":"integer","description":"The status code of CDR.\n"},"destination":{"type":"string","description":"The destination number of CDR.\n"},"outbound_caller_id":{"type":"string","minLength":1,"maxLength":64,"description":"Outbound caller id.\n"},"did_cid":{"type":"string","description":"The DID CID of CDR.\n"},"trunk":{"type":"string","description":"The trunk name of CDR.\n"},"duration":{"type":"integer","format":"int32","description":"The total talk time for a session (in seconds).\n"},"service_number":{"type":"string","description":"The service number of the call.\n"},"user_data":{"type":"string","description":"The additional custom user data of CDR.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Retrieve call log detailed information.

> Retrieve details of call log.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[{"name":"CDR","description":"Manage your call detail records.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/calllogs/{id}":{"get":{"tags":["CDR"],"operationId":"retrieveCallLog","summary":"Retrieve call log detailed information.","description":"Retrieve details of call log.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of CDR.\n"},"description":"The unique ID of the CDR."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of CDR.\n"},"session_id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The session ID of call log.\n"},"caller":{"type":"string","maxLength":256,"description":"The caller number of the call.\n"},"caller_domain":{"type":"string","maxLength":1024,"description":"The caller domain of the call.\n"},"caller_display_name":{"type":"string","maxLength":1024,"description":"The caller display name of the call.\n"},"callee":{"type":"string","maxLength":256,"description":"The callee number of the call.\n"},"callee_domain":{"type":"string","maxLength":1024,"description":"The callee domain of the call.\n"},"callee_display_name":{"type":"string","maxLength":1024,"description":"The callee display name of the call.\n"},"started_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The start time of the call.\n"},"rang_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The ringing time of the call.\n"},"answered_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The answer time of the call.\n"},"ended_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The end time of the call.\n"},"call_id":{"type":"string","description":"The call ID of CDR.\n"},"direction":{"type":"string","enum":["INBOUND_CALL","OUTBOUND_CALL","EXTENSION_CALL","INBOUND_OUTBOUND_CALL"],"description":"The direction of CDR:\n- `INBOUND_CALL`:\n- `OUTBOUND_CALL`:\n- `EXTENSION_CALL`:\n- `INBOUND_OUTBOUND_CALL`:\n"},"end_reason":{"type":"string","enum":["CALLER_DISCONNECTED","CALLEE_DISCONNECTED","BLIND_TRANSFER_COMPLETED","CONSULT_TRANSFER_COMPLETED","REPLACED","REFERRED","REDIRECTED","CANCELLED"],"description":"The ended reason of CDR:  \nCan be either:  \n- `CALLER_DISCONNECTED`:\n- `CALLEE_DISCONNECTED`:\n- `BLIND_TRANSFER_COMPLETED`:\n- `CONSULT_TRANSFER_COMPLETED`:\n- `REPLACED`:\n- `REFERRED`:\n- `REDIRECTED`:\n- `CANCELLED`:\n"},"reroute_reason":{"type":"string","enum":["TRANSFER","OVERFLOW","CAPACITY_BLOCKED","QUEUE_EXIT","QUEUE_ABANDONED","REDIRECT","FORWARDING_UNCONDITIONAL","FORWARDING_BUSY","FORWARDING_NO_ANSWER","FORWARDING_NOT_REACHABLE","FORWARDING_EXCEPTION","FORWARDING_LUNCH","FORWARDING_BUSINESS_TRIP","FORWARDING_AWAY","FORWARDING_NIGHT_MODE","DISA"],"description":"The reroute reason of CDR:  \nCan be either:  \n- `TRANSFER`:\n- `OVERFLOW`:\n- `CAPACITY_BLOCKED`:\n- `QUEUE_EXIT`:\n- `QUEUE_ABANDONED`:\n- `REDIRECT`:\n- `FORWARDING_UNCONDITIONAL`:\n- `FORWARDING_BUSY`:\n- `FORWARDING_NO_ANSWER`:\n- `FORWARDING_NOT_REACHABLE`:\n- `FORWARDING_EXCEPTION`:\n- `FORWARDING_LUNCH`:\n- `FORWARDING_BUSINESS_TRIP`:\n- `FORWARDING_AWAY`:\n- `FORWARDING_NIGHT_MODE`:\n- `DISA`:\n"},"status_code":{"type":"integer","description":"The status code of CDR.\n"},"destination":{"type":"string","description":"The destination number of CDR.\n"},"outbound_caller_id":{"type":"string","minLength":1,"maxLength":64,"description":"Outbound caller id.\n"},"did_cid":{"type":"string","description":"The DID CID of CDR.\n"},"trunk":{"type":"string","description":"The trunk name of CDR.\n"},"duration":{"type":"integer","format":"int32","description":"The total talk time for a session (in seconds).\n"},"cost":{"type":"number","format":"double","description":"The cost for this call.\n"},"billed_account":{"type":"string","description":"The account name for billing.\n"},"service_number":{"type":"string","description":"The service number of the call.\n"},"user_data":{"type":"string","description":"The additional custom user data of CDR.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## GET /call\_reports

> List call reports

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[{"name":"CDR","description":"Manage your call detail records.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_reports":{"get":{"tags":["CDR"],"operationId":"listCallReports","summary":"List call reports","parameters":[{"name":"filter","in":"query","required":false,"schema":{"type":"string"},"description":"Use the `filter` query parameter to retrieve just a subset of a collection.\n"},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Use the `search` query parameter to restrict the results of a request to match a search criterion.\n"},{"name":"orderby","in":"query","required":false,"schema":{"type":"string"},"description":"Use the `orderby` query parameter to specify the sort order of the items returned from server.  \nThe default order is ascending order.\n"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":0,"default":0},"description":"Use the `skip` query parameter to set the number of items to skip at the start of a collection.\n"},{"name":"top","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":100},"description":"Use the `top` query parameter to specify the page size of the result set.\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64","minimum":0,"description":"Total number of resource.\n"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of this call report.\n"},"name":{"type":"string","description":"The name of call report.\n"},"type":{"type":"string","enum":["NORMAL","EXTENSION_GROUP_CALL_COST","QUEUE_PERFORMANCE","QUEUE_DETAILED_STATISTICS","QUEUE_ABANDONED_CALLS","QUEUE_SLA_STATISTICS","QUEUE_BREACHES_SLA_STATISTICS","QUEUE_CALLBACKS","QUEUE_FAILED_CALLBACKS","TEAM_QUEUE_GENERAL_STATISTICS","RING_GROUP_STATISTICS"],"description":"The report types can be either:  \n- `NORMAL`:  \n- `EXTENSION_GROUP_CALL_COST`:  \n- `QUEUE_PERFORMANCE`:  \n- `QUEUE_DETAILED_STATISTICS`:  \n- `QUEUE_ABANDONED_CALLS`:  \n- `QUEUE_SLA_STATISTICS`:  \n- `QUEUE_BREACHES_SLA_STATISTICS`:  \n- `QUEUE_CALLBACKS`:  \n- `QUEUE_FAILED_CALLBACKS`:  \n- `TEAM_QUEUE_GENERAL_STATISTICS`:  \n- `RING_GROUP_STATISTICS`:\n"},"cron_expr":{"type":"string","description":"The crontab expression <https://en.wikipedia.org/wiki/Cron>\n"},"status":{"type":"string","enum":["RUNNING","SCHEDULED","ABORTED"],"description":"The report status can be either:  \n- `RUNNING`:  \n- `SCHEDULED`:\n- `ABORTED`:\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## POST /call\_reports

> Create new call report

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[{"name":"CDR","description":"Manage your call detail records.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_reports":{"post":{"tags":["CDR"],"operationId":"createCallReport","summary":"Create new call report","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of call report.\n"},"type":{"type":"string","enum":["NORMAL","EXTENSION_GROUP_CALL_COST","QUEUE_PERFORMANCE","QUEUE_DETAILED_STATISTICS","QUEUE_ABANDONED_CALLS","QUEUE_SLA_STATISTICS","QUEUE_BREACHES_SLA_STATISTICS","QUEUE_CALLBACKS","QUEUE_FAILED_CALLBACKS","TEAM_QUEUE_GENERAL_STATISTICS","RING_GROUP_STATISTICS"],"description":"The report types can be either:  \n- `NORMAL`:  \n- `EXTENSION_GROUP_CALL_COST`:  \n- `QUEUE_PERFORMANCE`:  \n- `QUEUE_DETAILED_STATISTICS`:  \n- `QUEUE_ABANDONED_CALLS`:  \n- `QUEUE_SLA_STATISTICS`:  \n- `QUEUE_BREACHES_SLA_STATISTICS`:  \n- `QUEUE_CALLBACKS`:  \n- `QUEUE_FAILED_CALLBACKS`:  \n- `TEAM_QUEUE_GENERAL_STATISTICS`:  \n- `RING_GROUP_STATISTICS`:\n"},"email":{"allOf":[{"type":"string","maxLength":128,"description":"The email address.\n"}],"description":"The email address to which the report file will be sent after the report is complete.\n"},"format":{"type":"string","enum":["CSV","HTML"],"description":"The report output files format can be either:  \n- `CSV`:  \n- `HTML`:\n"},"range":{"type":"string","enum":["TODAY","YESTERDAY","LAST_WEEK","LAST_SEVEN_DAYS","LAST_MONTH","LAST_THIRTY_DAYS","CUSTOM"],"description":"The report range can be either:  \n- `TODAY`: the day the report was generated.\n- `YESTERDAY`: yesterday of the day the report was generated.\n- `LAST_WEEK`: the last week of the day the report was generated.\n- `LAST_SEVEN_DAYS`: seven days before the day the report was generated.\n- `LAST_MONTH`: the last month of the day the report was generated.\n- `LAST_THIRTY_DAYS`: thirty days before the day the report was generated.\n- `CUSTOM`: custom date range.\n"},"started_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"Filter data after specified data time.  \nOnly valid when the `range` is specified as `CUSTOM`\n"},"ended_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"Filter data before specified data time.  \nOnly valid when the `range` is specified as `CUSTOM`\n"},"cron_expr":{"type":"string","description":"The crontab expression <https://en.wikipedia.org/wiki/Cron>\n"},"filter":{"oneOf":[{"type":"object","properties":{"from":{"type":"string","enum":["ANY","EXTENSION_OR_EXTENSION_RANGE","NUMBER","NUMBERS_START_WITH","NUMBERS_CONTAIN","INTERNAL_EXTENSIONS","EXTERNAL_NUMBERS"],"description":"Filter calls with caller(s) number.  \nFilter can be either:  \n- `ANY`:  \n- `EXTENSION_OR_EXTENSION_RANGE`:  \n- `NUMBER`:  \n- `NUMBERS_START_WITH`:  \n- `NUMBERS_CONTAIN`:  \n- `INTERNAL_EXTENSIONS`:  \n- `EXTERNAL_NUMBERS`:\n"},"from_value":{"type":"string","description":"This attribute must be specified, \nwhen the `from` is one of `EXTENSION_OR_EXTENSION_RANGE`, `NUMBER`, `NUMBERS_START_WITH`, `NUMBERS_CONTAIN`.\n"},"to":{"type":"string","enum":["ANY","EXTENSION_OR_EXTENSION_RANGE","NUMBER","NUMBERS_START_WITH","NUMBERS_CONTAIN","INTERNAL_EXTENSIONS","EXTERNAL_NUMBERS"],"description":"Filter calls with callee(s) number.  \nFilter can be either:  \n- `ANY`:  \n- `EXTENSION_OR_EXTENSION_RANGE`:  \n- `NUMBER`:  \n- `NUMBERS_START_WITH`:  \n- `NUMBERS_CONTAIN`:  \n- `INTERNAL_EXTENSIONS`:  \n- `EXTERNAL_NUMBERS`:\n"},"to_value":{"type":"string","description":"This attribute must be specified \nwhen the `to` is either `EXTENSION_OR_EXTENSION_RANGE`, `NUMBER`, `NUMBERS_START_WITH`, `NUMBERS_CONTAIN`.\n"},"answer_state":{"type":"string","enum":["ANY","ANSWERED","NOT_ANSWERED"],"description":"Filter calls answered or not.  \nState can be either:  \n- `ANY`:  \n- `ANSWERED`:  \n- `NOT_ANSWERED`:\n"},"duration":{"type":"string","enum":["ANY","RING_DURATION","TALK_DURATION"],"description":"Filter calls duration range.  \nDuration can be either:  \n- `ANY`:  \n- `RING_DURATION`:  \n- `TALK_DURATION`:\n"},"duration_from":{"type":"integer","format":"int32","minimum":0,"description":"Filter calls with duration greater than or equal to specified seconds.\n"},"duration_to":{"type":"integer","format":"int32","minimum":0,"description":"Filter calls with duration less than or equal to specified seconds.\n"}}},{"type":"object","properties":{"extension":{"type":"string","enum":["ANY","EXTENSION_OR_EXTENSION_RANGE"],"description":"Filter calls with extension(s) number.  \nFilter can be either:  \n- `ANY`:  \n- `EXTENSION_OR_EXTENSION_RANGE`:\n"},"extension_value":{"type":"string","description":"This attribute must be specified \nwhen the `extension` is `EXTENSION_OR_EXTENSION_RANGE`.\n"},"type":{"type":"string","enum":["ANY","INTERNAL","EXTERNAL"],"description":"Filter whether the call is an internal or external call.  \nFilter can be either:  \n- `ANY`:  \n- `INTERNAL`:  \n- `EXTERNAL`:\n"}}},{"type":"object","properties":{"type":{"type":"string","enum":["ANY","LOCAL","NATIONAL","INTERNATIONAL","MOBILE"],"description":"Filter calls with type.  \nFilter can be either:  \n- `ANY`:  \n- `LOCAL`:  \n- `NATIONAL`:  \n- `INTERNATIONAL`:  \n- `MOBILE`:\n"},"groups":{"type":"array","items":{"allOf":[{"type":"string","minLength":1,"maxLength":64,"description":"The name of user group.\n"}]},"description":"A collection of extension group names.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"ring_groups":{"type":"array","items":{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}]},"description":"A collection of ring group extension numbers.\n"}}}]}},"required":["name","type","email","format","range","filter"]}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of this call report.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Get call report details

> Get details of call report by it's unique ID.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[{"name":"CDR","description":"Manage your call detail records.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_reports/{id}":{"get":{"tags":["CDR"],"operationId":"getCallReportDetails","summary":"Get call report details","description":"Get details of call report by it's unique ID.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of this call report.\n"},"description":"The unique ID of the call report."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of this call report.\n"},"name":{"type":"string","description":"The name of call report.\n"},"type":{"type":"string","enum":["NORMAL","EXTENSION_GROUP_CALL_COST","QUEUE_PERFORMANCE","QUEUE_DETAILED_STATISTICS","QUEUE_ABANDONED_CALLS","QUEUE_SLA_STATISTICS","QUEUE_BREACHES_SLA_STATISTICS","QUEUE_CALLBACKS","QUEUE_FAILED_CALLBACKS","TEAM_QUEUE_GENERAL_STATISTICS","RING_GROUP_STATISTICS"],"description":"The report types can be either:  \n- `NORMAL`:  \n- `EXTENSION_GROUP_CALL_COST`:  \n- `QUEUE_PERFORMANCE`:  \n- `QUEUE_DETAILED_STATISTICS`:  \n- `QUEUE_ABANDONED_CALLS`:  \n- `QUEUE_SLA_STATISTICS`:  \n- `QUEUE_BREACHES_SLA_STATISTICS`:  \n- `QUEUE_CALLBACKS`:  \n- `QUEUE_FAILED_CALLBACKS`:  \n- `TEAM_QUEUE_GENERAL_STATISTICS`:  \n- `RING_GROUP_STATISTICS`:\n"},"email":{"allOf":[{"type":"string","maxLength":128,"description":"The email address.\n"}],"description":"The email address to which the report file will be sent after the report is complete.\n"},"format":{"type":"string","enum":["CSV","HTML"],"description":"The report output files format can be either:  \n- `CSV`:  \n- `HTML`:\n"},"range":{"type":"string","enum":["TODAY","YESTERDAY","LAST_WEEK","LAST_SEVEN_DAYS","LAST_MONTH","LAST_THIRTY_DAYS","CUSTOM"],"description":"The report range can be either:  \n- `TODAY`: the day the report was generated.\n- `YESTERDAY`: yesterday of the day the report was generated.\n- `LAST_WEEK`: the last week of the day the report was generated.\n- `LAST_SEVEN_DAYS`: seven days before the day the report was generated.\n- `LAST_MONTH`: the last month of the day the report was generated.\n- `LAST_THIRTY_DAYS`: thirty days before the day the report was generated.\n- `CUSTOM`: custom date range.\n"},"started_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"Filter data after specified data time.  \nOnly valid when the `range` is specified as `CUSTOM`\n"},"ended_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"Filter data before specified data time.  \nOnly valid when the `range` is specified as `CUSTOM`\n"},"cron_expr":{"type":"string","description":"The crontab expression <https://en.wikipedia.org/wiki/Cron>\n"},"filter":{"oneOf":[{"type":"object","properties":{"from":{"type":"string","enum":["ANY","EXTENSION_OR_EXTENSION_RANGE","NUMBER","NUMBERS_START_WITH","NUMBERS_CONTAIN","INTERNAL_EXTENSIONS","EXTERNAL_NUMBERS"],"description":"Filter calls with caller(s) number.  \nFilter can be either:  \n- `ANY`:  \n- `EXTENSION_OR_EXTENSION_RANGE`:  \n- `NUMBER`:  \n- `NUMBERS_START_WITH`:  \n- `NUMBERS_CONTAIN`:  \n- `INTERNAL_EXTENSIONS`:  \n- `EXTERNAL_NUMBERS`:\n"},"from_value":{"type":"string","description":"This attribute must be specified, \nwhen the `from` is one of `EXTENSION_OR_EXTENSION_RANGE`, `NUMBER`, `NUMBERS_START_WITH`, `NUMBERS_CONTAIN`.\n"},"to":{"type":"string","enum":["ANY","EXTENSION_OR_EXTENSION_RANGE","NUMBER","NUMBERS_START_WITH","NUMBERS_CONTAIN","INTERNAL_EXTENSIONS","EXTERNAL_NUMBERS"],"description":"Filter calls with callee(s) number.  \nFilter can be either:  \n- `ANY`:  \n- `EXTENSION_OR_EXTENSION_RANGE`:  \n- `NUMBER`:  \n- `NUMBERS_START_WITH`:  \n- `NUMBERS_CONTAIN`:  \n- `INTERNAL_EXTENSIONS`:  \n- `EXTERNAL_NUMBERS`:\n"},"to_value":{"type":"string","description":"This attribute must be specified \nwhen the `to` is either `EXTENSION_OR_EXTENSION_RANGE`, `NUMBER`, `NUMBERS_START_WITH`, `NUMBERS_CONTAIN`.\n"},"answer_state":{"type":"string","enum":["ANY","ANSWERED","NOT_ANSWERED"],"description":"Filter calls answered or not.  \nState can be either:  \n- `ANY`:  \n- `ANSWERED`:  \n- `NOT_ANSWERED`:\n"},"duration":{"type":"string","enum":["ANY","RING_DURATION","TALK_DURATION"],"description":"Filter calls duration range.  \nDuration can be either:  \n- `ANY`:  \n- `RING_DURATION`:  \n- `TALK_DURATION`:\n"},"duration_from":{"type":"integer","format":"int32","minimum":0,"description":"Filter calls with duration greater than or equal to specified seconds.\n"},"duration_to":{"type":"integer","format":"int32","minimum":0,"description":"Filter calls with duration less than or equal to specified seconds.\n"}}},{"type":"object","properties":{"extension":{"type":"string","enum":["ANY","EXTENSION_OR_EXTENSION_RANGE"],"description":"Filter calls with extension(s) number.  \nFilter can be either:  \n- `ANY`:  \n- `EXTENSION_OR_EXTENSION_RANGE`:\n"},"extension_value":{"type":"string","description":"This attribute must be specified \nwhen the `extension` is `EXTENSION_OR_EXTENSION_RANGE`.\n"},"type":{"type":"string","enum":["ANY","INTERNAL","EXTERNAL"],"description":"Filter whether the call is an internal or external call.  \nFilter can be either:  \n- `ANY`:  \n- `INTERNAL`:  \n- `EXTERNAL`:\n"}}},{"type":"object","properties":{"type":{"type":"string","enum":["ANY","LOCAL","NATIONAL","INTERNATIONAL","MOBILE"],"description":"Filter calls with type.  \nFilter can be either:  \n- `ANY`:  \n- `LOCAL`:  \n- `NATIONAL`:  \n- `INTERNATIONAL`:  \n- `MOBILE`:\n"},"groups":{"type":"array","items":{"allOf":[{"type":"string","minLength":1,"maxLength":64,"description":"The name of user group.\n"}]},"description":"A collection of extension group names.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"ring_groups":{"type":"array","items":{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}]},"description":"A collection of ring group extension numbers.\n"}}}]},"status":{"type":"string","enum":["RUNNING","SCHEDULED","ABORTED"],"description":"The report status can be either:  \n- `RUNNING`:  \n- `SCHEDULED`:\n- `ABORTED`:\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update call report

> Update call report properties.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[{"name":"CDR","description":"Manage your call detail records.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_reports/{id}":{"post":{"tags":["CDR"],"operationId":"updateCallReport","summary":"Update call report","description":"Update call report properties.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of this call report.\n"},"description":"The unique ID of the call report."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of call report.\n"},"email":{"allOf":[{"type":"string","maxLength":128,"description":"The email address.\n"}],"description":"The email address to which the report file will be sent after the report is complete.\n"},"format":{"type":"string","enum":["CSV","HTML"],"description":"The report output files format can be either:  \n- `CSV`:  \n- `HTML`:\n"},"range":{"type":"string","enum":["TODAY","YESTERDAY","LAST_WEEK","LAST_SEVEN_DAYS","LAST_MONTH","LAST_THIRTY_DAYS","CUSTOM"],"description":"The report range can be either:  \n- `TODAY`: the day the report was generated.\n- `YESTERDAY`: yesterday of the day the report was generated.\n- `LAST_WEEK`: the last week of the day the report was generated.\n- `LAST_SEVEN_DAYS`: seven days before the day the report was generated.\n- `LAST_MONTH`: the last month of the day the report was generated.\n- `LAST_THIRTY_DAYS`: thirty days before the day the report was generated.\n- `CUSTOM`: custom date range.\n"},"started_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"Filter data after specified data time.  \nOnly valid when the `range` is specified as `CUSTOM`\n"},"ended_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"Filter data before specified data time.  \nOnly valid when the `range` is specified as `CUSTOM`\n"},"cron_expr":{"type":"string","description":"The crontab expression <https://en.wikipedia.org/wiki/Cron>\n"},"filter":{"oneOf":[{"type":"object","properties":{"from":{"type":"string","enum":["ANY","EXTENSION_OR_EXTENSION_RANGE","NUMBER","NUMBERS_START_WITH","NUMBERS_CONTAIN","INTERNAL_EXTENSIONS","EXTERNAL_NUMBERS"],"description":"Filter calls with caller(s) number.  \nFilter can be either:  \n- `ANY`:  \n- `EXTENSION_OR_EXTENSION_RANGE`:  \n- `NUMBER`:  \n- `NUMBERS_START_WITH`:  \n- `NUMBERS_CONTAIN`:  \n- `INTERNAL_EXTENSIONS`:  \n- `EXTERNAL_NUMBERS`:\n"},"from_value":{"type":"string","description":"This attribute must be specified, \nwhen the `from` is one of `EXTENSION_OR_EXTENSION_RANGE`, `NUMBER`, `NUMBERS_START_WITH`, `NUMBERS_CONTAIN`.\n"},"to":{"type":"string","enum":["ANY","EXTENSION_OR_EXTENSION_RANGE","NUMBER","NUMBERS_START_WITH","NUMBERS_CONTAIN","INTERNAL_EXTENSIONS","EXTERNAL_NUMBERS"],"description":"Filter calls with callee(s) number.  \nFilter can be either:  \n- `ANY`:  \n- `EXTENSION_OR_EXTENSION_RANGE`:  \n- `NUMBER`:  \n- `NUMBERS_START_WITH`:  \n- `NUMBERS_CONTAIN`:  \n- `INTERNAL_EXTENSIONS`:  \n- `EXTERNAL_NUMBERS`:\n"},"to_value":{"type":"string","description":"This attribute must be specified \nwhen the `to` is either `EXTENSION_OR_EXTENSION_RANGE`, `NUMBER`, `NUMBERS_START_WITH`, `NUMBERS_CONTAIN`.\n"},"answer_state":{"type":"string","enum":["ANY","ANSWERED","NOT_ANSWERED"],"description":"Filter calls answered or not.  \nState can be either:  \n- `ANY`:  \n- `ANSWERED`:  \n- `NOT_ANSWERED`:\n"},"duration":{"type":"string","enum":["ANY","RING_DURATION","TALK_DURATION"],"description":"Filter calls duration range.  \nDuration can be either:  \n- `ANY`:  \n- `RING_DURATION`:  \n- `TALK_DURATION`:\n"},"duration_from":{"type":"integer","format":"int32","minimum":0,"description":"Filter calls with duration greater than or equal to specified seconds.\n"},"duration_to":{"type":"integer","format":"int32","minimum":0,"description":"Filter calls with duration less than or equal to specified seconds.\n"}}},{"type":"object","properties":{"extension":{"type":"string","enum":["ANY","EXTENSION_OR_EXTENSION_RANGE"],"description":"Filter calls with extension(s) number.  \nFilter can be either:  \n- `ANY`:  \n- `EXTENSION_OR_EXTENSION_RANGE`:\n"},"extension_value":{"type":"string","description":"This attribute must be specified \nwhen the `extension` is `EXTENSION_OR_EXTENSION_RANGE`.\n"},"type":{"type":"string","enum":["ANY","INTERNAL","EXTERNAL"],"description":"Filter whether the call is an internal or external call.  \nFilter can be either:  \n- `ANY`:  \n- `INTERNAL`:  \n- `EXTERNAL`:\n"}}},{"type":"object","properties":{"type":{"type":"string","enum":["ANY","LOCAL","NATIONAL","INTERNATIONAL","MOBILE"],"description":"Filter calls with type.  \nFilter can be either:  \n- `ANY`:  \n- `LOCAL`:  \n- `NATIONAL`:  \n- `INTERNATIONAL`:  \n- `MOBILE`:\n"},"groups":{"type":"array","items":{"allOf":[{"type":"string","minLength":1,"maxLength":64,"description":"The name of user group.\n"}]},"description":"A collection of extension group names.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"enable_exclude_calls_dropped_before_seconds":{"type":"boolean","description":"Exclude calls dropped before specified seconds or not.\n"},"exclude_calls_dropped_before_seconds":{"type":"integer","format":"int32","minimum":0,"description":"Exclude calls dropped before specified seconds.\n"},"call_queues":{"type":"array","items":{"allOf":[{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}],"description":"The extension number of call queue.\n"}]},"description":"A collection of call queue extension numbers.\n"}}},{"type":"object","properties":{"ring_groups":{"type":"array","items":{"allOf":[{"type":"string","minLength":3,"maxLength":64,"pattern":"[0-9]{3,64}","description":"The extension number.\n"}]},"description":"A collection of ring group extension numbers.\n"}}}]}}}}},"required":true},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## Destroy call report

> Destroy call report by it's unique ID.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[{"name":"CDR","description":"Manage your call detail records.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/call_reports/{id}/destroy":{"post":{"tags":["CDR"],"operationId":"deleteCallReport","summary":"Destroy call report","description":"Destroy call report by it's unique ID.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of this call report.\n"},"description":"The unique ID of the call report."}],"responses":{"204":{"description":"No Content"},"400":{"description":"Invalid entry ID supplied"}}}}}}
```

## GET /completed\_call\_reports

> List completed call reports

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[{"name":"CDR","description":"Manage your call detail records.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/completed_call_reports":{"get":{"tags":["CDR"],"operationId":"listCompletedCallReports","summary":"List completed call reports","parameters":[{"name":"filter","in":"query","required":false,"schema":{"type":"string"},"description":"Use the `filter` query parameter to retrieve just a subset of a collection.\n"},{"name":"search","in":"query","required":false,"schema":{"type":"string"},"description":"Use the `search` query parameter to restrict the results of a request to match a search criterion.\n"},{"name":"orderby","in":"query","required":false,"schema":{"type":"string"},"description":"Use the `orderby` query parameter to specify the sort order of the items returned from server.  \nThe default order is ascending order.\n"},{"name":"skip","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":0,"default":0},"description":"Use the `skip` query parameter to set the number of items to skip at the start of a collection.\n"},{"name":"top","in":"query","required":false,"schema":{"type":"integer","format":"int32","minimum":1,"maximum":100,"default":100},"description":"Use the `top` query parameter to specify the page size of the result set.\n"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64","minimum":0,"description":"Total number of resource.\n"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of this call report.\n"},"name":{"type":"string","description":"The name of call report.\n"},"type":{"type":"string","enum":["NORMAL","EXTENSION_GROUP_CALL_COST","QUEUE_PERFORMANCE","QUEUE_DETAILED_STATISTICS","QUEUE_ABANDONED_CALLS","QUEUE_SLA_STATISTICS","QUEUE_BREACHES_SLA_STATISTICS","QUEUE_CALLBACKS","QUEUE_FAILED_CALLBACKS","TEAM_QUEUE_GENERAL_STATISTICS","RING_GROUP_STATISTICS"],"description":"The report types can be either:  \n- `NORMAL`:  \n- `EXTENSION_GROUP_CALL_COST`:  \n- `QUEUE_PERFORMANCE`:  \n- `QUEUE_DETAILED_STATISTICS`:  \n- `QUEUE_ABANDONED_CALLS`:  \n- `QUEUE_SLA_STATISTICS`:  \n- `QUEUE_BREACHES_SLA_STATISTICS`:  \n- `QUEUE_CALLBACKS`:  \n- `QUEUE_FAILED_CALLBACKS`:  \n- `TEAM_QUEUE_GENERAL_STATISTICS`:  \n- `RING_GROUP_STATISTICS`:\n"},"format":{"type":"string","enum":["CSV","HTML"],"description":"The report output files format can be either:  \n- `CSV`:  \n- `HTML`:\n"},"completed_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The completed time of call report.\n"},"file_name":{"type":"string","description":"The name of the file.\n"},"file_size":{"type":"integer","format":"int64","minimum":0,"description":"The file size in bytes.\n"},"file_url":{"type":"string","readOnly":true,"description":"The relative path to file url for file downloading.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Get completed call report details

> Get details of completed call report by it's unique ID.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[{"name":"CDR","description":"Manage your call detail records.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/completed_call_reports/{id}":{"get":{"tags":["CDR"],"operationId":"getCompletedCallReportDetails","summary":"Get completed call report details","description":"Get details of completed call report by it's unique ID.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of this call report.\n"},"description":"The unique ID of the call report."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of this call report.\n"},"name":{"type":"string","description":"The name of call report.\n"},"type":{"type":"string","enum":["NORMAL","EXTENSION_GROUP_CALL_COST","QUEUE_PERFORMANCE","QUEUE_DETAILED_STATISTICS","QUEUE_ABANDONED_CALLS","QUEUE_SLA_STATISTICS","QUEUE_BREACHES_SLA_STATISTICS","QUEUE_CALLBACKS","QUEUE_FAILED_CALLBACKS","TEAM_QUEUE_GENERAL_STATISTICS","RING_GROUP_STATISTICS"],"description":"The report types can be either:  \n- `NORMAL`:  \n- `EXTENSION_GROUP_CALL_COST`:  \n- `QUEUE_PERFORMANCE`:  \n- `QUEUE_DETAILED_STATISTICS`:  \n- `QUEUE_ABANDONED_CALLS`:  \n- `QUEUE_SLA_STATISTICS`:  \n- `QUEUE_BREACHES_SLA_STATISTICS`:  \n- `QUEUE_CALLBACKS`:  \n- `QUEUE_FAILED_CALLBACKS`:  \n- `TEAM_QUEUE_GENERAL_STATISTICS`:  \n- `RING_GROUP_STATISTICS`:\n"},"format":{"type":"string","enum":["CSV","HTML"],"description":"The report output files format can be either:  \n- `CSV`:  \n- `HTML`:\n"},"completed_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The completed time of call report.\n"},"file_name":{"type":"string","description":"The name of the file.\n"},"file_size":{"type":"integer","format":"int64","minimum":0,"description":"The file size in bytes.\n"},"file_url":{"type":"string","readOnly":true,"description":"The relative path to file url for file downloading.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Destroy completed call report

> Destroy completed call report by it's unique ID.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[{"name":"CDR","description":"Manage your call detail records.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/completed_call_reports/{id}/destroy":{"post":{"tags":["CDR"],"operationId":"deleteCompletedCallReport","summary":"Destroy completed call report","description":"Destroy completed call report by it's unique ID.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of this call report.\n"},"description":"The unique ID of the call report."}],"responses":{"204":{"description":"No Content"},"400":{"description":"Invalid entry ID supplied"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.portsip.com/development-portsip/rest-apis/version-22.3/call-detail-records.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
