You can invoke StartBack2BackCall to initiate a back-to-back call.
Operation description
A back-to-back call differs from a traditional two-party call in that the caller does not directly call the callee. Instead, a Back-to-Back Agent is used. The Back-to-Back Agent first calls the caller, and after the connection is established, it calls the callee and then joins both parties into a single conference. In this mode, because all message streams of each call pass through the Back-to-Back Agent, the service provider (SP) can offer value-added services such as call timing, call recording, and number masking.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
Instance ID. |
ccc-test |
| Caller |
string |
Yes |
Caller number. |
1391814**** |
| Callee |
string |
Yes |
The callee number. |
1372168**** |
| TimeoutSeconds |
integer |
No |
The timeout for the dual-call, in seconds. If the call is not answered within the specified time, it will be automatically disconnected. This parameter is optional and defaults to 30 seconds. |
30 |
| Broker |
string |
Yes |
The intermediate number, which must be an active outbound number under the instance. This number is used to sequentially call the caller and the callee in a double-call scenario. |
0102157**** |
| AdditionalBroker |
string |
No |
Additional intermediate number. If this parameter is provided, the intermediate number specified by the Broker parameter is used to call the caller, and the number specified by this parameter is used to call the callee. This parameter is optional and defaults to empty. |
0102156**** |
| Tags |
string |
No |
Ingest endpoint data. It must not exceed 128 bytes and is primarily used for extension purposes. Ordinary customers do not need to concern themselves with it. |
无 |
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. |
26A34338-5CD9-4C95-A7A6-5BDCE76C6B94 |
| Params |
array |
List of response parameters. |
|
|
string |
Response parameter. |
无 |
|
| Data |
object |
Data. |
|
| CallContext |
object |
The call context environment. |
|
| CallType |
string |
The call type. Valid values:
|
BACK2BACK |
| InstanceId |
string |
The instance ID. |
ccc-test |
| JobId |
string |
Call ID. |
job-1034159089076**** |
| ChannelContexts |
array<object> |
List of call channels. |
|
|
object |
Call channel. |
||
| ReleaseInitiator |
string |
The party that initiated the release of the voice channel, indicating who first disconnected the channel. |
无 |
| ChannelState |
string |
The status of the voice channel. Valid values:
|
NONE |
| Destination |
string |
The called party of the call channel. |
1372168**** |
| UserId |
string |
The agent ID associated with the voice channel. This field is empty if the channel belongs to a Customer. |
无 |
| ChannelFlags |
string |
Flags of the voice channel. Valid values:
|
MONITORING |
| Timestamp |
integer |
The UNIX timestamp indicating the most recent status change of the channel, in milliseconds. |
1618217874062 |
| ReleaseReason |
string |
The reason for releasing the voice channel, indicating why the current voice channel was disconnected. The value is derived from the response codes defined in the SIP protocol. Customers should refer to the SIP protocol to analyze the disconnection reason. |
无 |
| CallType |
string |
The call type of the channel. Valid values:
|
BACK2BACK |
| JobId |
string |
The call ID. |
job-1034159089076**** |
| ChannelId |
string |
The channel ID. |
ch:user:1390501****->8032****:1609138902226:job-653821410368**** |
| Originator |
string |
The originator of the voice channel |
0102157**** |
| UserExtension |
string |
The extension number of the agent associated with the channel. |
8001**** |
| UserContext |
object |
Agent context environment. |
|
| Extension |
string |
Agent extension number. |
8020**** |
| Heartbeat |
integer |
The time when the last heartbeat from the agent was received, in Unix timestamp format, in milliseconds. |
1618217872911 |
| WorkMode |
string |
Work mode. Valid values:
|
ON_SITE |
| DeviceId |
string |
Device ID, which is the identity 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 be assigned to the agent shortly. |
1618217794599 |
| 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 the 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; customers can define them as needed for their business. Valid values:
|
Warm-up |
| InstanceId |
string |
Instance ID. |
ccc-test |
| OutboundScenario |
boolean |
Indicates whether the agent is in outbound-only mode. |
false |
| DeviceState |
string |
Device status. Valid values:
|
无 |
| Mobile |
string |
The agent's personal phone number. |
1324730**** |
| JobId |
string |
Call ID. |
job-1034159089076**** |
| UserState |
string |
Agent status. Valid values:
|
OFFLINE |
| 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": "26A34338-5CD9-4C95-A7A6-5BDCE76C6B94",
"Params": [
"无"
],
"Data": {
"CallContext": {
"CallType": "BACK2BACK",
"InstanceId": "ccc-test",
"JobId": "job-1034159089076****",
"ChannelContexts": [
{
"ReleaseInitiator": "无",
"ChannelState": "NONE",
"Destination": "1372168****",
"UserId": "无",
"ChannelFlags": "MONITORING",
"Timestamp": 1618217874062,
"ReleaseReason": "无",
"CallType": "BACK2BACK",
"JobId": "job-1034159089076****",
"ChannelId": "ch:user:1390501****->8032****:1609138902226:job-653821410368****",
"Originator": "0102157****",
"UserExtension": "8001****"
}
]
},
"UserContext": {
"Extension": "8020****",
"Heartbeat": 1618217872911,
"WorkMode": "ON_SITE",
"DeviceId": "ACC-YUNBS-1.0.10-****",
"UserId": "agent@ccc-test",
"Reserved": 1618217794599,
"BreakCode": "Warm-up",
"InstanceId": "ccc-test",
"OutboundScenario": false,
"DeviceState": "无",
"Mobile": "1324730****",
"JobId": "job-1034159089076****",
"UserState": "OFFLINE",
"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. | |
| 500 | InternalService.CTI | An internal CTI service error occurred. %s | |
| 404 | NotExists.InstanceId | The specified instance %s does not exist. | |
| 404 | NotExists.Number | The specified number %s does not exist in instance %s. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.