StartBack2BackCall

Updated at:

Initiates a back-to-back call.

Operation description

Unlike a traditional two-party call, a back-to-back call does not connect the caller directly to the callee. Instead, the call is routed through a back-to-back user agent (B2BUA). The B2BUA first calls the caller. After the caller answers, the B2BUA calls the callee and then connects both parties into a single session. Because all signaling messages flow through the B2BUA, service providers can offer value-added services such as call timing, call recording, and caller ID masking.

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

ccc-test

Caller

string

Yes

The caller number.

1391814****

Callee

string

Yes

The called number.

1372168****

TimeoutSeconds

integer

No

The timeout period for the back-to-back call. If the call is not connected within the specified period, the system hangs up the call. This parameter is optional. Default value: 30. Unit: seconds.

30

Broker

string

Yes

The broker number. This number must be an available outbound number under the instance. The system uses this number to call the caller and the callee in sequence during a back-to-back call.

0102157****

AdditionalBroker

string

No

The additional broker number. If this parameter is specified, the system uses the broker number to call the caller and uses this additional broker number to call the callee. This parameter is optional. Default value: empty.

0102156****

Tags

string

No

The attached data. The size cannot exceed 128 bytes. This parameter is used for extended requirements and can be ignored by regular users.

None

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.

26A34338-5CD9-4C95-A7A6-5BDCE76C6B94

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:

  • INBOUND :

    Inbound call.

  • BARGE :

    Barge.

  • CONSULTANT :

    Consult.

  • CONFERENCE :

    Conference.

  • MONITOR :

    Monitor.

  • INTERNAL :

    Internal call.

  • OUTBOUND :

    Outbound call.

  • INTERCEPT :

    Intercept.

  • BACK2BACK :

    Back-to-back call.

  • PREDICTIVE :

    Predictive outbound call.

  • COACH :

    Coach.

BACK2BACK

InstanceId

string

The instance ID.

ccc-test

JobId

string

The call ID.

job-1034159089076****

ChannelContexts

array<object>

The list of call channels.

object

The call channel.

ReleaseInitiator

string

The party that initiated the disconnection of the call channel.

None

ChannelState

string

The state of the call channel.

Valid values:

  • CREATED :

    Created.

  • ANSWERED :

    Answered.

  • RELEASED :

    Released.

  • RETIRED :

    Retired.

  • EARLY_MEDIA :

    Early media.

  • NONE :

    None.

  • RINGING :

    Ringing.

NONE

Destination

string

The called party of the call channel.

1372168****

UserId

string

The ID of the agent associated with the call channel. This field is empty if the call channel belongs to a customer.

None

ChannelFlags

string

The call channel flags.

Valid values:

  • COACHING :

    COACHING

  • MONITORING :

    MONITORING

  • MONITORED :

    MONITORED

  • COACHED :

    COACHED

  • HOLD :

    HOLD

  • MUTED :

    MUTED

MONITORING

Timestamp

integer

The timestamp of the last state change of the call channel. The value is a UNIX timestamp in milliseconds.

1618217874062

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.

None

CallType

string

The call type of the call channel.

Valid values:

  • INBOUND :

    INBOUND

  • BARGE :

    BARGE

  • CONSULTANT :

    CONSULTANT

  • CONFERENCE :

    CONFERENCE

  • MONITOR :

    MONITOR

  • INTERNAL :

    INTERNAL

  • OUTBOUND :

    OUTBOUND

  • INTERCEPT :

    INTERCEPT

  • BACK2BACK :

    BACK2BACK

  • PREDICTIVE :

    PREDICTIVE

  • COACH :

    COACH

BACK2BACK

JobId

string

The call ID.

job-1034159089076****

ChannelId

string

The call channel ID.

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

Originator

string

The calling party of the call channel.

0102157****

UserExtension

string

The extension number of the agent associated with the call channel.

8001****

UserContext

object

The agent context.

Extension

string

The extension number of the agent.

8020****

Heartbeat

integer

The time when the last heartbeat was received from the agent. The value is a UNIX timestamp in milliseconds.

1618217872911

WorkMode

string

The work mode.

Valid values:

  • ON_SITE :

    On-site.

  • OFF_SITE :

    Off-site.

  • OFFICE_PHONE :

    Office phone.

ON_SITE

DeviceId

string

The device ID, which identifies a browser WebRTC softphone or a 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 agent is about to receive an incoming call. The value is a UNIX timestamp in milliseconds.

1618217794599

BreakCode

string

The break code. Break codes are divided into system-defined and custom codes. System-defined break codes include: Warm-up (a temporary break state after the agent goes online and before becoming idle), RingingTimeout (a break caused by agent ringing timeout), and RejectCall (a break caused by the agent rejecting a call). There are no limits on custom break codes. You can define custom break codes based on your business needs.

Valid values:

  • RingingTimeout :

    A break caused by agent ringing timeout.

  • RejectCall :

    A break caused by the agent rejecting a call.

  • Warm-up :

    A temporary break state after the agent goes online and before becoming idle.

Warm-up

InstanceId

string

The instance ID.

ccc-test

OutboundScenario

boolean

Indicates whether the agent is in outbound-only mode.

false

DeviceState

string

The device state.

Valid values:

  • UNREGISTERED :

    Unregistered.

  • ONLINE :

    Online.

  • OFFLINE :

    Offline.

None

Mobile

string

The personal phone number of the agent.

1324730****

JobId

string

The call ID.

job-1034159089076****

UserState

string

The agent state.

Valid values:

  • READY :

    Ready.

  • WORKING :

    After-call work.

  • DIALING :

    Dialing.

  • BREAK :

    Break.

  • OFFLINE :

    Offline.

  • TALKING :

    Talking.

  • RINGING :

    Ringing.

OFFLINE

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": "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. 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.Number The specified number %s does not exist in instance %s. The specified number 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.