Skip to content
 
 

Latest commit

 

History

328 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wellClient

GitHub release GitHub last commit GitHub issues GitHub closed issues

📱 ☎️ 📞 🎧 welljoint softphone js sdk for browser 💁 :person_with_pouting_face:

浏览器支持

Chrome Firefox Safari Opera Edge IE
Latest ✔ Latest ✔ Latest ✔ Latest ✔ Latest ✔ 11 ✔

目录

  • 快速开始
    • 运行项目和在线demo
    • 硬件要求
    • 软件要求
    • 引入JS文件
    • 配置
    • 登录
    • 调试
    • wellPhone相关
  • wellClient 核心方法说明
    • wellClient.useConfig(envName): 使用配置
    • wellClient.setConfig(config):设置配置信息
    • wellClient.agentLogin(agent): 座席登录
    • wellClient.logout():座席登出
    • wellClient.setAgentMode(mode):设置座席状态
    • wellClient.makeCall(phoneNumber, oprtions):拨打电话
    • wellClient.answerCall(callId):接听电话
    • wellClient.dropConnection(callId):挂断链接
    • wellClient.holdCall(callId):保持电话
    • wellClient.retrieveCall(callId):取回电话
    • wellClient.singleStepTransfer(callId,phoneNumber):单步转移
    • wellClient.singleStepConference(callId,phoneNumber,type):单步会议
    • wellClient.consult(holdCallId,phoneNumber):咨询
    • wellClient.conference(holdCallId, consultCallId):会议
    • wellClient.cancelConsult(holdCallId, consultCallId):取消咨询
    • wellClient.transferCall(holdCallId, consultCallId):咨询后转移
    • wellClient.setCallData(callId, data):设置随路数据
    • wellClient.getCallData(callId):获取随路数据
    • wellClient.getMyPrefix():获取当前座席可用的前缀号码
    • wellClient.isLogined():获取当前座席是否登录
    • wellClient.getConfig():获取配置信息
    • wellClient.getWs():获取WebSocket对象
    • wellClient.checkRecoverStateAbility(option):检查恢复状态能力
    • wellClient.stopRecording():停止录音
    • wellClient.startRecording():开启录音
  • 事件订阅
    • wellClient.on(eventName,callback):事件订阅函数
    • wellClient.innerOn(evnentName, callback(data){}): 订阅内部事件
    • 订阅挂断事件:connectionCleared
    • 订阅登录失败事件:loginFailed
    • 订阅websocket断开事件:wsDisconnected
    • 订阅状态恢复成功事件:recoverStateSuccess
    • wellClient.exports=function(event){}: 所有事件的回调函数
    • wellClient.onLog=function(msg){}: 所有日志的回调函数
  • 事件顺序说明
  • 事件及其数据结构
    • agentLoggedOn:座席登录事件
    • agentLoggedOff:座席登出事件
    • agentReady:座席就绪事件
    • agentNotReady:座席离席事件
    • serviceInitiated:初始化事件
    • originated:呼出事件
    • delivered:振铃事件
    • established:接通事件
    • connectionCleared:呼叫挂断事件
    • transferred:转移事件
    • conferenced:会议事件
    • retrieved:取回事件
    • held:保持事件
    • agentWorkingAfterCall:座席话后处理事件
    • agentAllocated:座席预占事件
    • recordStarted: 录音开始事件
    • recordStopped: 录音停止事件
    • failed: 外呼失败事件
  • 强制操作接口
    • wellClient.forceDrop(deviceId, callId): 强拆
    • wellClient.forceJoin(deviceId, callId, phoneNumber): 强插
    • wellClient.forceTake(deviceId, callId, phoneNumber): 接管
    • wellClient.forceListen(callId, deviceId): 监听
    • wellClient.forceReady(agentId, deviceId): 强制就绪
    • wellClient.forceNotReady(agentId, deviceId):强制离席
    • wellClient.forceLogout(agentId, deviceId): 强制签出
  • 调试工具
  • FAQ
    • 点了某个按钮后,页面没有任何反应
    • 为什么我的页面没有wellClient的全局变量
    • 为什么我在电脑上登录了wellPhone,但是页面软电话登录的时候,还是报错说分机未注册
    • 页面刷新或者关闭后,软电话(即指wellClient)是否会自动登出?
    • 如果断网了,软电话是否会自动登出?
    • 软电话使用了websocket,如果因为网络不稳定,websocket断开后,是否会自动重连。
    • 软电话对浏览器有什么要求,IE浏览器支持到什么版本?
    • 直接转分机的号码形式
    • 我的浏览器支持websocket, 为什么无法建立websocekt连接
    • 从日志看收到了某个事件,但是页面没有变化。例如收到接通事件,页面按钮都没变
    • 如何下载日志?
    • 呼出就秒挂
    • 外线挂断后,软电话收不到挂断事件,软电话主动挂断却可以收到挂断事件

About

📱 ☎️ 📞 🎧 welljoint softphone js sdk 💁 :person_with_pouting_face:

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages