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

setBasicCallEvent (Setting Basic Call Events)

Interface Description

Callback function for binding call-related events.

Notes

The registration is complete.

Method Definition

OpenEyeCall.prototype.setBasicCallEvent = function(callbacks)

Parameter Description

Table 1 callbacks parameter description

Parameter

Type

Mandatory/Optional

Description

onCallIncoming

function

Optional

For details about the input parameters of the callback method, see onCallIncoming (Inbound Call Event).

onCallOutGoing

function

Optional

For details about the input parameters of the callback method, see onCallOutGoing (Outbound Call Event).

onCallRingBack

function

Optional

For details about the input parameters of the callback method, see onCallRingBack (Ringback Event).

onCallConnected

function

Optional

For details about the input parameters of the callback method, see onCallConnected (Call Connection Event).

onCallEnded

function

Optional

For details about the input parameters of the callback method, see onCallEnded (Call End Event).

onCallEndedFailed

function

Optional

For details about the input parameters of the callback method, see onCallEndedFailed (Call End Failure Event).

onCallRtpCreated

function

Optional

For details about the input parameters of the callback method, see onCallRtpCreated (RTP Channel Establishment Event).

Examples

function setBasicCallEvent(){
    global_openEye_SDK.openEyeCall.setBasicCallEvent({
        onCallIncoming: onCallIncoming,
        onCallOutGoing: onCallOutGoing,
        onCallRingBack: onCallRingBack,
        onCallConnected: onCallConnected,
        onCallEnded: onCallEnded,
        onCallEndedFailed: onCallEndedFailed,
        onCallRtpCreated: onCallRtpCreated
    });
}
function onCallIncoming(data){
    console.info(data);
}
function onCallOutGoing(data){
    console.info(data);
}
function onCallRingBack(data){
    console.info(data);
}
function onCallConnected(data){
    console.info(data);
}
function onCallEnded(data){
    console.info(data);
}
function onCallEndedFailed(data){
    console.info(data);
}
function onCallRtpCreated(data){
    console.info(data);
}