ClaimCall

更新时间:
复制 MD 格式

Call the ClaimCall API to assign a call to an agent.

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 ID of the instance.

ccc-test

UserId

string

No

The ID of the agent claiming the call.

invoker@ccc-test

JobId

string

Yes

The ID of the call.

job-6538214103685****

SkillGroupId

string

No

The ID of the skill group that the call is assigned to.

test_sg_****@ccc-test

CandidateUserListJson

string

No

A JSON string that lists the agents and their corresponding skill groups eligible to claim the call.

[ { "f0": "zeren001@report-test-2", "f1": "desktop-voip-box@report-test-2" } ]

Tags

string

No

A unique business identifier for scheduling purposes. Subsequent event notifications include this identifier.

tags

Response elements

Element

Type

Description

Example

object

The response object.

Code

string

The response code.

OK

HttpStatusCode

integer

The HTTP status code.

200

Message

string

The response message.

RequestId

string

The request ID.

93CDC17E-3E8A-48F2-99E5-FA2E238DE8B4

Params

array

The list of error parameters.

string

The error parameter.

Data

object

The data.

CallContext

object

The call context.

JobId

string

The call ID.

job-6538214103685****

InstanceId

string

The instance ID.

ccc-test

ChannelContexts

array<object>

The channel contexts.

object

The channel context.

ReleaseInitiator

string

The party who initiated the channel release.

1390501****

ChannelState

string

The state of the channel.

ANSWERED

Destination

string

The destination of the channel.

1390501****

UserId

string

The agent ID.

invoker@ccc-test

Timestamp

integer

The Unix timestamp that indicates the last time the channel state changed. Unit: milliseconds.

1609225718295

ReleaseReason

string

The reason why the channel was released. This is a SIP response code. For more information, see the SIP protocol specification.

CallType

string

The call type of the channel.

OUTBOUND

JobId

string

The call ID.

job-6573574060089****

ChannelId

string

The channel ID.

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

Originator

string

The originator of the channel.

0830019****

UserExtension

string

The agent extension number.

8059****

ChannelVariables

string

The channel variables.

a=b;c=d;

UserContext

object

The agent context.

Extension

string

The extension number.

0830019****

WorkMode

string

The work mode.

ON_SITE

DeviceId

string

The device ID.

device-xxxx

JobId

string

The call ID.

job-6573574060089****

UserId

string

The agent ID.

user@ccc-test

BreakCode

string

The break code.

Customized

InstanceId

string

The instance ID.

ccc-test

OutboundScenario

boolean

Indicates whether this is an outbound scenario.

false

UserState

string

The agent state.

Dialing

SignedSkillGroupIdList

array

The list of signed-in skill group IDs.

string

The skill group ID.

skill@ccc-test

ContextId

integer

The context ID.

123456

Examples

Success response

JSON format

{
  "Code": "OK",
  "HttpStatusCode": 200,
  "Message": "无",
  "RequestId": "93CDC17E-3E8A-48F2-99E5-FA2E238DE8B4",
  "Params": [
    "无"
  ],
  "Data": {
    "CallContext": {
      "JobId": "job-6538214103685****",
      "InstanceId": "ccc-test",
      "ChannelContexts": [
        {
          "ReleaseInitiator": "1390501****",
          "ChannelState": "ANSWERED",
          "Destination": "1390501****",
          "UserId": "invoker@ccc-test",
          "Timestamp": 1609225718295,
          "ReleaseReason": "无",
          "CallType": "OUTBOUND",
          "JobId": "job-6573574060089****",
          "ChannelId": "ch:user:1390501****->8032****:1609138902226:job-653821410368****",
          "Originator": "0830019****",
          "UserExtension": "8059****",
          "ChannelVariables": "a=b;c=d;"
        }
      ]
    },
    "UserContext": {
      "Extension": "0830019****",
      "WorkMode": "ON_SITE",
      "DeviceId": "device-xxxx",
      "JobId": "job-6573574060089****",
      "UserId": "user@ccc-test",
      "BreakCode": "Customized",
      "InstanceId": "ccc-test",
      "OutboundScenario": false,
      "UserState": "Dialing",
      "SignedSkillGroupIdList": [
        "skill@ccc-test"
      ]
    },
    "ContextId": 123456
  }
}

Error codes

HTTP status code

Error code

Error message

Description

404 NotExists.InstanceId The specified instance %s does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.