npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

hxccsapi-v2

v2.0.6

Published

HxCDCServer CCS API 2

Downloads

13

Readme

Enums

Enumeration: CstaDeviceConnStates

Table of contents

Enumeration Members

Enumeration Members

Alerting

Alerting

Defined in

hxccsapi-v2.ts:986


Connected

Connected

Defined in

hxccsapi-v2.ts:987


Failed

Failed

Defined in

hxccsapi-v2.ts:990


Hold

Hold

Defined in

hxccsapi-v2.ts:988


Initiated

Initiated

Defined in

hxccsapi-v2.ts:985


Null

Null

Defined in

hxccsapi-v2.ts:984


Queued

Queued

Defined in

hxccsapi-v2.ts:989

Enumeration: CstaDeviceMonStates

CSTA电话终端设备监控状态

Table of contents

Enumeration Members

Enumeration Members

ActiveInCall

ActiveInCall

Defined in

hxccsapi-v2.ts:980


Idle

Idle

Defined in

hxccsapi-v2.ts:979


Offline

Offline

Defined in

hxccsapi-v2.ts:978


Stop

Stop

Defined in

hxccsapi-v2.ts:977

Enumeration: CstaDptDeviceConnStates

Table of contents

Enumeration Members

Enumeration Members

Alert

Alert

Defined in

hxccsapi-v2.ts:1023


Connected

Connected

Defined in

hxccsapi-v2.ts:1024


Down

Down

Defined in

hxccsapi-v2.ts:1020


Idle

Idle

Defined in

hxccsapi-v2.ts:1021


Init

Init

Defined in

hxccsapi-v2.ts:1022

Enumeration: EvtTypeBridge

Table of contents

Enumeration Members

Enumeration Members

CameraUpdate

CameraUpdate

Defined in

hxccsapi-v2.ts:696


DisplayUpdate

DisplayUpdate

Defined in

hxccsapi-v2.ts:697


MicUpdate

MicUpdate

Defined in

hxccsapi-v2.ts:694


PTTTalkUpdate

PTTTalkUpdate

Defined in

hxccsapi-v2.ts:700


PriCameraUpdate

PriCameraUpdate

Defined in

hxccsapi-v2.ts:698


RecorderDone

RecorderDone

Defined in

hxccsapi-v2.ts:693


SpkUpdate

SpkUpdate

Defined in

hxccsapi-v2.ts:695


VideoLayoutUpdate

VideoLayoutUpdate

Defined in

hxccsapi-v2.ts:699

Enumeration: EvtTypeChCall

通道呼叫进程事件

Table of contents

Enumeration Members

Enumeration Members

Alert

Alert

振铃

Defined in

hxccsapi-v2.ts:329


Answered

Answered

应答

Defined in

hxccsapi-v2.ts:331


DTMF

DTMF

双音多频

Defined in

hxccsapi-v2.ts:337


Hangup

Hangup

挂断

Defined in

hxccsapi-v2.ts:333


MediaUpdate

MediaUpdate

媒体更新

Defined in

hxccsapi-v2.ts:335


RecorderDone

RecorderDone

录音完成

Defined in

hxccsapi-v2.ts:341


RecorderStart

RecorderStart

录音开始

Defined in

hxccsapi-v2.ts:339

Enumeration: EvtTypeCstaDevice

Table of contents

Enumeration Members

Enumeration Members

Update

Update

Defined in

hxccsapi-v2.ts:994

Enumeration: EvtTypeCstaDptDevice

Table of contents

Enumeration Members

Enumeration Members

RecorderDone

RecorderDone

Defined in

hxccsapi-v2.ts:1030


RecorderStart

RecorderStart

Defined in

hxccsapi-v2.ts:1029


Update

Update

Defined in

hxccsapi-v2.ts:1028

Enumeration: EvtTypeCstaSwitchMonitor

Table of contents

Enumeration Members

Enumeration Members

Update

Update

Defined in

hxccsapi-v2.ts:1076

