Updated on 2023-10-12 GMT+08:00

endCall (Ending a Call)

Interface Description

This interface is invoked to end a call with or an inbound call from another subscriber.

Notes

There is a call with or an inbound call from another subscriber.

Method Definition

OpenEyeCall.prototype.endCall = function(callid, callbacks)

Parameter Description

Table 1 Parameter description

Parameter

Type

Mandatory/Optional

Description

callid

Number

Mandatory

Call ID.

callbacks

Callback

Mandatory

Callback method.

Table 2 Callback

Parameter

Type

Mandatory/Optional

Description

response

function

Mandatory

For details about the input parameters of the callback method, see Table 3.

Table 3 Input parameters of the callback method

Parameter

Type

Description

description

String

Description of the current request.

result

Number

Query result. The value 0 indicates success and other values indicate failure.

rsp

Number

Internal message ID.

The following is an example of input parameters of the callback method:

{
   "description" : "tsdk_end_call",
   "result" : 0,
   "rsp" : 67539
}

Examples

function endCall() {
   global_openEye_SDK.openEyeCall.endCall(1755709440, { response: onEndCallReponse });
}

function onEndCallReponse(data) {
    if (data.result == 0) {
        console.error("EndCall success. ");
    } else {
        console.error("EndCall failed. The ErrorCode is " + data.result);
        console.info(data);
    }
}