logo
In-app Chat
Powered Byspreading
On this page

Callback on call invitation timed out


Description

After the call is successfully created, your serve can receive a timeout callback on call invitation timeout from the ZIM server to determine the users who have timed out in the call under the following circumstances:

  • Within the timeout period configured in the ZIM server, the caller is online, and some of the callees have not responded.
  • Within the timeout period set when creating the call, the caller is online, and some of the callees have not responded.
  • When the call times out, the calling user goes offline and none of the called users respond.
Note

If none of the callees respond within the specified time and the caller is online, a callback on call invitation canceled will be triggered.

Callback description

  • Request method: POST
Note
  • The callback data needs to be decoded by UrlDecode.
  • When using the POST request method to pass parameters:
    • The parameters in the body can be directly passed in the JsonObject format, without the need to serialize them into a string format.
    • In the headers, set "Content-type" to "application/json".
  • Request endpoint: The corresponding callback endpoint in the ZEGOCLOUD Admin Console.

  • Protocol: HTTPS/HTTP (HTTPS is recommended.)

Callback parameters

ParameterTypeDescription
appidStringUnique ID of App.
eventStringCallback event, the return value of this callback is call_timeout.
nonceStringRandom string.
signatureStringThe verification string, see Authenticating server-to-server callbacks for details.
timestampIntThe current server time in Unix timestamp format.
call_idStringCall ID.
user_idsArray of StringList of user IDs not to answer.
Note

We recommend that you convert some parameters to Int for logical processing. The relevant fields include appid and nonce.

Sample code

Untitled
{
    "appid": "1",
    "event": "call_timeout",
    "nonce": "350176",
    "signature": "signature",
    "timestamp": 1499676978,
    "call_id": "3501761173612493269",
    "user_ids": ["abc","def"]
}
1
Copied!

Return codes

If an HTTP status code 2XX (for example, 200) is returned, the callback succeeded. Otherwise, the callback failed.

Callback retry policy

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.

Previous

Call invitation rejected

Next

Message not sent yet