PollUserStatus

更新时间:
复制 MD 格式

Polls the agent status of a specified agent under a specified instance. This operation is typically invoked by the frontend agent Workbench to synchronize agent status.

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

InstanceId

string

Yes

The instance ID.

ccc-test

UserId

string

No

The agent ID.

agent@ccc-test

DeviceId

string

No

The Device ID. This parameter is meaningless and can be filled with any value.

device

Response elements

Element

Type

Description

Example

object

Code

string

The response code.

OK

HttpStatusCode

integer

HTTP status code.

200

Message

string

Response message.

RequestId

string

Request ID.

EEEE671A-3E24-4A04-81E6-6C4F5B39DF75

Params

array

List of response parameters.

string

Response parameter.

Data

object

Data.

ContextId

integer

System auto increment ID. Customers do not need to concern themselves with this.

103655

CallContext

object

Call context environment.

CallType

string

Call type.

Valid values:

  • INBOUND :

    Inbound

  • BARGE :

    Barge

  • CONSULTANT :

    Consultant

  • CONFERENCE :

    Conference

  • MONITOR :

    Listener

  • INTERNAL :

    Internal call

  • OUTBOUND :

    Outbound

  • INTERCEPT :

    Intercept

  • BACK2BACK :

    Back-to-back

  • PREDICTIVE :

    Predictive outbound

  • COACH :

    Coaching

OUTBOUND

InstanceId

string

Instance ID.

ccc-test

JobId

string

Call ID.

job-6538214103685****

ChannelContexts

array<object>

List of call channels.

object

Call channel.

Index

integer

Auto-incremented system ID. Customers do not need to concern themselves with this value.

1

ReleaseInitiator

string

The party that initiated the hang-up of the call channel, indicating who first terminated the call.

1390501****

ChannelState

string

The status of the call channel.

Valid values:

  • CREATED :

    Created

  • ANSWERED :

    Answered

  • RELEASED :

    Released

  • RETIRED :

    Out Of Effect

  • EARLY_MEDIA :

    Early Media

  • NONE :

    Initial status

  • RINGING :

    Ringing

CREATED

Destination

string

Callee of the call channel.

1390501****

UserId

string

The agent ID associated with the voice channel. This field is empty if the channel belongs to a customer.

agent@ccc-test

ChannelFlags

string

Call channel flags.

Valid values:

  • COACHING :

    Coaching

  • MONITORING :

    Monitoring

  • MONITORED :

    Monitored

  • COACHED :

    Coached

  • HOLD :

    Hold

  • MUTED :

    Muted

MONITORING

SkillGroupId

string

The skill group ID associated with the channel. In inbound scenarios, the associated skill group ID is determined by the skill group configured in the IVR transfer-to-agent module. In outbound scenarios, the associated skill group ID is the first skill group the agent signed into.

skillgroup@ccc-test

Timestamp

integer

The UNIX timestamp indicating the most recent status change of the channel, in milliseconds.

1609138903315

ReleaseReason

string

The hang-up reason for the call channel, indicating why the current call channel was disconnected. The value comes from the response codes defined in the SIP protocol. Customers should refer to the SIP protocol to analyze the hang-up reason.

404 - No destination

CallType

string

The call type of the channel.

Valid values:

  • INBOUND :

    Inbound

  • BARGE :

    Barge-in

  • CONSULTANT :

    Consultation

  • CONFERENCE :

    Conference

  • MONITOR :

    Listener

  • INTERNAL :

    Internal call

  • OUTBOUND :

    Outbound

  • INTERCEPT :

    Intercept

  • BACK2BACK :

    Two-party call

  • PREDICTIVE :

    Predictive outbound call

  • COACH :

    Coaching

OUTBOUND

ChannelVariables

string

Channel-associated data.

123

JobId

string

The call ID.

job-6538214103685****

ChannelId

string

The channel ID.

ch:user:1390501****->8032****:1609138902226:job-653821410368****

UserExtension

string

The extension number of the agent associated with the voice channel.

8032****

Originator

string

The calling party of the call channel.

0830019****

CallVariables

string

Ingest endpoint data. Custom data passed through SIP signaling.

a=b;c=d

UserContext

object

Agent context environment.

Extension

string

Agent extension number.

8032****

Heartbeat

integer

The time when the last heartbeat was received from the agent, in Unix timestamp format, in milliseconds.

1609136956378

WorkMode

string

Work mode.

Valid values:

  • ON_SITE :

    On-site mode

  • OFF_SITE :

    Off-site mode

  • OFFICE_PHONE :

    Office phone mode

ON_SITE

DeviceId

string

Device ID, the identity ID of a browser-based Web Real-Time Communication (WebRTC) softphone or a physical phone device. Only one type of device can be registered at a time.

ACC-YUNBS-1.0.10-****

UserId

string

Agent ID.

agent@ccc-test

Reserved

integer

The UNIX timestamp (in milliseconds) indicating when the agent was most recently reserved. Being reserved means an incoming call will soon be assigned to the agent.

1609136956378

BreakCode

string

Break status code, which can be either System-defined or Customer-defined. System-defined break codes include: Warm-up (temporary break state after an agent is published and before becoming idle), RingingTimeout (break caused by agent ringing timeout), and RejectCall (break caused by agent call rejection). There are no restrictions on Customer-defined status codes, and customers can define them according to their business needs.

