更新时间:2024-03-01 GMT+08:00
分享

dtmf(二次拨号)

接口描述

在通话中发送二次拨号信息 。

注意事项

处于通话中才可以发送二次拨号信息。

方法定义

OpenEyeCall.prototype.dtmf = function(callid, keyTone, callbacks)

参数描述

表1 参数说明

参数名

类型

可选/必选

描述

callid

Number

必选

呼叫ID。

keyTone

Number

必选

DTMF键值。取值范围0-16。

callbacks

Callback

可选

回调方法。

表2 Callback

参数名

类型

可选/必选

描述

response

function

必选

回调方法的入参请参考表3

表3 回调方法的入参

参数名

类型

描述

description

String

当前请求描述。

result

Number

查询结果。0表示成功,其他表示失败。

rsp

Number

内部消息编号。

回调方法的入参示例:

{
   "description" : "tsdk_send_dtmf",
   "result" : 0,
   "rsp" : 67540
}

使用示例

function dtmf() {
    global_openEye_SDK.openEyeCall.dtmf(1755709440, 12, {
        response: dtmfResponse
    });
}

function dtmfResponse(data) {
    if (data.result == 0) {
        console.info("Dtmf success. ");
    } else {
        console.error("Dtmf failed. The ErrorCode is " + data.result);
        console.info(data);
    }
}
分享:

    相关文档

    相关产品