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

Calling Back Outbound Call Results

Scenario

This interface is invoked to push outbound call results to a specified URL.

Usage Description

  • Prerequisites
    • You have applied for a developer account.
    • An outbound campaign has been created, and outbound call data has been added.
  • Precautions
    • After a request is received, the server needs to return a 200 response. Other responses indicate that the push fails.
    • After a non-200 response is received, the server immediately pushes the result again. If a non-200 response is received again, the push fails.
  • Restrictions
    • Each call data record can be pushed for a maximum of six times.
    • If the push fails, the system pushes the result again 10 minutes later.

Method

This interface supports only the POST method.

URI

When creating an outbound campaign, you can specify the value of callBackUrl.

Request Description

There is no request header.

Table 1 Request body parameters

No.

Parameter

Type

Description

1

callResultList

List

Outbound call result list. The entity object does not exist. The response directly returns List. For details, see Table 2.

Table 2 Parameter description of callDataList

No.

Parameter

Type

Description

1

campaignId

String

ID of an outbound campaign.

2

sessionId

String

ID of a subscriber.

3

called

String

Called number.

4

callTimeStr

String

Call time, in yyyy-mm-dd hh:mm:ss format.

5

callStatus

Integer

Call result. The value 5 indicates that the call fails, and the value 6 indicates that the call is successful.

6

failCode

String

Failure cause code. For details, see Table 4.

7

vdnId

Integer

ID of the VDN to which an outbound number belongs.

8

callId

String

Call record ID, which is used to associate with call data such as CDRs on the CTI platform.

9

customField

String

User-defined field.

10

recordPath

String

Path of call recording files.

NOTE:

The value of this field is returned only when the connection is used (in SaaS networking). In other cases, this field is left empty.

Response Description

Response code: 200
Table 3 Response parameters

No.

Parameter

Type

Mandatory or Not

Description

1

retCode

string

True

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

2

retMsg

string

True

Description of a failure cause.

Triggered Event

None

Error Codes

Table 4 Error codes of outbound call results

Category

Error Code

Description

Successful outbound call

00000

The outbound call is successful.

Call released by a subscriber

00531

The called party hangs up.

00537

The called party is busy.

00538

The outbound number is empty or incorrect.

00548

The mobile phone of the called party is powered off.

00549

The called number is out of service.

00551

The called party hangs up.

00601

The called party hangs up before the call is answered.

00603

The call is released because the called party does not answer the call.

00604

The call is rejected.

00701

An outbound call is transferred to a queue, and the called party hangs up.

Call normally released by the platform

00702

An outbound call is transferred to a queue. The queue times out, and the platform releases the call.

01040

The ringing times out, and the platform releases the call. (The called party does not answer the phone within the preset ringing time.)

01043

Waiting for outbound call results times out on the platform.

01046

The agent fails to be occupied (not involved in IVR outbound call transfer).

01049

The outbound call check times out.

34601

No outbound campaign task is available.

34605

The outbound number is empty.

34606

The call attempt fails. That is, the outbound call interface is not invoked. The common cause is that the number of concurrent outbound calls reaches the maximum allowed.

34608

Outbound call data is written back when no result is obtained after the call times out.

Call released by the platform due to insufficient system resources

00602

System resources are insufficient. Contact the administrator to check resource configurations.

00605

01048

34606

System error

00606

Contact the administrator.

34611

Others

Example

  • The following provides an example of the request body of this interface:
    [
        {
            "campaignId": "3",
            "sessionId": "1202_test013",
            "called": "60584",
            "callTimeStr": "2020-08-30 20:00:00",
            "callStatus": 6,
            "failCode": "0",
            "vdnId": 11,
            "callId": "0023-134864174",
            "recordPath": "Y:/1/11/20200830/3408/0949218.V3"
        }
    ]
  • The following provides an example of the response body of this interface:
    { 
        "retCode": "0",
        "retMsg": "success"
    }