global.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. var hollyglobal = {
  2. //注册
  3. login(extNo) {
  4. hollyglobal.loginUser=extNo
  5. var actionName = "Login",
  6. phoneJson = {
  7. Command: "Action",
  8. Action: actionName,
  9. ActionID: actionName + Math.random(),
  10. Monitor: true,
  11. ExtenType: hollyglobal.loginExtenType,
  12. Password: hollyglobal.loginPassword,
  13. BusyType: hollyglobal.loginBusyType,
  14. User: hollyglobal.loginUser
  15. },
  16. config = {
  17. proxy_url: hollyglobal.loginProxyUrl,
  18. user: hollyglobal.loginUser
  19. };
  20. holly.phone.phone_register(config, phoneJson);
  21. },
  22. reLogin(){
  23. holly.phone._phone_relogin(false);
  24. },
  25. actionEvent:function(type,result){//用来接收设置空闲、挂断等状态 是否执行成功 1空闲 2挂断
  26. },
  27. msgEvent:function(msg,id){
  28. },
  29. /**
  30. * call:{//外呼电话内容
  31. builtId:0,//任务id
  32. ticketId:0, //工单id:如果是工单发起的外呼 默认0
  33. customerId:0,//客户id 必传
  34. mobile:'13262258272',//电话号码
  35. name:'', //客户名称
  36. type:'OB',//默认OB
  37. source:''}//外呼来源:电访任务发起=campaign;工单=ticket
  38. */
  39. dialoutEvent:function(call){//外拨公用事件
  40. },
  41. /**
  42. * ticket发起的 不需要调用此方法
  43. * 电访任务、进电时,保存电访结果时调用此方法,会将工具条从话后=转为空闲
  44. */
  45. saveRecordEvent:function(callid){//保存话务记录,每次电访保存时调用;如果是工单发起的外拨,callid=0
  46. },
  47. hangupEvent: function (peer) {
  48. hollyglobal.actionEvent('hangup',peer);
  49. },
  50. ringEvent: function (peer) {
  51. console.dir(peer);
  52. },
  53. talkingEvent: function (peer) {
  54. console.dir(peer);
  55. },
  56. loginSuccessCallback: function (peer) {
  57. },
  58. loginFailureCallback: function (peer) {
  59. },
  60. startWith: function (str, prefix) {
  61. return str.indexOf(prefix) == 0;
  62. },
  63. pbxs: [
  64. {
  65. PBX: '2.3.1.100',
  66. pbxNick: '100',
  67. NickName: '100',
  68. proxyUrl: "http:/101.201.239.37:7777/"
  69. }
  70. ],
  71. //accountId: 'N000000009418',
  72. accountId: 'N000000017088',
  73. sipConfigId: '2.3.1.100',
  74. monitorPassword: '7pu3refwds98172e',
  75. monitorUserID: '2387rufhinjvcx73rfws',
  76. loginBusyType: "0",//0空闲 1忙碌
  77. // loginUser: "8016@lmzcs",//软电话登录的登录名
  78. // loginPassword: "123abc",//软电话登录的密码
  79. // loginExtenType: "sip",//软电话登录的登录方式
  80. // loginProxyUrl: "http://210.14.88.129",//软电话条需要请求的服务器IP(PBX IP)
  81. //dep环境账号
  82. // loginUser: "8001@sunmj1",//软电话登录的登录名
  83. // loginPassword: "Lirong520",//软电话登录的密码
  84. // 生产环境账号
  85. loginUser: "8888@jzsh",//软电话登录的登录名
  86. loginPassword: "QAZwsx123!",//软电话登录的密码
  87. loginExtenType: "Local",//软电话登录的登录方式
  88. // loginProxyUrl: "http://106.14.46.234",//软电话条需要请求的服务器IP(PBX IP)
  89. loginProxyUrl: "http://a6.7x24cc.com",//软电话条需要请求的服务器IP(PBX IP)
  90. isDisplayInvestigate: true,//转调查
  91. isDisplayConsult: false,//咨询
  92. isHiddenNumber: false,//号码隐藏
  93. isMonitorPage: false,//
  94. isDisplayTransfer: false,//转接
  95. isMonitorJoint: false//是否监控对接
  96. };