When the following situations occur (which can be divided into two types), your server can receive a callback on the call invitation cancellation from the ZIM server, in order to determine the call status:
Cancelled by caller:
Cancelled by timeout:
From the initialization of the call invitation to its timeout, no callee responds to the invitation, and the caller is still online.
From the initialization of the call invitation to its timeout, if no callee responds to the invitation, and the caller is still offline, it will trigger the
If after the call is successfully created and before the call times out, if no call recipient responds and the calling user goes offline, it will trigger the callback on call invitation timed out .
Request method: POST.
The callback data format is JSON, and you need to perform UrlDecode decoding on it.
Parameter | Type | Description |
---|---|---|
appid | String | The unique ID of an app. |
event | String | The callback event. The return value is call_create . |
nonce | String | A random number. |
signature | String | The verification string. For more information, see Authenticating server-to-server callbacks. |
timestamp | Int | The Unix timestamp of the server. |
call_id | String | The ID of the caller. |
user_ids | Array | The list of IDs of users to be called. When a call is cancelled and the called party logs out, the |
reason | String | Reason for cancellation:
|
payload | String | Call to cancel a filled extension field. |
It is recommended that you convert some parameters to Int for logical processing. Related fields include appid
and nonce
.
{
"appid": "1",
"event": "call_cancel",
"nonce": "350176",
"signature": "signature",
"timestamp": 1499676978,
"call_id": "3501761173612493269",
"user_ids": ["abc","def"],
"reason": "caller_cancel",
"payload": "payload",
}
If an HTTP status code 2XX (for example, 200) is returned, the callback succeeded. Otherwise, the callback failed.
If the ZEGOCLOUD server does not receive a response, or the HTTP status code received by the ZEGOCLOUD server is not 2xx (such as 200), it will retry with intervals of 2s, 4s, 8s, 16s, and 32s respectively. If the retry still fails after an interval of 32s, it will no longer retry.