Enumeration: EvtTypeMediaPlayer

媒体文件播放

Table of contents

Enumeration Members

Enumeration Members

Opened

Opened

Defined in

hxccsapi-v2.ts:495


Update

Update

Defined in

hxccsapi-v2.ts:496

Enumeration: MediaType

Audio 语音 Video 视频

Table of contents

Enumeration Members

Enumeration Members

Audio

Audio

Defined in

hxccsapi-v2.ts:514


Video

Video

Defined in

hxccsapi-v2.ts:515

hxccsapi-v2

Table of contents

Namespaces

Enumerations

Type Aliases

Functions

Type Aliases

CallState

Ƭ CallState: Object

呼叫状态

field IsCaller 是否主叫

Type declaration

| Name | Type | | :------ | :------ | | ConnState | CstaDeviceConnStates | | IsCaller | boolean | | Peers | { [key: string]: CstaDeviceConnStates; } |

Defined in

hxccsapi-v2.ts:1001


EvtChCall

Ƭ EvtChCall: Object

电话呼叫回调事件

Type declaration

| Name | Type | Description | | :------ | :------ | :------ | | ApiObjID | number | 端口号 | | AudioRx | boolean | 支持语音接收 | | AudioTx | boolean | 支持语音发送 | | Catalog | number | - | | DtmfStr | string | 双音多频串 | | ErrorMsg | string | 错误信息 | | InvokeID | number | - | | MsgType | EvtTypeChCall | - | | VideoRx | boolean | 支持视频接收 | | VideoTx | boolean | 支持视频发送 |

Defined in

hxccsapi-v2.ts:348


EvtCstaDevice

Ƭ EvtCstaDevice: Object

Type declaration

| Name | Type | | :------ | :------ | | ApiObjID | number | | CallID | string | | CallState | CallState | | Catalog | number | | ErrorMsg | string | | InActiveCalls | { [k: string]: CallState; } | | InvokeID | number | | MonState | CstaDeviceMonStates | | MsgType | EvtTypeCstaDevice |

Defined in

hxccsapi-v2.ts:1007


EvtMediaPlayer

Ƭ EvtMediaPlayer: Object

Type declaration

| Name | Type | | :------ | :------ | | ApiObjID | number | | Catalog | number | | Duration | number | | ErrorMsg | string | | InvokeID | number | | MsgType | EvtTypeMediaPlayer | | Offset | number |

Defined in

hxccsapi-v2.ts:499

Functions

Alert

Alert(chID, isAudioTx, isVideoTx, evtHdlr?): Promise<any>

来话通道回铃控制

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | chID | number | 通道号ChannelID | | isAudioTx | boolean | 支持语音发送 | | isVideoTx | boolean | 支持语音接收 | | evtHdlr? | (evt: EvtChCall) => void | 呼叫进程事件回调函数入口,传入EvtChCall事件对象,将替换覆盖原有回调入口(可忽略该参数,保持原有设置) |

Returns

Promise<any>

无,出错抛出异步异常


Answer

Answer(chID, isAudioTx, isAudioRx, isVideoTx, isVideoRx, evtHdlr?): Promise<any>

来话通道接听控制

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | chID | number | 通道号 | | isAudioTx | boolean | 支持语音发送 | | isAudioRx | boolean | 支持语音接收 | | isVideoTx | boolean | 支持视频发送 | | isVideoRx | boolean | 支持视频接收 | | evtHdlr? | (evt: EvtChCall) => void | 呼叫进程事件回调函数入口,传入EvtChCall事件对象,将替换覆盖原有回调入口(可忽略该参数,保持原有设置) |

Returns

Promise<any>

无,出错抛出异步异常


DialDTMF

DialDTMF(chID, dtmfStr): Promise<any>

双音多频(DTMF)拨号

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | chID | number | 通道号 | | dtmfStr | string | 号码串 |

Returns

Promise<any>

无,出错抛出异步异常


Forward

