InterceptCall

更新时间:
复制 MD 格式

You can invoke InterceptCall to forcibly disconnect the call associated with a specified call ID under a given instance. The call must be in the listener state, and the forced disconnection must be initiated by the listener. After the forced disconnection succeeds, the agent who was originally talking with the customer will be disconnected, and the agent who initiated the forced disconnection will replace the original agent and continue the conversation with the customer.

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

实例 ID。

ccc-test

UserId

string

No

发起强拆的坐席。

agent@ccc-test

DeviceId

string

No

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

device

JobId

string

Yes

The call ID.

job-6538214103685****

InterceptedUserId

string

Yes

The agent ID that is forcibly disconnected.

agent2@ccc-test

TimeoutSeconds

integer

No

强拆超时时间,经过指定的时间强拆仍未成功,则取消强拆,正常情况下,强拆操作会马上成功,设置超时时间是为了防止异常发生,此字段选填,默认 30,单位秒。

60

Response elements

Element

Type

Description

Example

object

Code

string

响应码。

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.

CallContext

object

Call context environment.

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 :

    Back-to-Back Call

  • PREDICTIVE :

    Predictive Outbound

  • COACH :

    Coaching

INTERCEPT

InstanceId

string

Instance ID.

ccc-test

JobId

string

The call ID.

job-6538214103685****

ChannelContexts

array<object>

The list of channels.

object

The channel.

Index

integer

An auto-incremented ID assigned by the system. Customers do not need to concern themselves with this value.

10

ReleaseInitiator

string

[responses_200_schema_properties_Data_properties_CallContext_properties_ChannelContexts_items_properties_CallType_type]string

1390501****

ChannelState

string

[responses_200_schema_properties_Data_properties_CallContext_properties_ChannelContexts_items_properties_CallType_enumValueTitles_COACH]Coaching

Valid values:

  • CREATED :

    [responses_200_schema_properties_Data_properties_CallContext_properties_ChannelContexts_items_properties_CallType_enumValueTitles_CONFERENCE]Conference

  • ANSWERED :

    [responses_200_schema_properties_Data_properties_CallContext_properties_ChannelContexts_items_properties_CallType_enumValueTitles_MONITOR]Monitor

  • RELEASED :

    [responses_200_schema_properties_Data_properties_CallContext_properties_ChannelContexts_items_properties_CallType_enumValueTitles_INTERNAL]Internal Call

  • RETIRED :

    [responses_200_schema_properties_Data_properties_CallContext_properties_ChannelContexts_items_properties_CallType_enumValueTitles_OUTBOUND]Outbound

  • EARLY_MEDIA :

    [responses_200_schema_properties_Data_properties_CallContext_properties_ChannelContexts_items_properties_CallType_enumValueTitles_INTERCEPT]Intercept

  • NONE :

    [responses_200_schema_properties_Data_properties_CallContext_properties_ChannelContexts_items_properties_CallType_enumValueTitles_BACK2BACK]Back-to-Back Call

  • RINGING :

    [responses_200_schema_properties_Data_properties_CallContext_properties_ChannelContexts_items_properties_CallType_enumValueTitles_PREDICTIVE]Predictive Outbound

ANSWERED

Destination

string

[responses_200_schema_properties_Data_properties_CallContext_properties_ChannelContexts_items_properties_CallType_enumValueTitles_BARGE]Barge-in

1390501****

UserId

string

话务通道关联的坐席 ID,如果是客户的话务通道,该字段为空。

agent@ccc-test

ChannelFlags

string

话务通道标志。

Valid values:

  • COACHING :

    辅导中

  • MONITORING :

    监听中

  • MONITORED :

    被监听

  • COACHED :

    被辅导

  • HOLD :

    保持

  • MUTED :

    静音

SkillGroupId

string

话务通道关联的技能组 ID,呼入场景下,关联的技能组 ID 由 IVR 中转人工模块配置的技能组决定,呼出场景下,关联的技能组 ID 为座席签入的第一个技能组的 ID。

skillgroup@ccc-test

Timestamp

integer

话务通道最近一次状态变化的时间戳,格式是 Unix 时间戳,单位毫秒。

1609138903315

ReleaseReason

string

话务通道的挂断原因,表示当前话务通道为什么会被挂断,取值来自 SIP 协议中定义的响应码,请客户参考 SIP 协议分析挂断原因。

404 - No destination

CallType

string

The call type of the channel.

Valid values:

  • INBOUND :

    [responses_200_schema_properties_Data_properties_CallContext_properties_ChannelContexts_items_properties_Index_type]integer

  • BARGE :

    Barge-in

  • CONSULTANT :

    Consultation

  • CONFERENCE :

    Conference

  • MONITOR :

    Monitor

  • INTERNAL :

    Internal Call

  • OUTBOUND :

    Outbound

  • INTERCEPT :

    Intercept

  • BACK2BACK :

    Back-to-Back Call

  • PREDICTIVE :

    Predictive Outbound

  • COACH :

    Coaching

INTERCEPT

JobId

string

通话 ID。

job-6538214103685****

ChannelId

string

话务通道 ID。

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

UserExtension

string

话务通道关联的坐席的分机号。

8032****

Originator

string

话务通道的主叫方。

0830019****

UserContext

object

Agent context environment.

Extension

string

Agent extension number.

8032****

Heartbeat

integer

The time when the last heartbeat was received from the agent, formatted as a UNIX timestamp 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, which is 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 time when the agent was most recently reserved. Being reserved means an incoming call will be assigned to the agent shortly. The format is a UNIX timestamp in milliseconds.

1609136956378

BreakCode

string

Break status code, which can be either System-defined or Custom-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 Custom-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 :

    Idle

  • WORKING :

    Post-processing

  • DIALING :

    Dialing

  • BREAK :

    Break

  • OFFLINE :

    Offline

  • TALKING :

    Talking

  • RINGING :

    Ringing

TALKING

SignedSkillGroupIdList

array

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

string

Skill group ID.

skillgroup1@ccc-test

Examples

Success response

JSON format

{
  "Code": "OK",
  "HttpStatusCode": 200,
  "Message": "无",
  "RequestId": "EEEE671A-3E24-4A04-81E6-6C4F5B39DF75",
  "Params": [
    "无"
  ],
  "Data": {
    "CallContext": {
      "CallType": "INTERCEPT",
      "InstanceId": "ccc-test",
      "JobId": "job-6538214103685****",
      "ChannelContexts": [
        {
          "Index": 10,
          "ReleaseInitiator": "1390501****",
          "ChannelState": "ANSWERED",
          "Destination": "1390501****",
          "UserId": "agent@ccc-test",
          "ChannelFlags": "无",
          "SkillGroupId": "skillgroup@ccc-test",
          "Timestamp": 1609138903315,
          "ReleaseReason": "404 - No destination",
          "CallType": "INTERCEPT",
          "JobId": "job-6538214103685****",
          "ChannelId": "ch:user:1390501****->8032****:1609138902226:job-653821410368****",
          "UserExtension": "8032****",
          "Originator": "0830019****"
        }
      ]
    },
    "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": "TALKING",
      "SignedSkillGroupIdList": [
        "skillgroup1@ccc-test"
      ]
    }
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidOperation.ChannelState The operation is not allowed. Channel stats (%s) does not meet expectations (%s).
400 InvalidOperation.UserState The operation is not allowed. User state (%s) does not meet expectations (%s).
400 Parameter.Blank The parameter %s may not be null or blank.
500 InternalService.CTI An internal CTI service error occurred. %s
404 NotExists.InstanceId The specified instance %s does not exist.
404 NotExists.JobId The call %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.