ListCallDetailRecordsV2

Updated at:

Retrieves a list of call detail records that match the specified filter criteria for a specified instance.

Operation description

ListCallDetailRecordsV2 is used to override the ListCallDetailRecords operation. New fields and query conditions will undergo continuous optimization in ListCallDetailRecordsV2. To ensure query efficiency, the TotalCount field in the response is populated only when you query the first page. For other pages, the value 0 is returned.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

PageNumber

integer

Yes

The page number. Valid values: 1 to 100.

1

PageSize

integer

Yes

The number of entries per page. Valid values: 1 to 100.

100

StartTime

integer

No

The start time of the historical data to retrieve. The default value is 00:00 of the current day. The value is a UNIX timestamp. Unit: milliseconds.

1657853640015

EndTime

integer

No

The end time of the historical data to retrieve. The default value is the current time. The value is a UNIX timestamp. Unit: milliseconds.

1657879880010

SortOrder

string

No

The sort order. Default value: DESC.

Valid values:

ASC: ascending order.

DESC: descending order.

DESC

InstanceId

string

Yes

The instance ID of the call center.

ccc-test

OrderByField

string

No

The field by which to sort the results. This parameter is optional. Default value: startTime (call start time).

Valid values:

startTime: call start time.

startTime

SearchPattern

string

No

The custom query text that follows the Lucene query syntax.

The following table describes the supported query fields and query types:

accessChannelUserId: the visitor ID. Supports exact match and fuzzy match.

accessChannelName: the channel name. Supports exact match and fuzzy match.

text: the session text. Supports fuzzy match.

text:please wait AND accessChannelUserId:af1a0-afaa-5086e2946e0b* AND accessChannelName:dedicated development channel*

MediaType

string

No

The media type.

Valid values:

AUDIO: voice call.

VIDEO: video call.

CHAT: message.

ALL: all types.

AUDIO

ContactIdList

string

No

The list of call IDs.

["job-123456789","job-234567891"]

ContactTypeList

string

No

Filters results by call type.

Valid values:

OUTBOUND: outbound call.

BACK2BACK: back-to-back call.

PRIVACY_DIAL: encrypted call.

INTERNAL: internal call.

PREDICTIVE: predictive outbound call.

INBOUND: inbound call.

CONFERENCE: conference call.

["INBOUND","OUTBOUND"]

ContactDispositionList

string

No

Filters results by hangup cause.

Valid values:

AbandonedInQueue: Abandoned while queuing.

NoAnswer: Customer did not answer.

QueuingTimeout: Queuing timed out.

Voicemail: Transferred to voice mail.

QueuingFailed: Transfer to agent failed.

QueuingOverflow: Queue overflow.

AbandonedInVoiceNavigator: Abandoned during intelligent navigation.

Success: Ended normally.

IVRException: IVR exception.

AbandonedInRing: Abandoned while ringing.

AbandonedInIVR: Abandoned in IVR.

Reject: Customer rejected the call.

ForwardToOutsideNumber: Forwarded to an external number.

["Success","NoAnswer"]

EarlyMediaStateList

string

No

Filters results by the reason for unanswered calls.

Valid values:

NoAnswer: No answer.

OutOfService: Out of service.

NotExist: Number does not exist.

Restricted: Call restricted.

Busy: Line busy.

NotConnected: Cannot be connected.

PowerOff: Phone powered off.

["NotConnected","NoAnswer"]

SatisfactionSurveyChannel

string

No

The satisfaction survey channel.

Valid values:

IVR: voice-based satisfaction survey.

SMS: SMS-based satisfaction survey.

CHAT: message-based satisfaction survey.

IVR

SatisfactionRateList

string

No

Filters results by satisfaction rating. Separate multiple satisfaction ratings with commas (,).

Valid values:

-2: Not sent.

-1: Not rated.

Other positive numbers: custom satisfaction rating values.

["-1","3"] [">2"] ["<3"]

SatisfactionDescriptionList

string

No

Filters results by satisfaction description. The description content is defined by the customer.

["Satisfied","Average"]

SkillGroupIdList

string

No

The list of skill group IDs to which the agent belongs.

[ "skg1@ccc-test", "skg2@ccc-test" ]

AgentId

string

No

The ID of the agent.

agent@ccc-test

FirstAgentId

string

No

The ID of the first agent who participated in the call.

agent@ccc-test

CallingNumber

string

No

The calling number.

191***9993

CalledNumber

string

No

The called number.

191***9993

Number

string

No

The phone number.

191***9993

Broker

string

No

The intermediate number. The number must be an available outbound number under the instance. In a back-to-back call, this number is used to call the caller and the callee sequentially.

021****4972

AccessChannelTypeList

string

No

The list of visitor channel types.

Valid values:

Web: web page.

DingTalkServiceWindow: DingTalk service window.

AliMe: chatbot.

DingTalkRobot: DingTalk chatbot.

["Web","AliMe"]

ReleaseInitiatorList

string

No

The party that hung up.

[\"AGENT\"]

ReleaseReasonList

string

No

The hangup reason.

[\"VisitorInitiatedClosure\",\"AgentInitiatedClosure\"]

AnalyticsReportReady

boolean

No

Indicates whether the AI post-call analytics report is ready.

true

Response elements

Element

Type

Description

Example

object

Code

string

The response code.

OK

Data

object

The data.

List

array<object>

The list of call records.

array<object>

The call record.

AccessChannelId

string

The channel ID.

8f6bcbad-6e2d-4ca3-9b65-91cf0aafdf00

AccessChannelName

string

The channel name. This parameter has a value only when MediaType is CHAT.

TestChannel

AccessChannelType

string

The channel type. This parameter has a value only when MediaType is CHAT.

Web

AccessChannelUserId

string

The visitor ID. This parameter has a value only when MediaType is CHAT.

test-user-id

AccessChannelUserName

string

The visitor name. This parameter has a value only when MediaType is CHAT.

TestVisitor

AdditionalBroker

string

The additional intermediate number, which may be used in dual-call scenarios.

0533128****

AgentIds

string

The list of agent IDs. Multiple values are separated by commas.

agent@ccc-test

AgentNames

string

The list of agent names involved in the call. Multiple agents are separated by commas.

CloudCallCenterTestAgent

AnalyticsReport

object

The post-call analytics report.

Emotion

object

The emotion analysis.

Confidence

integer

The confidence level.

50

Remark

string

The detailed remark of the emotion analysis.

No emotional change from the customer

Success

boolean

Indicates whether the call was successful.

  • true: Successful.

  • false: Failed.

true

TaskId

string

The task ID.

0ff07fe35670423089dbdf12766d962f

Type

string

The emotion type.

Neutral

ProblemSolving

object

The problem resolution status.

Problem

string

The problem description.

Alert issue

Solution

string

The Solutions.

The enrichment service automatically closes the original alert

Solved

boolean

Indicates whether the problem is resolved.

true

Success

boolean

Indicates whether the call was successful.

  • true: Successful.

  • false: Failed.

false

TaskId

string

The task ID.

8bf18b7a10064b29a75946a8d5b8469a

Satisfaction

object

The satisfaction analysis.

Remark

string

The detailed remark of the satisfaction analysis.

The customer expressed satisfaction

SatisfactionDescription

string

The satisfaction description.

Satisfied

Success

boolean

Indicates whether the call was successful.

  • true: Successful.

  • false: Failed.

true

TaskId

string

The task ID.

cb67479ce28243b28ff39948feaa0806

TodoList

object

The to-do list.

Success

boolean

Indicates whether the call was successful.

  • true: Successful.

  • false: Failed.

true

TaskId

string

The task ID.

cb67479ce28243b28ff39948feaa0806

Tasks

array

The to-do items.

string

The description of the to-do item.

Follow-up

AnalyticsReportReady

boolean

Indicates whether the AI post-call analytics report is complete.

true

Broker

string

The intermediate number.

053xxxx3127

CallDuration

string

The call duration. For inbound calls, timing starts when the call enters the IVR. For outbound calls, timing starts when the call is connected. Unit: seconds.

16

CallIds

string

The list of SIP CallIds.

dxxx1sdf,xkkwwwa

CalledNumber

string

The called number.

1332315****

CalleeLocation

string

The location of the callee.

Shandong-Jinan

CallerLocation

string

The location of the caller.

Beijing-Beijing

CallingNumber

string

The calling number.

0533128****

ClientAppName

string

The visitor client application name. This parameter has a value only when MediaType is CHAT.

Unknown

ClientIpAddress

string

The visitor client IP address. This parameter has a value only when MediaType is CHAT.

10.100.2.1

ClientLocation

string

The visitor client location. This parameter has a value only when MediaType is CHAT.

---

ClientUserAgent

string

The visitor client user agent information. This parameter has a value only when MediaType is CHAT.

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36

ContactDisposition

string

The call end reason. For the enumeration list, refer to the ContactDispositionList query parameter.

Success

ContactId

string

The call ID.

job-2255019651513856

ContactType

string

The call type. For the enumeration list, refer to the ContactTypeList query parameter.

OUTBOUND

DialingTime

integer

The dialing duration. Unit: seconds.

0

EarlyMediaState

string

The early media state.

NotConnected

EarlyMediaText

string

The early media text.

Currently on a call

EstablishedTime

integer

The time when the call was established. If the call was not established, this value is empty. The value is a UNIX timestamp. Unit: milliseconds.

1532448000000

FirstResponseTime

integer

The time taken for the agent to first respond to the customer message. This parameter has a value only when MediaType is CHAT.

10

HeldTime

integer

The hold time. Unit: seconds.

12

InstanceId

string

The call center instance ID.

ccc-test

IvrTime

integer

The IVR duration, which is the time from when the call enters the IVR to when it starts entering the manual service queue (or the customer abandons the call). Unit: seconds.

8

MediaType

string

The media type.

Valid values:

  • AUDIO: Voice.

  • CHAT: Message.

  • VIDEO: Video.

CHAT

MessagesSent

integer

The total number of messages. This parameter has a value only when MediaType is CHAT.

10

MessagesSentByAgent

integer

The total number of messages sent by the agent. This parameter has a value only when MediaType is CHAT.

5

MessagesSentByCustomer

integer

The total number of messages sent by the customer. This parameter has a value only when MediaType is CHAT.

5

OffSiteAgentIds

string

The list of off-site agent IDs involved in the call. Multiple agents are separated by commas.

skg-default@ccc-test

OffsiteAgentDestinationNumbers

string

The off-site agent number that is called when the assigned agent is an off-site agent.

80312348

OffsiteAgentOriginatorNumbers

string

The number that initiates the call to the off-site agent when the assigned agent is an off-site agent.

0101257****

OffsiteAgentReleaseReason

string

The hangup reason of the last assigned offsite agent.

IVRException

OutsideNumberDestinationNumber

string

The called number when the call is transferred to an outside line.

134xxxxxx

OutsideNumberReleaseReason

string

The hangup reason when the call is transferred to an outside line.

NoAnswer

QueueTime

integer

The queue duration, which is the time from when the call enters the manual service queue to when the agent starts ringing (or the customer abandons the call, the queue times out, or the queue overflows). Unit: seconds.

0

RecordingDuration

integer

The recording duration. Unit: seconds.

10

RecordingReady

boolean

Indicates whether the recording has been generated. If the call was not established, false is returned.

true

ReleaseInitiator

string

The party that hung up.

Valid values:

  • agent: The agent.

  • customer: The customer.

customer

ReleaseReason

string

The hangup reason of the call channel, indicating why the current call channel was hung up. The value is a response code defined in the SIP protocol. Refer to the SIP protocol to analyze the hangup reason.

486:USER_BUSY

ReleaseTime

integer

The time when the call ended, in Unix timestamp format. Unit: milliseconds.

1532707199000

RingTime

integer

The ringing duration, which is the time from when the agent starts ringing to when the agent answers (or the customer abandons the call). Unit: seconds.

5

SatisfactionDescription

string

The satisfaction description, which corresponds to the configuration of the satisfaction module in the satisfaction IVR and is defined by the customer.

Satisfied

SatisfactionIndex

integer

The satisfaction rating, which is the value of the satisfaction key digit (a single digit).

1

SatisfactionSurveyChannel

string

The satisfaction survey channel.

IVR

SatisfactionSurveyOffered

boolean

Indicates whether a satisfaction survey was sent.

true

SkillGroupIds

string

The skill group IDs of the agents who participated in the call. Multiple skill groups are separated by commas.

skg-default@ccc-test

SkillGroupNames

string

The skill group names of the agents who participated in the call. Multiple skill groups are separated by commas.

TestSkillGroup1,TestSkillGroup2

StartTime

integer

The time when the call started. For inbound calls, this is counted from when the call enters the IVR. For outbound calls, this is counted from when dialing begins. The value is in Unix timestamp format. Unit: milliseconds.

1631440860000

SummaryIndex

object

The summary index.

Keywords

string

The keywords.

CustomerService

TalkTime

integer

The talk time. Unit: seconds.

0

TransferCount

integer

The number of transfers.

1

VoicebotDestinationNumber

string

The outbound called number carried when the call is transferred from an intelligent outbound call.

134xxxxxx

VoicebotOriginatorNumber

string

The outbound caller number carried when the call is transferred from an intelligent outbound call.

021xxxxxxx

WaitTime

integer

The customer wait time, which equals QueueTime + RingTime. If the customer abandons the call during the waiting period, the value is 0. Unit: seconds.

5

PageNumber

integer

The page number.

1

PageSize

integer

The page size.

100

TotalCount

integer

The total number of records.

10

HttpStatusCode

integer

The HTTP status code.

200

Message

string

The response message.

None

RequestId

string

The request ID.

01B12EE4-6AF2-4730-8B78-EC15F4E5C025

Examples

Success response

JSON format

{
  "Code": "OK",
  "Data": {
    "List": [
      {
        "AccessChannelId": "8f6bcbad-6e2d-4ca3-9b65-91cf0aafdf00",
        "AccessChannelName": "测试渠道",
        "AccessChannelType": "Web",
        "AccessChannelUserId": "test-user-id",
        "AccessChannelUserName": "测试访客",
        "AdditionalBroker": "0533128****",
        "AgentIds": "agent@ccc-test",
        "AgentNames": "云呼测试坐席",
        "AnalyticsReport": {
          "Emotion": {
            "Confidence": 50,
            "Remark": "客户没情绪变化",
            "Success": true,
            "TaskId": "0ff07fe35670423089dbdf12766d962f",
            "Type": "中性"
          },
          "ProblemSolving": {
            "Problem": "告警问题",
            "Solution": "富化服务自动关闭原始告警",
            "Solved": true,
            "Success": false,
            "TaskId": "8bf18b7a10064b29a75946a8d5b8469a"
          },
          "Satisfaction": {
            "Remark": "客户表示满意",
            "SatisfactionDescription": "满意",
            "Success": true,
            "TaskId": "cb67479ce28243b28ff39948feaa0806"
          },
          "TodoList": {
            "Success": true,
            "TaskId": "cb67479ce28243b28ff39948feaa0806",
            "Tasks": [
              "回访"
            ]
          }
        },
        "AnalyticsReportReady": true,
        "Broker": "053xxxx3127",
        "CallDuration": "16",
        "CallIds": "dxxx1sdf,xkkwwwa",
        "CalledNumber": "1332315****",
        "CalleeLocation": "山东省-济南",
        "CallerLocation": "北京市-北京",
        "CallingNumber": "0533128****",
        "ClientAppName": "未知",
        "ClientIpAddress": "10.100.2.1",
        "ClientLocation": "---",
        "ClientUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36",
        "ContactDisposition": "Success",
        "ContactId": "job-2255019651513856",
        "ContactType": "OUTBOUND",
        "DialingTime": 0,
        "EarlyMediaState": "NotConnected",
        "EarlyMediaText": "正在通话中",
        "EstablishedTime": 1532448000000,
        "FirstResponseTime": 10,
        "HeldTime": 12,
        "InstanceId": "ccc-test",
        "IvrTime": 8,
        "MediaType": "CHAT",
        "MessagesSent": 10,
        "MessagesSentByAgent": 5,
        "MessagesSentByCustomer": 5,
        "OffSiteAgentIds": "skg-default@ccc-test",
        "OffsiteAgentDestinationNumbers": "80312348",
        "OffsiteAgentOriginatorNumbers": "0101257****",
        "OffsiteAgentReleaseReason": "IVRException",
        "OutsideNumberDestinationNumber": "134xxxxxx",
        "OutsideNumberReleaseReason": "NoAnswer",
        "QueueTime": 0,
        "RecordingDuration": 10,
        "RecordingReady": true,
        "ReleaseInitiator": "customer",
        "ReleaseReason": "486:USER_BUSY",
        "ReleaseTime": 1532707199000,
        "RingTime": 5,
        "SatisfactionDescription": "满意",
        "SatisfactionIndex": 1,
        "SatisfactionSurveyChannel": "IVR",
        "SatisfactionSurveyOffered": true,
        "SkillGroupIds": "skg-default@ccc-test",
        "SkillGroupNames": "测试技能组1,测试技能组2",
        "StartTime": 1631440860000,
        "SummaryIndex": {
          "Keywords": "客服"
        },
        "TalkTime": 0,
        "TransferCount": 1,
        "VoicebotDestinationNumber": "134xxxxxx",
        "VoicebotOriginatorNumber": "021xxxxxxx",
        "WaitTime": 5
      }
    ],
    "PageNumber": 1,
    "PageSize": 100,
    "TotalCount": 10
  },
  "HttpStatusCode": 200,
  "Message": "无",
  "RequestId": "01B12EE4-6AF2-4730-8B78-EC15F4E5C025"
}

Error codes

HTTP status code

Error code

Error message

Description

400 Parameter.Format The format of parameter %s is invalid. %s The format of the parameter is invalid.
500 InternalService.Common An internal service error occurred. %s An internal service error occurred.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.