Forward(chID, calleeID): Promise<any>

呼叫盲转,完成后,呼叫进程事件回调函数将向通道发送EvtTypeChCall.Hangup事件

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | chID | number | 被转通道号 | | calleeID | string | 目标电话号码 |

Returns

Promise<any>

无,出错抛出异步异常


Hangup

Hangup(chID): Promise<any>

挂断通道,立即清除呼叫进程事件回调函数入口

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | chID | number | 通道号 |

Returns

Promise<any>

无,出错抛出异步异常


Invite

Invite(callerID, calleeID, callType, isAudioTx, isAudioRx, isVideoTx, isVideoRx, evtHdlr): Promise<number>

发起电话呼叫

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | callerID | string | 主叫号码 | | calleeID | string | 被叫号码 | | callType | number | 保留参数,固定填0 | | isAudioTx | boolean | 支持语音发送 | | isAudioRx | boolean | 支持语音接收 | | isVideoTx | boolean | 支持视频发送 | | isVideoRx | boolean | 支持视频接收 | | evtHdlr | (evt: EvtChCall) => void | 呼叫进程事件回调函数入口,传入EvtChCall事件对象 |

Returns

Promise<number>

异步返回线路通道号ChannelID,出错抛出异步异常


Transfer

Transfer(fromChID, toChID): Promise<any>

呼叫转移,完成后,呼叫进程事件回调函数将向两个通道发送EvtTypeChCall.Hangup事件

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | fromChID | number | 被转通道号 | | toChID | number | 目标通道号 |

Returns

Promise<any>

无,出错抛出异步异常


WaitIncoming

WaitIncoming(hdlr): void

设置全局来话监控入口函数

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | hdlr | null | (chID: number, callerID: string, calleeID: string, callType: number) => void | 入口函数,调用将替换覆盖前次调用结果,填null清除回调入口 |

Returns

void


mediaBridgeCameraAdd

mediaBridgeCameraAdd(bridgeID, fromChID): Promise<any>

会议视频拼接桥添加摄像头

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | fromChID | number | 源视频电话通道 |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgeCameraRmv

mediaBridgeCameraRmv(bridgeID, fromChID): Promise<any>

会议视频拼接桥移除摄像头

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | fromChID | number | 源视频电话通道 |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgeCreate

mediaBridgeCreate(hasAudio, hasVideo, evtHdlr): Promise<number>

创建媒体会议桥

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | hasAudio | boolean | 是否支持语音 | | hasVideo | boolean | 是否支持视频 | | evtHdlr | (evt: EvtBridge) => void | 会议进程中事件回调函数入口,传入事件对象EvtBridge |

Returns

Promise<number>

成功时异步返回会议桥ID,出错时异步抛出异常


mediaBridgeDestroy

mediaBridgeDestroy(bridgeID): Promise<any>

释放销毁媒体会议桥

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgeDisplayAdd

mediaBridgeDisplayAdd(bridgeID, toChID): Promise<any>

会议视频拼接桥添加显示屏

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | toChID | number | 目标视频电话通道 |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgeDisplayRmv

mediaBridgeDisplayRmv(bridgeID, toChID): Promise<any>

会议视频拼接桥移除显示屏

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | toChID | number | 目标视频电话通道 |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgeLayout

mediaBridgeLayout(bridgeID, layoutType): Promise<any>

设置多画面视频会议图像拼接布局模式

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | layoutType | M1 | 布局模式VideoLayoutType |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgeMicAdd

mediaBridgeMicAdd(bridgeID, fromChID): Promise<any>

会议音频混音桥添加麦克

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | fromChID | number | 源电话通道 |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgeMicRmv

mediaBridgeMicRmv(bridgeID, fromChID): Promise<any>

会议音频混音桥移除麦克

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | fromChID | number | 源电话通道 |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgeOSD

mediaBridgeOSD(bridgeID, text, hasClock): Promise<any>

