更新时间:2023-10-12 GMT+08:00
startCall(发起呼叫)
接口描述
发起一路VOIP呼叫。
注意事项
- 已经完成账号注册。
- 已经设置基础呼叫事件。
方法定义
OpenEyeCall.prototype.startCall = function(callee_num, is_video_call, callbacks)
参数描述
|
参数名 |
类型 |
可选/必选 |
描述 |
|---|---|---|---|
|
callee_num |
String |
必选 |
被叫号码,最大长度255个字符。 |
|
is_video_call |
Boolean |
必选 |
呼叫类型。填写false。 |
|
callbacks |
必选 |
回调方法。 |
|
参数名 |
类型 |
描述 |
|---|---|---|
|
description |
String |
当前请求描述。 |
|
result |
Number |
查询结果。0表示成功,其他表示失败。 |
|
rsp |
Number |
内部消息编号。 |
|
param |
呼叫信息。 |
回调方法的入参示例:
{
"description" : "tsdk_start_call",
"param" : {
"callId" : 1541472256
},
"result" : 0,
"rsp" : 67537
}
使用示例
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);
}
}
父主题: 音视频呼叫