更新時間:2019-11-19
該接口用于用戶發(fā)起音視頻呼叫,應答或拒絕呼叫,主動掛斷呼叫,發(fā)送二次撥號信息,音視頻通話相互轉(zhuǎn)換,接受或拒絕音頻轉(zhuǎn)視頻請求,兩方通話轉(zhuǎn)多方會議。
音視頻呼叫的前提是已登錄。
代碼示例:
function makeCall(){ var isVideoCall = 0; var calleeNum = document.getElementById("callee_num").value; if(document.getElementById("isVideoCall").checked) { isVideoCall = 1; } client.makeCall(calleeNum, isVideoCall,function(data){ if(data.result){ document.getElementById("callState").innerHTML = "call state: make call"; } }); } function answerCall(accept){ var call = client.getCallHandler(); if (call == null) { return; } var isVideo = document.getElementById("isVideoCall").checked; client.answerCall(accept, isVideo); } |
參考文件:\usage\conference_usage.js。
代碼示例:
function hangup(){ var call = client.getCallHandler(); if (call == null) { return; } client.hangup(); } |
參考文件:\usage\conference_usage.js。
代碼示例:
function DTMF(dmtfNo){ var call = client.getCallHandler(); if (call == null) { return; } client.sendDTMF(dmtfNo); } |
參考文件:\usage\conference_usage.js。
代碼示例:
function addVideo(){ var call = client.getCallHandler(); if (call == null) { return; } client.switchAudioCall(false); } function delVideo(){ var call = client.getCallHandler(); if (call == null) { return; } client.switchAudioCall(true); } function replyAddVideo(accept){ var call = client.getCallHandler(); if (call == null) { return; } client.answerSwitch(accept); } |
參考文件:\usage\conference_usage.js。
代碼示例:
function transfer2Conf(){ var call = client.getCallHandler(); if (call == null) { return; } var memberList = document.getElementById("memberList").value; if(memberList!=undefined && memberList!=null && memberList!=""){ var memberListArr = memberList.split(","); var memberListTemp = new Array(); for (var i = 0; i < memberListArr.length; i++) { memberListTemp[i] = { number: memberListArr[i], name: "", smsPhone: "", email: "", autoInvite: 1, role: 0,extensions: "" }; } transfer2ConfParam = { attendees: memberListTemp } }else{ transfer2ConfParam=null; } client.transfer2Conf(transfer2ConfParam); } |
參考文件:\usage\conference_usage.js。