Get call history

This API is used to get call history on tenant.

Note:

  • For APIs used for Shop, the API key is: <api_key>. The base_url information of the Shop.

  • For APIs used for Partner, the API key is: <shop_key>. The base_url information of the Partner.

Request:

curl --location '$BASE_URL.Etelecom/ListCallLogs' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API-KEY' \
--data '{
  "filter": {
    "call_number": "<string>",
    "call_state": "not_answered",
    "date_from": "<dateTime>",
    "date_to": "<dateTime>",
    "department_id": "<int64>",
    "direction": "in",
    "duration": {
      "comparison": "less_than_or_equal_to",
      "value": "<integer>"
    },
    "extension_ids": [
      "<int64>",
      "<int64>"
    ],
    "external_id": "<string>",
    "external_session_id": "<string>",
    "hotline_ids": [
      "<int64>",
      "<int64>"
    ],
    "user_id": "<int64>"
  },
  "paging": {
    "after": "<string>",
    "before": "<string>",
    "limit": "<integer>",
    "sort": "<string>"
  }
}'

Response:

{
  "call_logs": [
    {
      "call_state": "unknown",
      "call_status": "Z",
      "call_targets": [
        {
          "add_time": "2019-08-24T14:15:22Z",
          "answered_time": "2019-08-24T14:15:22Z",
          "end_reason": "string",
          "ended_time": "2019-08-24T14:15:22Z",
          "fail_code": 0,
          "ring_duration": 0,
          "ring_time": "2019-08-24T14:15:22Z",
          "status": "string",
          "target_number": "string",
          "trunk_name": "string"
        }
      ],
      "callee": "string",
      "caller": "string",
      "contact_id": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "direction": "unknown",
      "duration": 0,
      "ended_at": "2019-08-24T14:15:22Z",
      "extension_id": "string",
      "external_id": "string",
      "external_session_id": "string",
      "id": "string",
      "note": "string",
      "recording_urls": [
        "string"
      ],
      "started_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z",
      "user_id": "string"
    }
  ],
  "paging": {
    "after": "string",
    "before": "string",
    "limit": 0,
    "next": "string",
    "prev": "string",
    "sort": "string"
  }
}

Request body structure:

School name
Data type
Describe

extension_ids

string[]

List of extensions

extension_ids

string

Calling number

hotline_ids

string[]

Hotline list

call_state

enum

Call status ( unknown answered not_answered)

date_from

string

Start date (eg: "2021-03-10T17:07:19+07:00")

date_to

string

End date (eg: "2021-03-10T17:07:19+07:00")

external_id

string

Get it when making a call on web/mobile

external_session_id

string

Get it when making a call on web/mobile

Return data attribute structure:

School name
Data type
Describe

extension_id

string

Extension Id

silence

string

Recipient phone number

caller

string

Caller phone number

direction

enum

Call direction ( unknown in out ext ext_in ext_out)

call_targets

array

List of related extensions

recording_urls

array

Recording file

Note :

  • Response is returned in paginated fashion. Typically: 100elements (call logs) / pages sorted by newest, pass limitif changes are desired.

  • The response returned will be accompanied bypaging

  • Passing nextthe query string afterin the above request will get the next page, conversely passing prevthe query string afterin the above request will get the previous page (if any).

Last updated