cti
方法总览
| 方法名称 | 行为 | 含义描述 |
|---|---|---|
| OnRemoteEndpointListChanged | 通知 | Endpoint列表变更 |
| OnRemoteEndpointUsedChanged | 通知 | Endpoint使用切换通知;oldEndpoint: 旧Endpoint信息;newEndpoint: 新Endpoint信息 |
| OnAddPairing | 通知 | 添加Endpoint配对中 |
| OnAddAuthorizing | 通知 | 添加Endpoint授权中;endpoint: 添加endpoint信息 |
| OnAddSelectLinekey | 通知 | 添加授权通过,选择部署话机的linekey;nLineKey: 话机端可用的linekey个数 |
| OnAddDeploying | 通知 | 部署话机中 |
| OnAddFinished | 通知 | 添加设备结束;eResult: 添加设备的结果 |
| OnCompatibleConnectAuthorizing | 通知 | 兼容模式连接鉴权中 |
| OnCompatibleConnectAuthored | 通知 | 兼容模式连接鉴权完成;eResult: 鉴权结果 |
| OnCompatibleAuthorizing | 通知 | 兼容模式Endpoint授权中 |
| OnCompatibleFinished | 通知 | 兼容模式添加设备结束;eResult: 添加设备的结果 |
| OnConnectAuthorizing | 通知 | 连接Endpoint授权中 |
| OnConnectAuthored | 通知 | 连接鉴权完成;bSuccess: 是否添加成功 |
| OnConnectFinished | 通知 | 添加Endpoint授权完成;bSuccess: 是否成功 |
| OnSelectRemoteEndpointResult | 通知 | 选择使用设备结果;bSuccess: 是否成功 |
| OnRemoveRemoteEndpointResult | 通知 | 删除绑定设备结果;bSuccess: 是否成功 |
| StartAddRemoteEndpoint | 调用 | 开始添加设备(linux暂不支持);strCode: 配对码 |
| StartAddRemoteEndpointByIp | 调用 | 兼容模式通过ip开始添加设备(linux暂不支持);strIP: 设备ip;nLineKey: 账号编号 |
| GetBindRemoteEndpointInfoList | 调用 | 获取绑定设备信息列表(linux暂不支持) |
| GetOtherRemoteEndpointInfoList | 调用 | 获取其他设备信息列表(linux暂不支持) |
| GetCurrentRemoteEndpointInfo | 调用 | 获取当前正在使用的设备信息(linux暂不支持) |
| IsExistConnectingEndpoint | 调用 | 是否存在正在连接的设备(linux暂不支持) |
| UpdateRemoteEndpoints | 调用 | 从服务端更新设备列表(linux暂不支持) |
| RemoveRemoteEndpoint | 调用 | 删除绑定设备(linux暂不支持);strMAC: MAC地址 |
| ConnectRemoteEndpoint | 调用 | 连接设备(linux暂不支持);strMAC: MAC地址 |
| SelectRemoteEndpoint | 调用 | 选择使用设备(linux暂不支持);strMAC: MAC地址 |
| StopAddRemoteEndpoint | 调用 | 停止添加设备(linux暂不支持) |
| ConfigPhone | 调用 | 配置话机linekey(linux暂不支持);nLineKey: 要部署的linekey |
| SetPhoneAuthInfo | 调用 | 设置话机绑定认证信息(linux暂不支持);strUserName: 用户名;strPassword: 密码 |
OnRemoteEndpointListChanged
通知描述
Endpoint列表变更
通知定义
void OnRemoteEndpointListChanged();
参数描述
无参数。
返回值描述
无返回值。
OnRemoteEndpointUsedChanged
通知描述
Endpoint使用切换通知
通知定义
void OnRemoteEndpointUsedChanged(RemoteEndpointInfo oldEndpoint, RemoteEndpointInfo newEndpoint);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| oldEndpoint | RemoteEndpointInfo | 旧Endpoint信息 |
| newEndpoint | RemoteEndpointInfo | 新Endpoint信息 |
通话设备信息
struct RemoteEndpointInfo {
std::string strName;/** < 名称 */
std::string strMAC;/** < MAC地址 */
std::string strIP;/** < IP */
bool isOnline;/** < 终端上的SIP账号是否注册上 */
bool isBinded;/** < 是否绑定到DM */
bool isUsing;/** < 是否正在使用 */
bool isLocal;/** < 是否PC设备 */
bool isSelected;/** < 是否选择 */
bool isConnected;/** < 是否连接 */
int nRegisterLine;/** < 注册的linekey */
REMOTE_ENDPOINT_STATE remoteEndpointState;/** < 设备状态 */
PHONE_ROM_VERSION phoneRomVersion;/** < Cti版本 */
}
通话设备信息
struct RemoteEndpointInfo {
std::string strName;/** < 名称 */
std::string strMAC;/** < MAC地址 */
std::string strIP;/** < IP */
bool isOnline;/** < 终端上的SIP账号是否注册上 */
bool isBinded;/** < 是否绑定到DM */
bool isUsing;/** < 是否正在使用 */
bool isLocal;/** < 是否PC设备 */
bool isSelected;/** < 是否选择 */
bool isConnected;/** < 是否连接 */
int nRegisterLine;/** < 注册的linekey */
REMOTE_ENDPOINT_STATE remoteEndpointState;/** < 设备状态 */
PHONE_ROM_VERSION phoneRomVersion;/** < Cti版本 */
}
返回值描述
无返回值。
OnAddPairing
通知描述
添加Endpoint配对中
通知定义
void OnAddPairing();
参数描述
无参数。
返回值描述
无返回值。
OnAddAuthorizing
通知描述
添加Endpoint授权中
通知定义
void OnAddAuthorizing(RemoteEndpointInfo endpoint);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| endpoint | RemoteEndpointInfo | 添加endpoint信息 |
通话设备信息
struct RemoteEndpointInfo {
std::string strName;/** < 名称 */
std::string strMAC;/** < MAC地址 */
std::string strIP;/** < IP */
bool isOnline;/** < 终端上的SIP账号是否注册上 */
bool isBinded;/** < 是否绑定到DM */
bool isUsing;/** < 是否正在使用 */
bool isLocal;/** < 是否PC设备 */
bool isSelected;/** < 是否选择 */
bool isConnected;/** < 是否连接 */
int nRegisterLine;/** < 注册的linekey */
REMOTE_ENDPOINT_STATE remoteEndpointState;/** < 设备状态 */
PHONE_ROM_VERSION phoneRomVersion;/** < Cti版本 */
}
返回值描述
无返回值。
OnAddSelectLinekey
通知描述
添加授权通过,选择部署话机的linekey
通知定义
void OnAddSelectLinekey(int nLineKey);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| nLineKey | int | 话机端可用的linekey个数 |
返回值描述
无返回值。
OnAddDeploying
通知描述
部署话机中
通知定义
void OnAddDeploying();
参数描述
无参数。
返回值描述
无返回值。
OnAddFinished
通知描述
添加设备结束
通知定义
void OnAddFinished(ADD_FINISHED_RESULT eResult);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| eResult | ADD_FINISHED_RESULT | 添加设备的结果 |
添加设备的结果
enum ADD_FINISHED_RESULT {
ADD_FINISHED_RESULT_SUCCESS = 0,/** < 添加设备成功 */
ADD_FINISHED_RESULT_CANCEL_ADD_REMOTE_ENDPOINT = 1,/** < 取消添加设备 */
ADD_FINISHED_RESULT_PAIR_FAILED = 2,/** < 找不到对应的话机,请检查配对码是否正确 */
ADD_FINISHED_RESULT_DISCONNECT_TO_PHONE = 3,/** < 话机失去连接,请检查网络后重试 */
ADD_FINISHED_RESULT_PAIRING_CODE_EXPIRED = 4,/** < 配对码已过期,请更新后重试 */
ADD_FINISHED_RESULT_REJECT_BIND = 5,/** < 话机拒接绑定请求,请重试 */
ADD_FINISHED_RESULT_ENDPOINT_HAVE_BINDED = 6,/** < 该话机已存在,如需重新配对请先移除话机 */
ADD_FINISHED_RESULT_MAXIMUM_Of_CONNECTIONS_EXCEED = 7,/** < 无法连接,最多支持5台通话设备 */
ADD_FINISHED_RESULT_CONNECT_FAILED = 8,/** < IP无效或网络未连接 */
ADD_FINISHED_RESULT_IP_INVALID = 9,/** < 无效的IP地址 */
ADD_FINISHED_RESULT_FIRMWARE_VERSION_LOWER = 10,/** < 请将话机版本更新至V80或更高版本 */
ADD_FINISHED_RESULT_PARAMETER_MISSING = 11,/** < 绑定失败,绑定返回的参数缺失 */
ADD_FINISHED_RESULT_REJECT_BIND_BY_IP_BIND = 12,/** < 不支持兼容模式,请使用配对码方式添加设备 */
ADD_FINISHED_RESULT_OTHER = 13,/** < 其他原因 */
}
返回值描述
无返回值。
OnCompatibleConnectAuthorizing
通知描述
兼容模式连接鉴权中
通知定义
void OnCompatibleConnectAuthorizing();
参数描述
无参数。
返回值描述
无返回值。
OnCompatibleConnectAuthored
通知描述
兼容模式连接鉴权完成
通知定义
void OnCompatibleConnectAuthored(AUTHORED_RESULT eResult);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| eResult | AUTHORED_RESULT | 鉴权结果 |
添加设备的结果
enum AUTHORED_RESULT {
AUTHORED_RESULT_SUCCESS = 0,/** < 鉴权成功 */
AUTHORED_RESULT_FAILED = 1,/** < 鉴权失败 */
AUTHORED_RESULT_OTHER = 2,/** < 其他原因 */
}
返回值描述
无返回值。
OnCompatibleAuthorizing
通知描述
兼容模式Endpoint授权中
通知定义
void OnCompatibleAuthorizing();
参数描述
无参数。
返回值描述
无返回值。
OnCompatibleFinished
通知描述
兼容模式添加设备结束
通知定义
void OnCompatibleFinished(ADD_FINISHED_RESULT eResult);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| eResult | ADD_FINISHED_RESULT | 添加设备的结果 |
添加设备的结果
enum ADD_FINISHED_RESULT {
ADD_FINISHED_RESULT_SUCCESS = 0,/** < 添加设备成功 */
ADD_FINISHED_RESULT_CANCEL_ADD_REMOTE_ENDPOINT = 1,/** < 取消添加设备 */
ADD_FINISHED_RESULT_PAIR_FAILED = 2,/** < 找不到对应的话机,请检查配对码是否正确 */
ADD_FINISHED_RESULT_DISCONNECT_TO_PHONE = 3,/** < 话机失去连接,请检查网络后重试 */
ADD_FINISHED_RESULT_PAIRING_CODE_EXPIRED = 4,/** < 配对码已过期,请更新后重试 */
ADD_FINISHED_RESULT_REJECT_BIND = 5,/** < 话机拒接绑定请求,请重试 */
ADD_FINISHED_RESULT_ENDPOINT_HAVE_BINDED = 6,/** < 该话机已存在,如需重新配对请先移除话机 */
ADD_FINISHED_RESULT_MAXIMUM_Of_CONNECTIONS_EXCEED = 7,/** < 无法连接,最多支持5台通话设备 */
ADD_FINISHED_RESULT_CONNECT_FAILED = 8,/** < IP无效或网络未连接 */
ADD_FINISHED_RESULT_IP_INVALID = 9,/** < 无效的IP地址 */
ADD_FINISHED_RESULT_FIRMWARE_VERSION_LOWER = 10,/** < 请将话机版本更新至V80或更高版本 */
ADD_FINISHED_RESULT_PARAMETER_MISSING = 11,/** < 绑定失败,绑定返回的参数缺失 */
ADD_FINISHED_RESULT_REJECT_BIND_BY_IP_BIND = 12,/** < 不支持兼容模式,请使用配对码方式添加设备 */
ADD_FINISHED_RESULT_OTHER = 13,/** < 其他原因 */
}
返回值描述
无返回值。
OnConnectAuthorizing
通知描述
连接Endpoint授权中
通知定义
void OnConnectAuthorizing();
参数描述
无参数。
返回值描述
无返回值。
OnConnectAuthored
通知描述
连接鉴权完成
通知定义
void OnConnectAuthored(bool bSuccess);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| bSuccess | bool | 是否添加成功 |
返回值描述
无返回值。
OnConnectFinished
通知描述
添加Endpoint授权完成
通知定义
void OnConnectFinished(bool bSuccess);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| bSuccess | bool | 是否成功 |
返回值描述
无返回值。
OnSelectRemoteEndpointResult
通知描述
选择使用设备结果
通知定义
void OnSelectRemoteEndpointResult(bool bSuccess);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| bSuccess | bool | 是否成功 |
返回值描述
无返回值。
OnRemoveRemoteEndpointResult
通知描述
删除绑定设备结果
通知定义
void OnRemoveRemoteEndpointResult(bool bSuccess);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| bSuccess | bool | 是否成功 |
返回值描述
无返回值。
StartAddRemoteEndpoint
接口描述
开始添加设备(linux暂不支持)
接口定义
YLSDKERR StartAddRemoteEndpoint(string strCode);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| strCode | string | 配对码 |
返回值描述
| 类型 | 含义 |
|---|---|
| YLSDKERR | 错误码,详情见错误码 YLSDKERR 的定义 |
StartAddRemoteEndpointByIp
接口描述
兼容模式通过ip开始添加设备(linux暂不支持)
接口定义
YLSDKERR StartAddRemoteEndpointByIp(string strIP, int nLineKey);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| strIP | string | 设备ip |
| nLineKey | int | 账号编号 |
返回值描述
| 类型 | 含义 |
|---|---|
| YLSDKERR | 错误码,详情见错误码 YLSDKERR 的定义 |
GetBindRemoteEndpointInfoList
接口描述
获取绑定设备信息列表(linux暂不支持)
接口定义
RemoteEndpointInfoList GetBindRemoteEndpointInfoList();
参数描述
无参数。
返回值描述
| 类型 | 含义 |
|---|---|
| RemoteEndpointInfoList | 通话设备信息列表 |
RemoteEndpointInfoList 通话设备信息列表
struct RemoteEndpointInfoList {
std::vector<RemoteEndpointInfo> vecRemoteEndpointInfo;/** < 通话设备信息列表 */
}
GetOtherRemoteEndpointInfoList
接口描述
获取其他设备信息列表(linux暂不支持)
接口定义
RemoteEndpointInfoList GetOtherRemoteEndpointInfoList();
参数描述
无参数。
返回值描述
| 类型 | 含义 |
|---|---|
| RemoteEndpointInfoList | 通话设备信息列表 |
RemoteEndpointInfoList 通话设备信息列表
struct RemoteEndpointInfoList {
std::vector<RemoteEndpointInfo> vecRemoteEndpointInfo;/** < 通话设备信息列表 */
}
GetCurrentRemoteEndpointInfo
接口描述
获取当前正在使用的设备信息(linux暂不支持)
接口定义
RemoteEndpointInfo GetCurrentRemoteEndpointInfo();
参数描述
无参数。
返回值描述
| 类型 | 含义 |
|---|---|
| RemoteEndpointInfo | 通话设备信息 |
RemoteEndpointInfo 通话设备信息
struct RemoteEndpointInfo {
std::string strName;/** < 名称 */
std::string strMAC;/** < MAC地址 */
std::string strIP;/** < IP */
bool isOnline;/** < 终端上的SIP账号是否注册上 */
bool isBinded;/** < 是否绑定到DM */
bool isUsing;/** < 是否正在使用 */
bool isLocal;/** < 是否PC设备 */
bool isSelected;/** < 是否选择 */
bool isConnected;/** < 是否连接 */
int nRegisterLine;/** < 注册的linekey */
REMOTE_ENDPOINT_STATE remoteEndpointState;/** < 设备状态 */
PHONE_ROM_VERSION phoneRomVersion;/** < Cti版本 */
}
IsExistConnectingEndpoint
接口描述
是否存在正在连接的设备(linux暂不支持)
接口定义
bool IsExistConnectingEndpoint();
参数描述
无参数。
返回值描述
| 类型 | 含义 |
|---|---|
| bool | 无 |
UpdateRemoteEndpoints
接口描述
从服务端更新设备列表(linux暂不支持)
接口定义
YLSDKERR UpdateRemoteEndpoints();
参数描述
无参数。
返回值描述
| 类型 | 含义 |
|---|---|
| YLSDKERR | 错误码,详情见错误码 YLSDKERR 的定义 |
RemoveRemoteEndpoint
接口描述
删除绑定设备(linux暂不支持)
接口定义
YLSDKERR RemoveRemoteEndpoint(string strMAC);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| strMAC | string | MAC地址 |
返回值描述
| 类型 | 含义 |
|---|---|
| YLSDKERR | 错误码,详情见错误码 YLSDKERR 的定义 |
ConnectRemoteEndpoint
接口描述
连接设备(linux暂不支持)
接口定义
YLSDKERR ConnectRemoteEndpoint(string strMAC);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| strMAC | string | MAC地址 |
返回值描述
| 类型 | 含义 |
|---|---|
| YLSDKERR | 错误码,详情见错误码 YLSDKERR 的定义 |
SelectRemoteEndpoint
接口描述
选择使用设备(linux暂不支持)
接口定义
YLSDKERR SelectRemoteEndpoint(string strMAC);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| strMAC | string | MAC地址 |
返回值描述
| 类型 | 含义 |
|---|---|
| YLSDKERR | 错误码,详情见错误码 YLSDKERR 的定义 |
StopAddRemoteEndpoint
接口描述
停止添加设备(linux暂不支持)
接口定义
YLSDKERR StopAddRemoteEndpoint();
参数描述
无参数。
返回值描述
| 类型 | 含义 |
|---|---|
| YLSDKERR | 错误码,详情见错误码 YLSDKERR 的定义 |
ConfigPhone
接口描述
配置话机linekey(linux暂不支持)
接口定义
YLSDKERR ConfigPhone(int nLineKey);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| nLineKey | int | 要部署的linekey |
返回值描述
| 类型 | 含义 |
|---|---|
| YLSDKERR | 错误码,详情见错误码 YLSDKERR 的定义 |
SetPhoneAuthInfo
接口描述
设置话机绑定认证信息(linux暂不支持)
接口定义
YLSDKERR SetPhoneAuthInfo(string strUserName, string strPassword);
参数描述
| 参数 | 类型 | 含义 |
|---|---|---|
| strUserName | string | 用户名 |
| strPassword | string | 密码 |
返回值描述
| 类型 | 含义 |
|---|---|
| YLSDKERR | 错误码,详情见错误码 YLSDKERR 的定义 |