|
JRTCSDK-Java v2401.0
视频客服 API 文档
|
Public 成员函数 | |
| void | onGetAllGroups (boolean result, List< JRTCCallCenterGroupItem > groups) |
| void | onCheckIn (boolean result, boolean pause, long onlineTime, long breakTime, long callTimes, int reason) |
| void | onCheckin (boolean result, boolean pause, String reason) |
| void | onCheckout (boolean result, @JRTCAgent.AgentCheckoutReason int reason) |
| void | onCheckStateChanged (@JRTCAgent.AgentOperatorState int currState, @JRTCAgent.AgentOperatorState int oldState) |
| void | onCallStateChanged (@JRTCAgent.AgentCallStateChangeType int type, @JRTCAgent.CallIncomingType int incomingType, JRTCInviter inviter, @JRTCAgent.CallTermReason int reason) |
| void | onCallQueueCount (int count) |
| void | onApplyResult (int operationId, boolean result) |
| void | onApplyResult (int operationId, boolean result, int subState) |
| void | onTransferCallResult (int operationId, boolean result) |
| void | onMemberJoin (JRTCRoomParticipant participant) |
| void | onMemberLeave (JRTCRoomParticipant participant) |
| void | onMemberUpdate (JRTCRoomParticipant participant, JRTCRoomParticipant.ChangeParam changeParam) |
| void | onCallPropertyChanged (JRTCRoom.PropChangeParam propChangeParam) |
| void | onUrgentRequest (String serialNumber, String callerNumber) |
| void | onResponseUrgentResult (boolean result, int operationId) |
| void | onQueryAvailableAgentList (int operationId, boolean result, List< String > userIds) |
| void | onHoldStateChanged (boolean hold) |
| void | onCallTypeChanged (@JRTCAgent.CallType int callType) |
| void | onTurnCallTypeForSipResult (boolean result, String reason) |
| void | onMessageReceived (String content, String contentType, @JRTCCallCenter.MessageType int messageType, String fromUserId) |
| void | onDeliveryAbort (boolean isShutDown, String deliveryUserId, String reason) |
| void | onInviteThirdAgentResult (boolean result, String error) |
| void | onInviteThirdGuestResult (boolean result, String userId, String error) |
| void | onNotifyMessageReceived (JRTCNotifyMessage notifyMessage, String fromUserId) |
| void | onOnewayVideoChanged (boolean turnOn) |
| void | onSignResultResponse (boolean result, String fromUserId, String extraInfo) |
| void | onFileAudioInputFinish () |
| void | onAcdPropertyChange (String userId, @JRTCCallCenter.AcdPropertyType int key, String value, boolean needConfirm) |
| void | onAcdPropertyResponse (boolean accept, String userId, @JRTCCallCenter.AcdPropertyType int key, String value) |
| void | onSwitchPartRoleResult (int operationId, boolean result, String error) |
| void | onKickParticipantResult (int operationId, boolean result, String error) |
座席相关事件回调
| void onAcdPropertyChange | ( | String | userId, |
| @JRTCCallCenter.AcdPropertyType int | key, | ||
| String | value, | ||
| boolean | needConfirm | ||
| ) |
收到通话全局属性变化通知
通话中,修改通话全局属性属性其他成员将会收到该通知,根据消息发布类型进行响应。
消息发布类型为JRTCCallCenter#ACD_PROPERTY_PUBLISH_TYPE_WAIT_RESPONSE时,需要本端确认是否同意切换。
通过调用confirmTurnCallType 来确认是否同意属性修改
| userId | 起切换通话类型用户ID |
| key | 属性的key值,除枚举提供得key之外也可以自定义 |
| value | 属性的value值 |
| needConfirm | 是否需要本端确认
|
| void onAcdPropertyResponse | ( | boolean | accept, |
| String | userId, | ||
| @JRTCCallCenter.AcdPropertyType int | key, | ||
| String | value | ||
| ) |
收到通话全局属性属性确认结果
通话中本端修改通话全局属性属性,消息发布类型如果为JRTCCallCenter#ACD_PROPERTY_PUBLISH_TYPE_WAIT_RESPONSE,则其他成员响应后本端将会收到该通知
消息发布类型为其他类型,也会收到该通知,则结果为默认同意。
| accept | 是否同意
|
| userId | 协商的用户 |
| key | 属性的key值,除枚举提供得key之外也可以自定义 |
| value | 协商的值 |
| void onApplyResult | ( | int | operationId, |
| boolean | result | ||
| ) |
示忙/示闲回调
座席示忙/示闲状态发生改变时,会收到此回调,例如调用 applyStatePause 接口修改忙闲状态。
可以通过 pause 获取当前的忙闲状态。
| operationId | 对应 applyStatePause 接口的返回值 |
| result | 示忙/示闲结果
|
onApplyResult 替换 | void onApplyResult | ( | int | operationId, |
| boolean | result, | ||
| int | subState | ||
| ) |
示忙/示闲回调
座席示忙/示闲状态发生改变时,会收到此回调,例如调用 applyStatePause 接口修改忙闲状态。
可以通过 pause 获取当前的忙闲状态。
| operationId | 对应 applyStatePause 接口的返回值 |
| result | 示忙/示闲结果
|
| subState | 当前子状态,当 result 为 true 时有效 |
| void onCallPropertyChanged | ( | JRTCRoom.PropChangeParam | propChangeParam | ) |
通话属性改变回调
| propChangeParam | 通话改变的属性 |
screenShare 属性为 true 时,去处理屏幕共享相关事件。shareRenderId 和 shareUserId 属性进行屏幕共享画面的渲染和停止渲染。 | void onCallQueueCount | ( | int | count | ) |
当前排队人数上报回调
| count | 当前座席所关联的所有业务号下排队总人数,不包含已经分配座席但是未接听的的访客成员 |
| void onCallStateChanged | ( | @JRTCAgent.AgentCallStateChangeType int | type, |
| @JRTCAgent.CallIncomingType int | incomingType, | ||
| JRTCInviter | inviter, | ||
| @JRTCAgent.CallTermReason int | reason | ||
| ) |
通话状态改变回调
| type | 通话状态改变类型,即以下情况会收到此回调:
|
| incomingType | 来电类型,当 type == AGENT_CHANGE_TYPE_INCOMING 时有效 |
| inviter | 邀请成员对象,当 type == AGENT_CHANGE_TYPE_INCOMING 时有效 |
| reason | 挂断原因,只在 type 为 AGENT_CHANGE_TYPE_TERMED 时需要关注,详见 CallTermReason |
| void onCallTypeChanged | ( | @JRTCAgent.CallType int | callType | ) |
音视频通话切换回调
通话中的访客和座席可分别调用 turnCallType 和 turnCallType 方法切换音视频通话模式,通话中所有成员都会收到此回调。
| callType | 通话模式
|
| void onCheckIn | ( | boolean | result, |
| boolean | pause, | ||
| long | onlineTime, | ||
| long | breakTime, | ||
| long | callTimes, | ||
| int | reason | ||
| ) |
签入回调
座席调用 checkIn 接口成功,会收到此回调。
| result | 签入结果
|
| pause | 签入后的示闲/示忙状态
|
| onlineTime | 座席累计在线时长 |
| breakTime | 座席累计示忙时长 |
| callTimes | 通话次数 |
| reason | 签入失败原因 |
onCheckin(boolean, boolean, String) onCheckin} 代替 | void onCheckin | ( | boolean | result, |
| boolean | pause, | ||
| String | reason | ||
| ) |
签入回调
座席调用 checkin 接口成功,会收到此回调。
| result | 签入结果
|
| pause | 签入后的示闲/示忙状态
|
| reason | 失败原因 |
| void onCheckout | ( | boolean | result, |
| @JRTCAgent.AgentCheckoutReason int | reason | ||
| ) |
| void onCheckStateChanged | ( | @JRTCAgent.AgentOperatorState int | currState, |
| @JRTCAgent.AgentOperatorState int | oldState | ||
| ) |
签入/签出状态改变回调
| currState | 当前座席状态 |
| oldState | 旧的座席状态 |
| void onDeliveryAbort | ( | boolean | isShutDown, |
| String | deliveryUserId, | ||
| String | reason | ||
| ) |
录制异常回调
远程录制异常退出时会上报此回调。
| isShutDown | 录制异常时服务器是否自动结束通话
|
| deliveryUserId | 录制异常的用户ID |
| reason | 录制异常的原因 |
| void onFileAudioInputFinish | ( | ) |
本地文件音频源输入完成回调
| void onGetAllGroups | ( | boolean | result, |
| List< JRTCCallCenterGroupItem > | groups | ||
| ) |
获取业务号列表结果回调
座席调用 queryAllGroups 接口获取业务号列表,会收到此回调。
| groups | 座席业务实体对象列表,获取失败时为 null |
| result | 获取结果
|
| void onHoldStateChanged | ( | boolean | hold | ) |
| void onInviteThirdAgentResult | ( | boolean | result, |
| String | error | ||
| ) |
邀请第三方座席结果回调
| result | 邀请第三方座席结果
|
| error | 邀请第三方座席失败原因 |
| void onInviteThirdGuestResult | ( | boolean | result, |
| String | userId, | ||
| String | error | ||
| ) |
邀请第三方访客结果回调
| result | 邀请第三方访客结果
|
| userId | 访客用户ID |
| error | 邀请第三方访客失败原因,仅在失败时生效 |
| void onKickParticipantResult | ( | int | operationId, |
| boolean | result, | ||
| String | error | ||
| ) |
踢出通话成员结果回调
| operationId | 操作id,对应 kickParticipant 接口的返回值 |
| result | 踢出通话成员结果
|
| error | 踢出通话成员操作失败原因 |
| void onMemberJoin | ( | JRTCRoomParticipant | participant | ) |
通话中有新成员加入回调
当第三方成员加入通话时,已在通话中的所有成员会收到此回调,而新加入的成员不会收到此回调。
| participant | 新加入的成员对象 |
| void onMemberLeave | ( | JRTCRoomParticipant | participant | ) |
通话中有成员离开回调
通话中有成员离开通话时,剩余的成员会收到此回调,而离开的成员不会收到此回调。
| participant | 离开的成员对象 |
| void onMemberUpdate | ( | JRTCRoomParticipant | participant, |
| JRTCRoomParticipant.ChangeParam | changeParam | ||
| ) |
| void onMessageReceived | ( | String | content, |
| String | contentType, | ||
| @JRTCCallCenter.MessageType int | messageType, | ||
| String | fromUserId | ||
| ) |
收到消息回调
通话中的访客和座席可分别调用 JRTCGuest#sendMessage(String, String, String) sendMessage} 和 JRTCAgent#sendMessage(String, String, String) sendMessage} 接口给通话中的指定成员或全体成员发送文本消息,接收消息的成员会收到此回调,由此获取消息具体信息。
| content | 消息内容 |
| contentType | 消息内容类型 |
| messageType | 消息归属类型
|
| fromUserId | 发送方的用户ID |
| void onNotifyMessageReceived | ( | JRTCNotifyMessage | notifyMessage, |
| String | fromUserId | ||
| ) |
收到事件通知消息回调
通话中的访客和座席可分别调用 sendNotifyMessage 和 sendNotifyMessage 接口给通话中的指定成员或全体成员发送通知消息,接收消息的成员会收到此回调,由此获取消息具体信息。
| notifyMessage | 事件通知实体类 |
| fromUserId | 发送方的用户ID |
| void onOnewayVideoChanged | ( | boolean | turnOn | ) |
收到单向视频状态变化回调
通话中座席调用 requestOnewayVideo 请求单向视频,所有成员都会收到此回调。
收到此回调后,应用需要自行实现单向视频功能,例如用图片遮挡该座席画面,SDK不会对画面进行单向处理。
| turnOn | 是否单向视频 |
| void onQueryAvailableAgentList | ( | int | operationId, |
| boolean | result, | ||
| List< String > | userIds | ||
| ) |
查询空闲座席结果回调
座席调用 queryAvailableAgentList 接口查询空闲座席成功时,会收到此回调。
| operationId | 操作id,对应 queryAvailableAgentList 接口的返回值 |
| result | 查询结果
|
| userIds | 查询到的空闲座席列表 |
| void onResponseUrgentResult | ( | boolean | result, |
| int | operationId | ||
| ) |
处理加急结果回调
| result | 处理结果
|
| operationId | 操作id,对应 responseUrgent 接口的返回值 |
| void onSignResultResponse | ( | boolean | result, |
| String | fromUserId, | ||
| String | extraInfo | ||
| ) |
收到访客签名响应结果回调
通话中访客调用 JRTCGuest#responseSignResult(boolean, String, String) responseSignResult} 接口给座席发送签名请求结果,座席会收到此回调。
| result | 签名结果
|
| fromUserId | 响应签名请求结果的访客用户ID |
| extraInfo | 随路额外消息 |
| void onSwitchPartRoleResult | ( | int | operationId, |
| boolean | result, | ||
| String | error | ||
| ) |
切换自己在通话中角色结果回调
| operationId | 操作id,对应 switchPartRole 接口的返回值 |
| result | 切换自己在通话中角色结果
|
| error | 切换自己在通话中角色操作失败原因 |
| void onTransferCallResult | ( | int | operationId, |
| boolean | result | ||
| ) |
通话转接回调
调用 transferCall 接口将通话转接给其他座席或业务组时,会收到此回调。
| operationId | 操作id,对应 transferCall 接口的返回值 |
| result | 通话转接结果
|
| void onTurnCallTypeForSipResult | ( | boolean | result, |
| String | reason | ||
| ) |
请求音视频通话切换结果回调
| result | 请求音视频通话切换结果
|
| reason | 失败原因 |
| void onUrgentRequest | ( | String | serialNumber, |
| String | callerNumber | ||
| ) |
收到加急请求回调
访客在排队过程中调用 requestUrgent 接口发起加急请求成功后,管理员权限的座席(业务管理平台配置)会收到此回调。
座席收到回调后可调用 responseUrgent 接口对加急请求进行处理,接口的参数从此回调中获得。
| serialNumber | 服务唯一标识 |
| callerNumber | 发起加急请求的用户ID |