InterceptCall
Intercepts a specified call in a specified instance. The call must be in the monitoring state and the interception must be initiated by the monitor. After the interception succeeds, the original agent is disconnected and the agent who initiated the interception takes over the call with the customer.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
ccc-test |
| UserId |
string |
No |
The ID of the agent who initiates the interception. |
agent@ccc-test |
| DeviceId |
string |
No |
The device ID. This parameter is not used and can be set to any value. |
device |
| JobId |
string |
Yes |
The call ID. |
job-6538214103685**** |
| InterceptedUserId |
string |
Yes |
The ID of the agent to be intercepted. |
agent2@ccc-test |
| TimeoutSeconds |
integer |
No |
The timeout period for the interception in seconds. If the interception does not succeed within the specified time, it is canceled. Normally, the interception succeeds immediately. The timeout period is configured to prevent exceptions. This parameter is optional. Default value: 30. |
60 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The response code. |
OK |
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| Message |
string |
The response message. |
None |
| RequestId |
string |
The request ID. |
EEEE671A-3E24-4A04-81E6-6C4F5B39DF75 |
| Params |
array |
The list of response parameters. |
|
|
string |
The response parameter. |
None |
|
| Data |
object |
The data. |
|
| CallContext |
object |
The call context. |
|
| CallType |
string |
The call type of the call channel. Valid values:
|
INTERCEPT |
| InstanceId |
string |
The instance ID. |
ccc-test |
| JobId |
string |
The call ID. |
job-6538214103685**** |
| ChannelContexts |
array<object> |
The list of call channels. |
|
|
object |
The call channel. |
||
| Index |
integer |
The system auto-incremented ID. This field is for internal use only. |
10 |
| ReleaseInitiator |
string |
The party that disconnected the call channel. This indicates who initiated the disconnection first. |
1390501**** |
| ChannelState |
string |
The state of the call channel. Valid values:
|
ANSWERED |
| Destination |
string |
The called party of the call channel. |
1390501**** |
| UserId |
string |
The ID of the agent associated with the call channel. This field is empty if the call channel belongs to a customer. |
agent@ccc-test |
| ChannelFlags |
string |
The flags of the call channel. Valid values:
|
None |
| SkillGroupId |
string |
The ID of the skill group associated with the call channel. In an inbound scenario, the associated skill group ID is determined by the skill group configured in the IVR transfer-to-agent module. In an outbound scenario, the associated skill group ID is the ID of the first skill group that the agent signs in to. |
skillgroup@ccc-test |
| Timestamp |
integer |
The timestamp of the last state change of the call channel. The value is a UNIX timestamp in milliseconds. |
1609138903315 |
| ReleaseReason |
string |
The disconnection reason of the call channel. This indicates why the current call channel was disconnected. The value is a response code defined in the Session Initiation Protocol (SIP). Refer to the SIP protocol to analyze the disconnection reason. |
404 - No destination |
| CallType |
string |
The call type of the call channel. Valid values:
|
INTERCEPT |
| JobId |
string |
The call ID. |
job-6538214103685**** |
| ChannelId |
string |
The ID of the call channel. |
ch:user:1390501****->8032****:1609138902226:job-653821410368**** |
| UserExtension |
string |
The extension number of the agent associated with the call channel. |
8032**** |
| Originator |
string |
The calling party of the call channel. |
0830019**** |
| UserContext |
object |
The agent context. |
|
| Extension |
string |
The extension number of the agent. |
8032**** |
| Heartbeat |
integer |
The time when the last heartbeat was received from the agent. The value is a UNIX timestamp in milliseconds. |
1609136956378 |
| WorkMode |
string |
The work mode. Valid values:
|
ON_SITE |
| DeviceId |
string |
The device ID. This is the identifier of the browser WebRTC softphone or the physical phone device. Only one device can be registered at a time. |
ACC-YUNBS-1.0.10-**** |
| UserId |
string |
The ID of the agent. |
agent@ccc-test |
| Reserved |
integer |
The time when the agent was last reserved. A reserved status means that an incoming call will be assigned to the agent soon. The value is a UNIX timestamp in milliseconds. |
1609136956378 |
| BreakCode |
string |
The break code. Break codes are divided into system-defined and custom codes. System-defined break codes include: Warm-up (the temporary break state after the agent goes online and before becoming idle), RingingTimeout (the break caused by agent ringing timeout), and RejectCall (the break caused by the agent rejecting a call). There are no limits on custom break codes. You can define them based on your business needs. Valid values:
|
Warm-up |
| InstanceId |
string |
The instance ID. |
ccc-test |
| OutboundScenario |
boolean |
Specifies whether the agent is in outbound-only mode. |
false |
| Mobile |
string |
The personal phone number of the agent. |
1324730**** |
| JobId |
string |
The call ID. |
job-6538214103685**** |
| UserState |
string |
The state of the agent. Valid values:
|
TALKING |
| SignedSkillGroupIdList |
array |
The list of skill group IDs that the agent is signed in to. |
|
|
string |
The 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). | Invalid operation. The user status is not as expected. |
| 400 | Parameter.Blank | The parameter %s may not be null or blank. | The parameter cannot be null or a string that contains whitespace characters. |
| 500 | InternalService.CTI | An internal CTI service error occurred. %s | An internal CTI service error occurred. |
| 404 | NotExists.InstanceId | The specified instance %s does not exist. | The specified call center instance does not exist. |
| 404 | NotExists.JobId | The call %s does not exist. | The specified call information does not exist. |
| 404 | NotExists.UserId | The user %s does not exist in instance %s. | The specified user does not exist in the Cloud Contact Center instance. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.