RetrieveCall
Retrieves the call associated with a specified call ID under a specified instance. The call must be on hold to be retrieved.
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 agent ID. |
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**** |
| ChannelId |
string |
Yes |
The ID of the call channel to be retrieved. |
ch:user:1390501****->8032****:1609138902226:job-6538214103685**** |
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. Valid values:
|
OUTBOUND |
| 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. |
||
| ReleaseInitiator |
string |
The party that initiated the disconnection of the call channel. |
1390501**** |
| ChannelState |
string |
The state of the call channel. Valid values:
|
CREATED |
| 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 |
| 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 signed 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, indicating 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:
|
OUTBOUND |
| JobId |
string |
The call ID. |
job-6538214103685**** |
| ChannelId |
string |
The ID of the call channel. |
ch:user:1390501****->8032****:1609138902226:job-653821410368**** |
| Originator |
string |
The calling party of the call channel. |
0830019**** |
| UserExtension |
string |
The extension number of the agent associated with the call channel. |
8032**** |
| UserContext |
object |
The agent context. |
|
| Extension |
string |
The extension number of the agent. |
8032**** |
| Heartbeat |
integer |
The time when the last agent heartbeat was received. 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 agent ID. |
agent@ccc-test |
| Reserved |
integer |
The time when the agent was last reserved. A reserved status indicates 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 |
Indicates 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:
|
BREAK |
| SignedSkillGroupIdList |
array |
The list of skill group IDs that the agent has 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": "OUTBOUND",
"InstanceId": "ccc-test",
"JobId": "job-6538214103685****",
"ChannelContexts": [
{
"ReleaseInitiator": "1390501****",
"ChannelState": "CREATED",
"Destination": "1390501****",
"UserId": "agent@ccc-test",
"SkillGroupId": "skillgroup@ccc-test",
"Timestamp": 1609138903315,
"ReleaseReason": "404 - No destination",
"CallType": "OUTBOUND",
"JobId": "job-6538214103685****",
"ChannelId": "ch:user:1390501****->8032****:1609138902226:job-653821410368****",
"Originator": "0830019****",
"UserExtension": "8032****"
}
]
},
"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"
]
}
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Parameter.Blank | The parameter %s may not be null or blank. | The parameter cannot be null or a string that contains whitespace characters. |
| 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. |
| 500 | InternalService.CTI | An internal CTI service error occurred. %s | An internal CTI service error occurred. |
| 404 | NotExists.ChannelId | The specified channel %s does not exist in call %s. | The specified channel information does not exist in the call. |
| 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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.