@94ai/nf-softphone 8.3.8 → 8.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,7 +50,7 @@ __sfc_main.props = {
50
50
  default: () => ({
51
51
  test: "http://softphone.test.k8s.com",
52
52
  dev: "http://softphone.dev.k8s.com",
53
- sg: "https://seatsg.94ai.com",
53
+ sg: "https://seat.teleai.com",
54
54
  gray: "http://softphone.gray.94ai.com",
55
55
  prod: "https://seat.94ai.com"
56
56
  })
@@ -470,7 +470,7 @@ class SoftphoneManager {
470
470
  envMap: {
471
471
  test: "http://softphone.test.k8s.com",
472
472
  dev: "http://softphone.dev.k8s.com",
473
- sg: "https://seatsg.94ai.com",
473
+ sg: "https://seat.teleai.com",
474
474
  gray: "http://softphone.gray.94ai.com",
475
475
  prod: "https://seat.94ai.com"
476
476
  },
@@ -48,7 +48,7 @@ __sfc_main.props = {
48
48
  default: () => ({
49
49
  test: "http://softphone.test.k8s.com",
50
50
  dev: "http://softphone.dev.k8s.com",
51
- sg: "https://seatsg.94ai.com",
51
+ sg: "https://seat.teleai.com",
52
52
  gray: "http://softphone.gray.94ai.com",
53
53
  prod: "https://seat.94ai.com"
54
54
  })
@@ -468,7 +468,7 @@ class SoftphoneManager {
468
468
  envMap: {
469
469
  test: "http://softphone.test.k8s.com",
470
470
  dev: "http://softphone.dev.k8s.com",
471
- sg: "https://seatsg.94ai.com",
471
+ sg: "https://seat.teleai.com",
472
472
  gray: "http://softphone.gray.94ai.com",
473
473
  prod: "https://seat.94ai.com"
474
474
  },
@@ -0,0 +1,76 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport"
6
+ content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
7
+ <title>softphone</title>
8
+ <style>
9
+ .nf-transparent {
10
+ visibility: hidden;
11
+ }
12
+ .nf-softphone-text {
13
+ text-align: center;
14
+ line-height: 32px;
15
+ margin-top: -32px;
16
+ }
17
+ .nf-softphone-container {
18
+ margin-left: 10px;
19
+ height: 32px;
20
+ min-width: 600px;
21
+ }
22
+ .nf-softphone-iframe-container {
23
+ height: 32px;
24
+ width: 100%;
25
+ overflow: visible;
26
+ }
27
+ .nf-softphone-iframe {
28
+ width: 100vw;
29
+ height: 100vh;
30
+ top: 0;
31
+ left: 0;
32
+ }
33
+ </style>
34
+ </head>
35
+ <body>
36
+ <div id='softpone-context1' style='overflow: hidden'>
37
+ <div style="display: flex;height: 32px;">
38
+ <div style="min-width: 600px;width: 600px;" id='softphone1'></div>
39
+ </div>
40
+ </div>
41
+ <script src="./util.js"></script>
42
+ <script src="./softphone.js"></script>
43
+ <script>
44
+ const agentTag1 = 'zoujh-test'
45
+ const appKey1 = '032d44009bff1752'
46
+ const appSecret1 = '4c7304c94c5e8725613516d4d6db679b'
47
+ /**
48
+ 👈 拿到实例后可以手动触发软电话实例的各种动作,如签入,签出,接听,忽略,挂断等等,注意这个实例不是软电话实例,是链接软电话通讯的实例
49
+ */
50
+ const nfSoftPhone1 = (new SoftphoneManager()).initSoftphone({ // 👈 当多实例时使用类创建新实例
51
+ el: '#softphone1', // 👈 软电话容器
52
+ selector: '#softpone-context1', // 👈 软电话容器查询上下文,用于多实例隔离软电话dom的查询环境
53
+ ancestorOrigin: 'nf-softphone1', // origin,ancestorOrigin,destinationOrigin具体含义参见下文,如果是单实例,可以写死origin=ai-softphone&destinationOrigin=nf-softphone&ancestorOrigin=nf-softphone
54
+ destinationOrigin: 'nf-softphone1',
55
+
56
+ agentTag: agentTag1, // 👈 坐席唯一标志
57
+ appKey: appKey1, // 👈 企业appKey
58
+ appSecret: appSecret1,
59
+ extStatus: '1', // 👈 初始化是否处于小休状态, 非1 小休 1 在线
60
+
61
+ softphoneConnectCallBack: (data) => {
62
+ console.log('softphone-connect')
63
+ }, // 👈 签入签出回调
64
+ softphoneCallRefreshCallBack: (data) => {console.log('softphone-call-refresh')}, // 👈 来电刷新来电记录列表回调
65
+ softphoneSeatStatusChangeCallBack: (data) => {console.log('softphone-seats-status-change')},// 👈 小休和在线切换回调
66
+ softphoneAcceptCallBack: (data) => {console.log('softphone-accept')},// 👈 接听回调
67
+ softphoneIgnoreCallBack: (data) => {console.log('softphone-ignore')},// 👈 忽略回调
68
+ softphoneHangupCallBack: (data) => {console.log('softphone-hangup')},// 👈 挂断回调
69
+ softphoneSessionStateChangeCallBack: (data) => {console.log('softphone-session-state-change')},// 👈 会话状态改变回调
70
+ softphoneIncomingCallBack: (data) => {console.log('softphone-incoming')},// 👈 来电回调
71
+ softphoneSendDtmfCallBack: (data) => {console.log('softphone-send-dtmf')},// 👈 转人工回调
72
+ softphoneConnectRegisteredCallBack: (data) => {console.log('softphone-connect-registered')},// 👈 动态绑定动作完成回调(在这之后才能执行动作类总线通讯)
73
+ });
74
+ </script>
75
+ </body>
76
+ </html>