acceptCall (Answering a Call)
Interface Description
This interface is invoked to answer a call after an inbound call event is received.
Notes
An inbound call event is received. For details, see onCallIncoming (Inbound Call Event).
Method Definition
OpenEyeCall.prototype.acceptCall = function(callid, is_video_call, callbacks)
Parameter Description
Parameter |
Type |
Mandatory/Optional |
Description |
---|---|---|---|
callid |
Number |
Mandatory |
Call ID. The value is reported by the onCallIncoming event. |
is_video_call |
Number |
Mandatory |
Whether a call is a video call. The value is reported by the onCallIncoming event. |
callbacks |
Mandatory |
Callback method. |
Parameter |
Type |
Mandatory/Optional |
Description |
---|---|---|---|
response |
function |
Mandatory |
For details about the input parameters of the callback method, see Table 3. |
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_accept_call", "result" : 0, "rsp" : 67538 }
Examples
function acceptCall() { global_openEye_SDK.openEyeCall.acceptCall(1917517824, 0, { response: onAcceptCallReponse }); } function onAcceptCallReponse(data) { if (data.result == 0) { console.error("AcceptCall success. "); } else { console.error("AcceptCall failed. The ErrorCode is " + data.result); console.info(data); } }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot