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

deRegister (Deactivation)

Interface Description

This interface is invoked to deactivate a SIP account.

Notes

  • The WebSocket connection with the OpenEyeCall is set up.
  • The corresponding subscriber is registered.
  • You are not in a call.

Method Definition

OpenEyeCall.prototype.deRegister = function(sip_num, callbacks)

Parameter Description

Table 1 Parameter description

Parameter

Type

Mandatory/Optional

Description

sip_num

String

Mandatory

Subscriber number. The value can contain a maximum of 255 characters.

Example: 70942@example.com

callbacks

Callback

Mandatory

Callback method.

Table 2 Callback

Parameter

Type

Mandatory/Optional

Description

response

function

Mandatory

Callback method of the registration result. 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_logout",
   "result" : 0,
   "rsp" : 65538
}

Examples

function deRegister() {
    global_openEye_SDK.OpenEyeCall.deRegister("70942@example.com", {
        response: deRegisterResponse
    });
}
function deRegisterResponse(data) {
    if (data.result == 0) {
        console.info("DeRegister Success");
    } else {
        console.error("DeRegister Failed");
    }
}