设置多画面视频会议拼接图像水印字符

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | text | string | 水印字符串 | | hasClock | boolean | 是否显示实时时钟 |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgePTTMemberAdd

mediaBridgePTTMemberAdd(bridgeID, chID, priority): Promise<any>

会议音频混音桥添加PTT(Push To Talk)半双工语音通道

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | chID | number | 电话通道号 | | priority | number | 枪话优先级 |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgePTTMemberRmv

mediaBridgePTTMemberRmv(bridgeID, chID): Promise<any>

会议音频混音桥移除PTT(Push To Talk)半双工语音通道

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | chID | number | 电话通道号 |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgePlayerAdd

mediaBridgePlayerAdd(bridgeID, playerID): Promise<any>

会议音频混音桥添加媒体播放通道

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | playerID | number | 语音播放器ID |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgePlayerRmv

mediaBridgePlayerRmv(bridgeID, playerID): Promise<any>

会议音频混音桥移除媒体播放通道

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | playerID | number | 语音播放器ID |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgePrimaryCamera

mediaBridgePrimaryCamera(bridgeID, fromChID): Promise<any>

设置视频会议主摄像头

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | fromChID | number | 源视频电话通道号 |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgeRecorderStart

mediaBridgeRecorderStart(bridgeID, filePath, mediaType, maxSize?): Promise<any>

启动会议媒体录制

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | filePath | String | 录制文件路径 | | mediaType | MediaType | 媒体类型(MediaType) | | maxSize? | number | 文件存储尺寸上限(字节数),可忽略不限制 |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgeRecorderStop

mediaBridgeRecorderStop(bridgeID): Promise<any>

停止会议媒体录制

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgeSpeakerAdd

mediaBridgeSpeakerAdd(bridgeID, toChID): Promise<any>

会议音频混音桥加入扬声器

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | toChID | number | 目标电话通道 |

Returns

Promise<any>

无,出错时异步抛出异常


mediaBridgeSpeakerRmv

mediaBridgeSpeakerRmv(bridgeID, toChID): Promise<any>

会议音频混音桥移除扬声器

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | bridgeID | number | 会议桥ID | | toChID | number | 目标电话通道 |

Returns

Promise<any>

无,出错时异步抛出异常


mediaConnect

mediaConnect(fromChID, toChID, mediaType): Promise<any>

呼叫媒体接续

Parameters

| Name | Type | | :------ | :------ | | fromChID | number | | toChID | number | | mediaType | MediaType |

Returns

Promise<any>


mediaDisconnect

mediaDisconnect(toChID, mediaType): Promise<any>

电话通道断开媒体发送

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | toChID | number | 目标通道号 | | mediaType | number | 媒体类型MediaType |

Returns

Promise<any>

无,出错抛出异步异常


mediaPlayerClose

mediaPlayerClose(playerID): Promise<any>

关闭媒体播放通道

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | playerID | number | 播放器ID |

Returns

Promise<any>

无,出错抛出异步异常


mediaPlayerConnect

mediaPlayerConnect(playerID, toChID): Promise<any>

媒体播放器连接到电话通道

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | playerID | number | 源媒体播放器ID | | toChID | number | 目标电话通道号 |

Returns

Promise<any>

无,出错抛出异步异常


mediaPlayerDisconnect

mediaPlayerDisconnect(playerID, toChID): Promise<any>

媒体播放器断开到电话通道连接

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | playerID | number | 源媒体播放器ID | | toChID | number | 目标电话通道号 |

Returns

Promise<any>

无,出错抛出异步异常


mediaPlayerOpenFile

mediaPlayerOpenFile(filePaths, mediaType, loop, evtHdlr): Promise<number>

打开媒体文件播放器

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | filePaths | string[] | 连续播放文件路径列表 | | mediaType | MediaType | 媒体类型MediaType | | loop | boolean | 是否循环播放 | | evtHdlr | (evt: EvtMediaPlayer) => void | 播放进程事件回调函数 |

Returns

Promise<number>

异步返回播放器ID,出错异步抛出异常


