Updated on 2023-09-27 GMT+08:00

Creating a Bidirectional Call (V3.0.0) (createCall)

Scenario

This interface is invoked to create a bidirectional call.

The bidirectional call interface supports bidirectional calls of the AICC and ITA. A tenant administrator can sign in to the AICC and choose Configuration Center > Expansion Management > Bidirectional Call to select a bidirectional call type.

Method

POST

URI

https://Domain name/apiaccess/CC-Management/v3/mobileAgent/createCall (For example, the domain name is service.besclouds.com.)

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

X-APP-Key

String

No

App key, which is the user ID.

2

Authorization

String

Yes

Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.)

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

caller

String

No

Calling number, that is, the mobile number or softphone number of the customer manager.

Length limit: string (32)

1.2

softPhone

String

Yes

Softphone number (corresponding to the agent).

Length limit: string (32)

1.3

called

String

Yes

Called number.

Length limit: string (32)

1.4

callData

String

No

Call data.

Length limit: string (1024)

NOTE:

ITA bidirectional calls do not support the callData field.

1.5

callerPresent

String

No

Calling number displayed on the user side. If this parameter is not carried, the access code of the tenant space is used by default. If this parameter is carried, an access code must be transferred. If a non–access code number needs to be transferred, contact O&M personnel to enable the calling number anonymization feature. After this feature is enabled, the number verification rule is as follows: The number must be an access code or a number of 11 to 14 digits.

NOTE:

ITA bidirectional calls do not support the callerPresent field.

Response Description

  • Status code: 200
Table 3 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

retCode

String

No

Return code. The value 0 indicates success, and other values indicates failure.

1: Failed to add the outbound call task. The same outbound call task may exist in the outbound call database.

2: Call data information.

3: The call SN field is not queried.

5: The format of the calling number, called number, or CLIP number is incorrect.

6: The VDN is unavailable.

8: The calling number is not in the softphone number range used by the mobile agent assigned by the tenant.

16: The agent-side number of the trial tenant is not in the trustlist.

21: The number of one-click bidirectional calls of the trial tenant exceeds the upper limit 10 per day.

For details about the return codes for ITA bidirectional calls, see Table 4.

1.2

retMsg

String

No

Failure cause.

1.3

result

Object

No

Result content.

1.3.1

callSerialNo

String

No

Call SN.

Table 4 Return codes for ITA bidirectional calls

retcode

retMsg

Description

90100100

Invalid Input Parameter

The request message is incorrect. For example, a parameter is missing or not supported.

90100200

Auth Failed

The request source or signature does not pass the verification.

90100300

Bad Request

The request is incorrect.

90100400

Not found

The requested resource does not exist.

90100600

Internal Server Error

Internal system error.

90102001

Insufficient Balance

Insufficient balance.

90102002

Request Restriction

Request restriction.

90104001

Insufficient Permission

Insufficient permission.

90104003

Request Forbidden

Request forbidden.

90104004

Service Unavailable

The business function is not supported or implemented.

90104008

Service Process Failure

The business processing times out or fails.

90104029

Too Many Requests

Too many requests.

90106001

Binding relationship already exists

The number binding relationship exists.

90106002

Binding relationship not exists

The number binding relationship does not exist.

90106003

Insufficient Number resources

The number resource pool is insufficient.

90106004

No corresponding number found

No available number is found.

90106005

Inconsistent binding data

The number binding data is inconsistent.

90106006

Other Error

An error occurs due to other number reasons.

90106010

Policy Forbid

Forbidden by policies.

90106011

Caller Forbid

The calling number is restricted.

90106012

Callee forbid

The called number is restricted.

  • Status code: 400

    Incorrect request. Check the request path and parameters.

  • Status code: 401

    Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.

  • Status code: 404

    The requested content is not found. Check the request path.

  • Status code: 500

    Business failure. Check the values of parameters in the request.

Error Codes

None

Example

  • Scenario: example message

    Request header:

    x-app-key:9******************************3
    Authorization:Bearer 9******************************7
    Content-Type:application/json
    Request parameters:
    {
            "caller": 8888888,
    	"softPhone": 66666666 "called": 6666614
    }

    Response parameters:

    {
    	"retMsg": "Called is not configured",
    	"retCode": "5"
    }