startCall (Initiating a Call)
Interface Description
This interface is invoked to initiate a VoIP call.
Notes
- An account has been registered.
- Basic call events are configured.
Method Definition
OpenEyeCall.prototype.startCall = function(callee_num, is_video_call, callbacks)
Parameter Description
Parameter |
Type |
Mandatory/Optional |
Description |
---|---|---|---|
callee_num |
String |
Mandatory |
Called number. The value can contain a maximum of 255 characters. |
is_video_call |
Boolean |
Mandatory |
Call type. Set this parameter to false. |
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. |
param |
Call information. |
Parameter |
Type |
Description |
---|---|---|
call_id |
Number |
Call ID. The OpenEye automatically fills the call ID in the parameters of the callback function. |
The following is an example of input parameters of the callback method:
{ "description" : "tsdk_start_call", "param" : { "callId" : 1541472256 }, "result" : 0, "rsp" : 67537 }
Examples
var tupCurrentCallId; function startCall() { global_openEye_SDK.openEyeCall.openEyeCall("70943", false, { response: startCallResponse }); } function startCallResponse(data) { if (data.result == 0) { console.info("StartCall success. "); tupCurrentCallId = data.param.call_id; } else { console.error("StartCall 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