Valid values:

  • RingingTimeout :

    Break caused by agent ringing timeout

  • RejectCall :

    Break caused by agent call rejection

  • Warm-up :

    Temporary break state after an agent is published and before becoming idle

Warm-up

InstanceId

string

Instance ID.

ccc-test

OutboundScenario

boolean

Indicates whether the agent is in outbound-only mode.

false

Mobile

string

The agent's personal phone number.

1324730****

JobId

string

Call ID.

job-6538214103685****

UserState

string

Agent status.

Valid values:

  • READY :

    Ready

  • WORKING :

    Post-processing

  • DIALING :

    Dialing

  • BREAK :

    Break

  • OFFLINE :

    Offline

  • TALKING :

    Talking

  • RINGING :

    Ringing

BREAK

SignedSkillGroupIdList

array

List of skill group IDs that the agent has signed into.

string

Skill group ID.

skillgroup1@ccc-test

ParallelJobList

array<object>

Chat sessions currently being handled or already handled by the agent

object

JobId

string

Session ID.

job-6538214103685****

Status

string

The agent's status in this session.

Enumeration values:

  • RINGING

  • TALKING

  • RELEASED (End)

  • MISSED (Missed)

RINGING

Timestamp

integer

The time when the status changed.

1609136956378

ChatContexts

array<object>

Session context environment.

array<object>

InstanceId

string

Instance ID.

ccc-test

JobId

string

Call job ID.

chat-65382141036853491

ChatType

string

Session type.

INBOUND

CallVariables

string

Ingest endpoint data.

Members

array<object>

Information about the agents and customers participating in this chat session.

object

Index

integer

System auto increment ID. Customers do not need to concern themselves with this value.

1

UserId

string

Agent ID.

agent@ccc-test

UserType

string

User type.

Enumeration values:

  • CUSTOMER: Customer

  • AGENT: Agent

Manager

Status

string

The status of the agent in this session.

Enumeration values:

  • RINGING

  • TALKING

  • RELEASED (End)

  • MISSED (Missed)

RINGING

SkillGroupId

string

Skill group ID.

a527a80a-75cf-448f-aba0-fca37c61946d

ReleaseInitiator

string

The party that initiated the hang-up.

User

ReleaseReason

string

The hang-up reason for the call channel, indicating why the current call channel was terminated. The value is derived from the response codes defined in the SIP protocol. Customers should refer to the SIP protocol for analysis of the hang-up reason.

Examples

Success response

JSON format

{
  "Code": "OK",
  "HttpStatusCode": 200,
  "Message": "无",
  "RequestId": "EEEE671A-3E24-4A04-81E6-6C4F5B39DF75",
  "Params": [
    "无"
  ],
  "Data": {
    "ContextId": 103655,
    "CallContext": {
      "CallType": "OUTBOUND",
      "InstanceId": "ccc-test",
      "JobId": "job-6538214103685****",
      "ChannelContexts": [
        {
          "Index": 1,
          "ReleaseInitiator": "1390501****",
          "ChannelState": "CREATED",
          "Destination": "1390501****",
          "UserId": "agent@ccc-test",
          "ChannelFlags": "MONITORING",
          "SkillGroupId": "skillgroup@ccc-test",
          "Timestamp": 1609138903315,
          "ReleaseReason": "404 - No destination",
          "CallType": "OUTBOUND",
          "ChannelVariables": "123",
          "JobId": "job-6538214103685****",
          "ChannelId": "ch:user:1390501****->8032****:1609138902226:job-653821410368****",
          "UserExtension": "8032****",
          "Originator": "0830019****"
        }
      ],
      "CallVariables": "a=b;c=d"
    },
    "UserContext": {
      "Extension": "8032****",
      "Heartbeat": 1609136956378,
      "WorkMode": "ON_SITE",
      "DeviceId": "ACC-YUNBS-1.0.10-****",
      "UserId": "agent@ccc-test",
      "Reserved": 1609136956378,
      "BreakCode": "Warm-up",
      "InstanceId": "ccc-test",
      "OutboundScenario": false,
      "Mobile": "1324730****",
      "JobId": "job-6538214103685****",
      "UserState": "BREAK",
      "SignedSkillGroupIdList": [
        "skillgroup1@ccc-test"
      ],
      "ParallelJobList": [
        {
          "JobId": "job-6538214103685****\n",
          "Status": "RINGING",
          "Timestamp": 1609136956378
        }
      ]
    },
    "ChatContexts": [
      {
        "InstanceId": "ccc-test",
        "JobId": "chat-65382141036853491\n",
        "ChatType": "INBOUND",
        "CallVariables": "无",
        "Members": [
          {
            "Index": 1,
            "UserId": "agent@ccc-test\n",
            "UserType": "Manager",
            "Status": "RINGING",
            "SkillGroupId": "a527a80a-75cf-448f-aba0-fca37c61946d",
            "ReleaseInitiator": "User",
            "ReleaseReason": "无"
          }
        ]
      }
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 Parameter.Blank The parameter %s may not be null or blank.
404 NotExists.InstanceId The specified instance %s does not exist.
404 NotExists.UserId The user %s does not exist in instance %s.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.