mediaPlayerOpenTTS

mediaPlayerOpenTTS(text, keep, loop, evtHdlr, filePath): Promise<any>

打开TTS文字播放器

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | text | string | 播放文件内容字串 | | keep | boolean | 是否长期缓存合成的语音文件 | | loop | boolean | 是否循环播放 | | evtHdlr | (evt: EvtMediaPlayer) => void | 播放进程事件回调函数 | | filePath | string | 合成语音文件存放路径 |

Returns

Promise<any>

异步返回播放器ID,出错异步抛出异常


mediaPlayerSeek

mediaPlayerSeek(playerID, offset): Promise<any>

设置播放位置(快进/快退)

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | playerID | number | 播放器ID | | offset | number | 文件偏移量 |

Returns

Promise<any>

无,出错抛出异步异常


mediaPlayerStart

mediaPlayerStart(playerID): Promise<any>

启动媒体播放

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | playerID | number | 播放器ID |

Returns

Promise<any>

无,出错抛出异步异常


mediaPlayerStop

mediaPlayerStop(playerID): Promise<any>

停止媒体播放通道

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | playerID | number | 播放器ID |

Returns

Promise<any>

无,出错抛出异步异常


mediaRecorderStart

mediaRecorderStart(chID, filePath, mediaType, maxSize): Promise<any>

启动电话通道录音

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | chID | number | 源电话通道号 | | filePath | string | 录音文件存放路径 | | mediaType | MediaType | 媒体类型MediaType | | maxSize | number | 录音文件最大尺寸(字节数,填-1不限制) |

Returns

Promise<any>

无,出错抛出异步异常


mediaRecorderStop

mediaRecorderStop(chID): Promise<any>

停止电话通道录音

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | chID | number | 源电话通道号 |

Returns

Promise<any>

无,出错异步抛出异常


serverLogin

serverLogin(host, acc, password, onConnDown, heartbeatSeconds): Promise<any>

HxCDCServer服务器CCS2接口登录连接

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | host | string | 服务器地址:端口 | | acc | string | 登录账号 | | password | string | 登录密码 | | onConnDown | CB_ConnDown | 连接中断回调函数入口,CB_ConnDown | | heartbeatSeconds | number | 连接保持心跳周期(秒) |

Returns

Promise<any>

返回Promise,支持异步


serverLogout

serverLogout(): void

HxCDCServer服务器CCS2接口断开连接

Returns

void

Modules

Namespace: csta

CSTA接口封装

Table of contents

Functions

Functions

deviceAlternateCall

deviceAlternateCall(apiObjId, callID): Promise<any>

CSTA监控电话终端切换通话

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 终端设备API对象ID | | callID | string | 已保留的目标通话ID |

Returns

Promise<any>

无,失败异步抛出错误


deviceAnswer

deviceAnswer(apiObjId): Promise<any>

CSTA监控电话终端设备接听电话

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 终端设备API对象ID |

Returns

Promise<any>

无,失败异步抛出错误


deviceClearPeer

deviceClearPeer(apiObjId, peerID): Promise<any>

CSTA监控电话终端设备挂断电话

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 终端设备API对象ID | | peerID | string | 对方号码 |

Returns

Promise<any>

无,失败异步抛出错误


deviceConsult

deviceConsult(apiObjId, consultTo): Promise<any>

CSTA监控电话终端咨询转移

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 终端设备API对象ID | | consultTo | string | 咨询目标号码 |

Returns

Promise<any>

无,失败异步抛出错误


deviceHoldCall

deviceHoldCall(apiObjId): Promise<any>

CSTA监控电话终端保持当前通话

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 终端设备API对象ID |

Returns

Promise<any>

无,失败异步抛出错误


deviceIntrude

deviceIntrude(apiObjId, callee): Promise<any>

CSTA监控电话终端强插通话

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 终端设备API对象ID | | callee | string | 被插设备号码 |

Returns

Promise<any>

