SecretReport
You can subscribe to SecretReport messages to receive call detail reports via batch HTTP push after a call ends. These reports contain call records, such as call start and end times and the caller and callee numbers, to help you manage your platform.
Protocol
Parameter | Description |
Protocol | HTTP + JSON |
Encoding | UTF-8 |
Request
The request body is a JSON array. A single request may contain multiple call records.
Request sample
[{
"phone_no": "171****3225",
"city": "Beijing",
"call_out_time": "2021-08-25 20:11:30",
"ring_time": "2021-08-25 20:11:35",
"record_url": "https://*****.oss-cn-shanghai.aliyuncs.com",
"ring_record_url": "https://****.oss-cn-shanghai.aliyuncs.com",
"free_ring_time": "2021-08-25 20:11:35",
"control_msg": "OK",
"id": 101456851****,
"secret_no": "186****7614",
"call_type": 1,
"control_type": "CONTINUE",
"release_time": "2021-08-25 20:11:41",
"pool_key": "FC10000009708****",
"sub_id": 100004306803****,
"unconnected_cause": 0,
"call_time": "2021-08-25 20:11:29",
"peer_no": "152****1504",
"called_display_no": "158****0000",
"release_dir": 1,
"call_id": "43612633712c****",
"start_time": "2021-08-25 20:11:38",
"partner_key": "FC10000009708****",
"out_id": "7368136812621****",
"release_cause": 31
}]Parameters
Parameter | Type | Required | Example | Description |
phone_no | String | Yes | 171****3225 | Number A. |
city | String | No | Beijing | The home region of the |
call_out_time | String | Yes | 2021-08-25 20:11:30 | The time the call to the |
ring_time | String | Yes | 2021-08-25 20:11:35 | The time the |
record_url | String | No | https://*****.oss-cn-shanghai.aliyuncs.com | The URL to download the call Note The |
ring_record_url | String | No | https://****.oss-cn-shanghai.aliyuncs.com | The URL for the Note The |
free_ring_time | String | Yes | 2021-08-25 20:11:35 | The time the
|
control_msg | String | No | OK | Continuation message. Valid values:
|
id | String | Yes | 101456851**** | The unique ID for the report entry. |
secret_no | String | Yes | 186****7614 | The |
call_type | Integer | Yes | 1 | The type of call. Valid values:
|
control_type | String | No | CONTINUE | The current call handling stage. Valid values:
|
release_time | String | Yes | 2021-08-25 20:11:41 | The time the call was released, which marks the end of the billing duration. For SMS records, this is the message reception time. Note The difference between |
pool_key | String | Yes | FC10000009708**** | The key of the corresponding |
sub_id | Long | Yes | 100004306803**** | The |
unconnected_cause | Integer | No | 0 | The reason the call did not connect. Valid values:
|
call_time | String | Yes | 2021-08-25 20:11:29 | The time the |
peer_no | String | Yes | 152****1504 |
|
called_display_no | String | Yes | 158****0000 | The number displayed to the |
release_dir | Integer | Yes | 1 | The party that terminated the call. Valid values:
|
call_id | String | Yes | 43612633712c**** | The ID of the Note The |
start_time | String | Yes | 2021-08-10 15:46:16 | The time the |
partner_key | String | Yes | FC10000013150**** | The merchant key. |
out_id | String | No | 7368136812621**** | The |
release_cause | Integer | No | 31 | The reason the call was released. For more information, see call record error codes. |
extension | String | No | 8011 | The |
call_status | String | No | BUSY | The Note
|
call_status values
Value | Status | Description |
ANSWERED | Call connected. | The |
BUSY | Callee busy. | This status is returned in the following scenarios: When a
In all of these busy-line scenarios, the final status is |
NO_ANSWER | No answer. | Returned if the |
REJECT | Callee rejected. | Returned if the |
HANGUP | Caller hung up. | Returned if the |
INVALID_NUMBER | Invalid number. | Returned when the |
POWER_OFF | Power-off. | Returned when the |
UNAVAILABLE | Temporarily unavailable. | Returned for ambiguous failures, such as when the line is out of service or temporarily unreachable, or when ASR recognition is inconclusive. |
SUSPEND | Suspended. | Returned when the |
NETWORK_ERROR | Network restriction. | Includes network restrictions such as carrier interception. |
OTHER | Other failure. | - |
TP_TIMEOUT | Call without a subscription. | - |
Response
Response sample
{
"code" : 0,
"msg" : "Received successfully"
}Parameters
Parameter | Type | Required | Example | Description |
code | Number | Yes | 0 | The response code. |
msg | String | No | Received successfully | A descriptive message. |
The
platformexpects your endpoint to return an HTTP 200 status code to confirm it received the message. Theplatformonly checks that thecodein your JSON response is a number; it does not validate the content. If your endpoint returns a non-200 HTTP status code or the request times out, theplatformretriesthe delivery.If your application encounters a system exception or fails to process the message, return an HTTP 5xx status code.
Retry policy
After an initial failed delivery, the platform retries at intervals of 1 minute, 5 minutes, and 10 minutes. If the delivery fails after three retries, the platform makes no further attempts.