无,失败异步抛出错误


deviceMakeCall

deviceMakeCall(apiObjId, callee): Promise<any>

CSTA监控电话终端设备拨打电话

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 终端设备API对象ID | | callee | string | 被叫号码 |

Returns

Promise<any>

无,失败异步抛出错误


deviceMediaMonitor

deviceMediaMonitor(apiObjId, callee): Promise<any>

CSTA监控电话终端监听通话

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 终端设备API对象ID | | callee | string | 被监听设备号码 |

Returns

Promise<any>

无,失败异步抛出错误


deviceMonitorStart

deviceMonitorStart(swId, deviceId, evtHdlr): Promise<number>

CSTA电话终端设备监视启动

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | swId | string | CSTA交换机ID | | deviceId | string | 设备电话号码 | | evtHdlr | (evt: EvtCstaDevice) => void | 监视事件回调入口函数,传入事件对象EvtCstaDevice |

Returns

Promise<number>

成功异步返回设备API对象IDApiObjID,失败异步抛出错误


deviceSetForwarding

deviceSetForwarding(apiObjId, forwardDN): Promise<any>

CSTA监控电话终端设置无条件转移号码

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 终端设备API对象ID | | forwardDN | string | 前转目标号码,为空时取消无条件转移 |

Returns

Promise<any>

无,失败异步抛出错误


deviceTear

deviceTear(apiObjId): Promise<any>

CSTA监控电话终端设备强拆通话

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 终端设备API对象ID |

Returns

Promise<any>

无,失败异步抛出错误


deviceTransferCall

deviceTransferCall(apiObjId): Promise<any>

CSTA监控电话终端通话转接(当前通话转接到保持通话)

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 终端设备API对象ID |

Returns

Promise<any>

无,失败异步抛出错误


deviceTransferCallSingleStep

deviceTransferCallSingleStep(apiObjId, transferTo): Promise<any>

CSTA监控电话终端电话盲转(单步转移)

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 终端设备API对象ID | | transferTo | string | 转移目标号码 |

Returns

Promise<any>

无,失败异步抛出错误


dptDeviceClose

dptDeviceClose(apiObjId): Promise<any>

后台调度用SIP软电话注销停用

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 设备API对象ID |

Returns

Promise<any>

无,失败异步抛出错误


dptDeviceDial

dptDeviceDial(apiObjId, callee, hasVideo): Promise<any>

后台调度用SIP软电话拨号呼叫

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 设备API对象ID | | callee | string | 被叫号码 | | hasVideo | boolean | 是否启用视频呼叫 |

Returns

Promise<any>

无,失败异步抛出错误


dptDeviceHangup

dptDeviceHangup(apiObjId): Promise<any>

后台调度用SIP软电话挂断

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 设备API对象ID |

Returns

Promise<any>

无,失败异步抛出错误


dptDeviceOpen

dptDeviceOpen(swId, deviceId, evtHdlr): Promise<any>

后台调度用SIP软电话注册启用(注册到CSTA链路连接的相同交换机)

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | swId | string | CSTA交换机ID | | deviceId | string | 电话号码(由CSTA交换机预先分配账号) | | evtHdlr | (evt: EvtCstaDptDevice) => void | 状态事件回调函数,传入事件对象EvtCstaDptDevice |

Returns

Promise<any>

成功异步返回设备API对象IDApiObjID,失败异步抛出错误


monitorStop

monitorStop(apiObjId): Promise<any>

CSTA电话终端设备监视停止

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | apiObjId | number | 终端设备API对象ID |

Returns

Promise<any>

无,失败异步抛出错误


swMonitorStart

swMonitorStart(swId, evtHdlr): Promise<any>

CSTA链路监控启动

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | swId | string | CSTA交换机ID | | evtHdlr | (evt: EvtCstaSwitchMonitor) => void | 监视事件回调入口函数,传入事件对象EvtCstaSwitchMonitor |

Returns

Promise<any>

无,失败异步抛出错误