@webex/calling 3.0.0-next.9 → 3.0.1
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.
- package/dist/CallHistory/CallHistory.js +48 -48
- package/dist/CallHistory/CallHistory.js.map +1 -1
- package/dist/CallHistory/CallHistory.test.js +9 -0
- package/dist/CallHistory/CallHistory.test.js.map +1 -1
- package/dist/CallHistory/callHistoryFixtures.js +63 -7
- package/dist/CallHistory/callHistoryFixtures.js.map +1 -1
- package/dist/CallHistory/constants.js +9 -18
- package/dist/CallHistory/constants.js.map +1 -1
- package/dist/CallSettings/CallSettings.js +18 -13
- package/dist/CallSettings/CallSettings.js.map +1 -1
- package/dist/CallSettings/CallSettings.test.js.map +1 -1
- package/dist/CallSettings/UcmBackendConnector.js +7 -8
- package/dist/CallSettings/UcmBackendConnector.js.map +1 -1
- package/dist/CallSettings/UcmBackendConnector.test.js +69 -37
- package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.js +19 -13
- package/dist/CallSettings/WxCallBackendConnector.js.map +1 -1
- package/dist/CallSettings/WxCallBackendConnector.test.js +2 -2
- package/dist/CallSettings/WxCallBackendConnector.test.js.map +1 -1
- package/dist/CallSettings/constants.js +11 -22
- package/dist/CallSettings/constants.js.map +1 -1
- package/dist/CallSettings/testFixtures.js +4 -8
- package/dist/CallSettings/testFixtures.js.map +1 -1
- package/dist/CallSettings/types.js.map +1 -1
- package/dist/CallingClient/CallingClient.js +108 -64
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +170 -109
- package/dist/CallingClient/CallingClient.test.js.map +1 -1
- package/dist/CallingClient/callRecordFixtures.js +2 -4
- package/dist/CallingClient/callRecordFixtures.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.js +9 -29
- package/dist/CallingClient/calling/CallerId/index.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.test.js.map +1 -1
- package/dist/CallingClient/calling/call.js +136 -70
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +651 -409
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/calling/callManager.js +3 -5
- package/dist/CallingClient/calling/callManager.js.map +1 -1
- package/dist/CallingClient/calling/callManager.test.js +1 -1
- package/dist/CallingClient/calling/callManager.test.js.map +1 -1
- package/dist/CallingClient/calling/types.js +31 -33
- package/dist/CallingClient/calling/types.js.map +1 -1
- package/dist/CallingClient/callingClientFixtures.js +107 -17
- package/dist/CallingClient/callingClientFixtures.js.map +1 -1
- package/dist/CallingClient/constants.js +101 -193
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/CallingClient/line/index.js +18 -17
- package/dist/CallingClient/line/index.js.map +1 -1
- package/dist/CallingClient/line/line.test.js +13 -13
- package/dist/CallingClient/line/line.test.js.map +1 -1
- package/dist/CallingClient/line/types.js +7 -14
- package/dist/CallingClient/line/types.js.map +1 -1
- package/dist/CallingClient/registration/register.js +90 -71
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +33 -32
- package/dist/CallingClient/registration/register.test.js.map +1 -1
- package/dist/CallingClient/registration/registerFixtures.js +5 -10
- package/dist/CallingClient/registration/registerFixtures.js.map +1 -1
- package/dist/CallingClient/registration/types.js.map +1 -1
- package/dist/Contacts/ContactsClient.js +30 -19
- package/dist/Contacts/ContactsClient.js.map +1 -1
- package/dist/Contacts/ContactsClient.test.js +4 -4
- package/dist/Contacts/ContactsClient.test.js.map +1 -1
- package/dist/Contacts/constants.js +10 -18
- package/dist/Contacts/constants.js.map +1 -1
- package/dist/Contacts/contactFixtures.js +26 -52
- package/dist/Contacts/contactFixtures.js.map +1 -1
- package/dist/Contacts/types.js +29 -9
- package/dist/Contacts/types.js.map +1 -1
- package/dist/Errors/catalog/CallError.js +3 -5
- package/dist/Errors/catalog/CallError.js.map +1 -1
- package/dist/Errors/catalog/CallingDeviceError.js +4 -6
- package/dist/Errors/catalog/CallingDeviceError.js.map +1 -1
- package/dist/Errors/catalog/ExtendedError.js +2 -3
- package/dist/Errors/catalog/ExtendedError.js.map +1 -1
- package/dist/Errors/catalog/LineError.js +5 -7
- package/dist/Errors/catalog/LineError.js.map +1 -1
- package/dist/Errors/index.js +7 -0
- package/dist/Errors/index.js.map +1 -1
- package/dist/Errors/types.js +15 -20
- package/dist/Errors/types.js.map +1 -1
- package/dist/Events/impl/index.js +2 -3
- package/dist/Events/impl/index.js.map +1 -1
- package/dist/Events/types.js +44 -52
- package/dist/Events/types.js.map +1 -1
- package/dist/Logger/index.js +1 -2
- package/dist/Logger/index.js.map +1 -1
- package/dist/Logger/index.test.js.map +1 -1
- package/dist/Logger/types.js +9 -12
- package/dist/Logger/types.js.map +1 -1
- package/dist/Metrics/index.js +2 -4
- package/dist/Metrics/index.js.map +1 -1
- package/dist/Metrics/index.test.js +3 -3
- package/dist/Metrics/index.test.js.map +1 -1
- package/dist/Metrics/types.js +15 -20
- package/dist/Metrics/types.js.map +1 -1
- package/dist/SDKConnector/index.js +1 -2
- package/dist/SDKConnector/index.js.map +1 -1
- package/dist/SDKConnector/types.js.map +1 -1
- package/dist/SDKConnector/utils.js +1 -2
- package/dist/SDKConnector/utils.js.map +1 -1
- package/dist/Voicemail/BroadworksBackendConnector.js +21 -12
- package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -1
- package/dist/Voicemail/BroadworksBackendConnector.test.js +2 -2
- package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/UcmBackendConnector.js +19 -11
- package/dist/Voicemail/UcmBackendConnector.js.map +1 -1
- package/dist/Voicemail/UcmBackendConnector.test.js +5 -4
- package/dist/Voicemail/UcmBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/Voicemail.js +17 -12
- package/dist/Voicemail/Voicemail.js.map +1 -1
- package/dist/Voicemail/Voicemail.test.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.js +17 -10
- package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.test.js +4 -4
- package/dist/Voicemail/WxCallBackendConnector.test.js.map +1 -1
- package/dist/Voicemail/constants.js +29 -58
- package/dist/Voicemail/constants.js.map +1 -1
- package/dist/Voicemail/voicemailFixture.js +35 -70
- package/dist/Voicemail/voicemailFixture.js.map +1 -1
- package/dist/api.js.map +1 -1
- package/dist/common/Utils.js +18 -25
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +3 -3
- package/dist/common/Utils.test.js.map +1 -1
- package/dist/common/constants.js +41 -82
- package/dist/common/constants.js.map +1 -1
- package/dist/common/testUtil.js +12 -21
- package/dist/common/testUtil.js.map +1 -1
- package/dist/common/types.js +34 -43
- package/dist/common/types.js.map +1 -1
- package/dist/index.js +246 -0
- package/dist/index.js.map +1 -1
- package/dist/module/CallHistory/CallHistory.js +7 -5
- package/dist/module/CallHistory/callHistoryFixtures.js +59 -0
- package/dist/module/CallSettings/UcmBackendConnector.js +4 -4
- package/dist/module/CallingClient/CallingClient.js +59 -42
- package/dist/module/CallingClient/calling/CallerId/index.js +3 -23
- package/dist/module/CallingClient/calling/call.js +69 -26
- package/dist/module/CallingClient/callingClientFixtures.js +119 -1
- package/dist/module/CallingClient/constants.js +8 -4
- package/dist/module/CallingClient/line/index.js +9 -12
- package/dist/module/CallingClient/line/types.js +0 -5
- package/dist/module/CallingClient/registration/register.js +28 -20
- package/dist/module/Errors/catalog/CallingDeviceError.js +2 -2
- package/dist/module/Errors/catalog/LineError.js +2 -2
- package/dist/module/Errors/index.js +1 -0
- package/dist/module/Events/types.js +2 -0
- package/dist/module/common/Utils.js +14 -19
- package/dist/module/common/testUtil.js +2 -1
- package/dist/module/common/types.js +6 -5
- package/dist/module/index.js +9 -0
- package/dist/types/CallHistory/CallHistory.d.ts +2 -1
- package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
- package/dist/types/CallHistory/callHistoryFixtures.d.ts +1 -0
- package/dist/types/CallHistory/callHistoryFixtures.d.ts.map +1 -1
- package/dist/types/CallSettings/UcmBackendConnector.d.ts +1 -1
- package/dist/types/CallSettings/UcmBackendConnector.d.ts.map +1 -1
- package/dist/types/CallSettings/types.d.ts +1 -0
- package/dist/types/CallSettings/types.d.ts.map +1 -1
- package/dist/types/CallingClient/CallingClient.d.ts +2 -0
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/CallerId/index.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/call.d.ts +2 -0
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/types.d.ts +1 -0
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
- package/dist/types/CallingClient/callingClientFixtures.d.ts +69 -1
- package/dist/types/CallingClient/callingClientFixtures.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +7 -3
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/CallingClient/line/index.d.ts +6 -6
- package/dist/types/CallingClient/line/index.d.ts.map +1 -1
- package/dist/types/CallingClient/line/types.d.ts +5 -17
- package/dist/types/CallingClient/line/types.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts +3 -3
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/types.d.ts +3 -3
- package/dist/types/CallingClient/registration/types.d.ts.map +1 -1
- package/dist/types/Contacts/ContactsClient.d.ts +1 -1
- package/dist/types/Errors/catalog/CallingDeviceError.d.ts +4 -4
- package/dist/types/Errors/catalog/CallingDeviceError.d.ts.map +1 -1
- package/dist/types/Errors/catalog/LineError.d.ts +4 -4
- package/dist/types/Errors/catalog/LineError.d.ts.map +1 -1
- package/dist/types/Errors/index.d.ts +1 -0
- package/dist/types/Errors/index.d.ts.map +1 -1
- package/dist/types/Errors/types.d.ts +2 -3
- package/dist/types/Errors/types.d.ts.map +1 -1
- package/dist/types/Events/types.d.ts +28 -5
- package/dist/types/Events/types.d.ts.map +1 -1
- package/dist/types/SDKConnector/types.d.ts +2 -1
- package/dist/types/SDKConnector/types.d.ts.map +1 -1
- package/dist/types/Voicemail/UcmBackendConnector.d.ts +1 -1
- package/dist/types/Voicemail/WxCallBackendConnector.d.ts +1 -1
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/dist/types/common/testUtil.d.ts +1 -0
- package/dist/types/common/testUtil.d.ts.map +1 -1
- package/dist/types/common/types.d.ts +3 -2
- package/dist/types/common/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +13 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -5,6 +5,192 @@ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequ
|
|
|
5
5
|
_Object$defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
_Object$defineProperty(exports, "CALLING_CLIENT_EVENT_KEYS", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _types8.CALLING_CLIENT_EVENT_KEYS;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
_Object$defineProperty(exports, "CALL_EVENT_KEYS", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function get() {
|
|
17
|
+
return _types8.CALL_EVENT_KEYS;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
_Object$defineProperty(exports, "COMMON_EVENT_KEYS", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _types8.COMMON_EVENT_KEYS;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
_Object$defineProperty(exports, "CallDetails", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function get() {
|
|
29
|
+
return _types9.CallDetails;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
_Object$defineProperty(exports, "CallDirection", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function get() {
|
|
35
|
+
return _types9.CallDirection;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
_Object$defineProperty(exports, "CallError", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _Errors.CallError;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
_Object$defineProperty(exports, "CallForwardAlwaysSetting", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function get() {
|
|
47
|
+
return _types4.CallForwardAlwaysSetting;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
_Object$defineProperty(exports, "CallForwardSetting", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function get() {
|
|
53
|
+
return _types4.CallForwardSetting;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
_Object$defineProperty(exports, "CallSettingResponse", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function get() {
|
|
59
|
+
return _types4.CallSettingResponse;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
_Object$defineProperty(exports, "CallType", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function get() {
|
|
65
|
+
return _types9.CallType;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
_Object$defineProperty(exports, "CallerIdDisplay", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function get() {
|
|
71
|
+
return _types8.CallerIdDisplay;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
_Object$defineProperty(exports, "Contact", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function get() {
|
|
77
|
+
return _types5.Contact;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
_Object$defineProperty(exports, "ContactResponse", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function get() {
|
|
83
|
+
return _types5.ContactResponse;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
_Object$defineProperty(exports, "DisplayInformation", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function get() {
|
|
89
|
+
return _types9.DisplayInformation;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
_Object$defineProperty(exports, "Disposition", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: function get() {
|
|
95
|
+
return _types8.Disposition;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
_Object$defineProperty(exports, "ERROR_LAYER", {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function get() {
|
|
101
|
+
return _types.ERROR_LAYER;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
_Object$defineProperty(exports, "ERROR_TYPE", {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
get: function get() {
|
|
107
|
+
return _types.ERROR_TYPE;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
_Object$defineProperty(exports, "GroupType", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function get() {
|
|
113
|
+
return _types5.GroupType;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
_Object$defineProperty(exports, "ICall", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function get() {
|
|
119
|
+
return _types10.ICall;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
_Object$defineProperty(exports, "ICallHistory", {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
get: function get() {
|
|
125
|
+
return _types3.ICallHistory;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
_Object$defineProperty(exports, "ICallSettings", {
|
|
129
|
+
enumerable: true,
|
|
130
|
+
get: function get() {
|
|
131
|
+
return _types4.ICallSettings;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
_Object$defineProperty(exports, "ICallingClient", {
|
|
135
|
+
enumerable: true,
|
|
136
|
+
get: function get() {
|
|
137
|
+
return _types2.ICallingClient;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
_Object$defineProperty(exports, "IContacts", {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: function get() {
|
|
143
|
+
return _types5.IContacts;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
_Object$defineProperty(exports, "ILine", {
|
|
147
|
+
enumerable: true,
|
|
148
|
+
get: function get() {
|
|
149
|
+
return _types7.ILine;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
_Object$defineProperty(exports, "IVoicemail", {
|
|
153
|
+
enumerable: true,
|
|
154
|
+
get: function get() {
|
|
155
|
+
return _types6.IVoicemail;
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
_Object$defineProperty(exports, "JanusResponseEvent", {
|
|
159
|
+
enumerable: true,
|
|
160
|
+
get: function get() {
|
|
161
|
+
return _types3.JanusResponseEvent;
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
_Object$defineProperty(exports, "LINE_EVENTS", {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function get() {
|
|
167
|
+
return _types7.LINE_EVENTS;
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
_Object$defineProperty(exports, "LINE_EVENT_KEYS", {
|
|
171
|
+
enumerable: true,
|
|
172
|
+
get: function get() {
|
|
173
|
+
return _types8.LINE_EVENT_KEYS;
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
_Object$defineProperty(exports, "LOGGER", {
|
|
177
|
+
enumerable: true,
|
|
178
|
+
get: function get() {
|
|
179
|
+
return _types11.LOGGER;
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
_Object$defineProperty(exports, "LineError", {
|
|
183
|
+
enumerable: true,
|
|
184
|
+
get: function get() {
|
|
185
|
+
return _Errors.LineError;
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
_Object$defineProperty(exports, "LocalMicrophoneStream", {
|
|
189
|
+
enumerable: true,
|
|
190
|
+
get: function get() {
|
|
191
|
+
return _mediaHelpers.LocalMicrophoneStream;
|
|
192
|
+
}
|
|
193
|
+
});
|
|
8
194
|
_Object$defineProperty(exports, "Logger", {
|
|
9
195
|
enumerable: true,
|
|
10
196
|
get: function get() {
|
|
@@ -17,6 +203,54 @@ _Object$defineProperty(exports, "NoiseReductionEffect", {
|
|
|
17
203
|
return _mediaHelpers.NoiseReductionEffect;
|
|
18
204
|
}
|
|
19
205
|
});
|
|
206
|
+
_Object$defineProperty(exports, "SORT", {
|
|
207
|
+
enumerable: true,
|
|
208
|
+
get: function get() {
|
|
209
|
+
return _types9.SORT;
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
_Object$defineProperty(exports, "SORT_BY", {
|
|
213
|
+
enumerable: true,
|
|
214
|
+
get: function get() {
|
|
215
|
+
return _types9.SORT_BY;
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
_Object$defineProperty(exports, "SummaryInfo", {
|
|
219
|
+
enumerable: true,
|
|
220
|
+
get: function get() {
|
|
221
|
+
return _types6.SummaryInfo;
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
_Object$defineProperty(exports, "ToggleSetting", {
|
|
225
|
+
enumerable: true,
|
|
226
|
+
get: function get() {
|
|
227
|
+
return _types4.ToggleSetting;
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
_Object$defineProperty(exports, "TransferType", {
|
|
231
|
+
enumerable: true,
|
|
232
|
+
get: function get() {
|
|
233
|
+
return _types10.TransferType;
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
_Object$defineProperty(exports, "UserSession", {
|
|
237
|
+
enumerable: true,
|
|
238
|
+
get: function get() {
|
|
239
|
+
return _types8.UserSession;
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
_Object$defineProperty(exports, "VoicemailResponseEvent", {
|
|
243
|
+
enumerable: true,
|
|
244
|
+
get: function get() {
|
|
245
|
+
return _types6.VoicemailResponseEvent;
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
_Object$defineProperty(exports, "VoicemailSetting", {
|
|
249
|
+
enumerable: true,
|
|
250
|
+
get: function get() {
|
|
251
|
+
return _types4.VoicemailSetting;
|
|
252
|
+
}
|
|
253
|
+
});
|
|
20
254
|
_Object$defineProperty(exports, "createCallHistoryClient", {
|
|
21
255
|
enumerable: true,
|
|
22
256
|
get: function get() {
|
|
@@ -60,4 +294,16 @@ var _CallingClient = require("./CallingClient/CallingClient");
|
|
|
60
294
|
var _CallHistory = require("./CallHistory/CallHistory");
|
|
61
295
|
var _Voicemail = require("./Voicemail/Voicemail");
|
|
62
296
|
var _Logger = _interopRequireDefault(require("./Logger"));
|
|
297
|
+
var _types = require("./Errors/types");
|
|
298
|
+
var _types2 = require("./CallingClient/types");
|
|
299
|
+
var _types3 = require("./CallHistory/types");
|
|
300
|
+
var _types4 = require("./CallSettings/types");
|
|
301
|
+
var _types5 = require("./Contacts/types");
|
|
302
|
+
var _types6 = require("./Voicemail/types");
|
|
303
|
+
var _types7 = require("./CallingClient/line/types");
|
|
304
|
+
var _types8 = require("./Events/types");
|
|
305
|
+
var _types9 = require("./common/types");
|
|
306
|
+
var _Errors = require("./Errors");
|
|
307
|
+
var _types10 = require("./CallingClient/calling/types");
|
|
308
|
+
var _types11 = require("./Logger/types");
|
|
63
309
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_mediaHelpers","require","_CallSettings","_ContactsClient","_CallingClient","_CallHistory","_Voicemail","_Logger","_interopRequireDefault"],"sources":["index.ts"],"sourcesContent":["import {NoiseReductionEffect, createMicrophoneStream} from '@webex/media-helpers';\nimport {createCallSettingsClient} from './CallSettings/CallSettings';\nimport {createContactsClient} from './Contacts/ContactsClient';\nimport {createClient} from './CallingClient/CallingClient';\nimport {createCallHistoryClient} from './CallHistory/CallHistory';\nimport {createVoicemailClient} from './Voicemail/Voicemail';\nimport Logger from './Logger';\n\nexport {\n createClient,\n createCallHistoryClient,\n createCallSettingsClient,\n createContactsClient,\n createMicrophoneStream,\n createVoicemailClient,\n Logger,\n NoiseReductionEffect,\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_mediaHelpers","require","_CallSettings","_ContactsClient","_CallingClient","_CallHistory","_Voicemail","_Logger","_interopRequireDefault","_types","_types2","_types3","_types4","_types5","_types6","_types7","_types8","_types9","_Errors","_types10","_types11"],"sources":["index.ts"],"sourcesContent":["import {NoiseReductionEffect, createMicrophoneStream} from '@webex/media-helpers';\nimport {createCallSettingsClient} from './CallSettings/CallSettings';\nimport {createContactsClient} from './Contacts/ContactsClient';\nimport {createClient} from './CallingClient/CallingClient';\nimport {createCallHistoryClient} from './CallHistory/CallHistory';\nimport {createVoicemailClient} from './Voicemail/Voicemail';\nimport Logger from './Logger';\n\nexport {\n createClient,\n createCallHistoryClient,\n createCallSettingsClient,\n createContactsClient,\n createMicrophoneStream,\n createVoicemailClient,\n Logger,\n NoiseReductionEffect,\n};\n\nexport {ERROR_LAYER, ERROR_TYPE} from './Errors/types';\nexport {ICallingClient} from './CallingClient/types';\nexport {ICallHistory, JanusResponseEvent} from './CallHistory/types';\nexport {\n CallForwardSetting,\n CallForwardAlwaysSetting,\n CallSettingResponse,\n ICallSettings,\n ToggleSetting,\n VoicemailSetting,\n} from './CallSettings/types';\nexport {Contact, ContactResponse, GroupType, IContacts} from './Contacts/types';\nexport {IVoicemail, SummaryInfo, VoicemailResponseEvent} from './Voicemail/types';\nexport {ILine, LINE_EVENTS} from './CallingClient/line/types';\nexport {\n CALLING_CLIENT_EVENT_KEYS,\n CALL_EVENT_KEYS,\n CallerIdDisplay,\n Disposition,\n LINE_EVENT_KEYS,\n COMMON_EVENT_KEYS,\n UserSession,\n} from './Events/types';\nexport {\n CallDetails,\n CallDirection,\n CallType,\n DisplayInformation,\n SORT,\n SORT_BY,\n} from './common/types';\nexport {CallError, LineError} from './Errors';\nexport {ICall, TransferType} from './CallingClient/calling/types';\nexport {LOGGER} from './Logger/types';\nexport {LocalMicrophoneStream} from '@webex/media-helpers';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAC,sBAAA,CAAAP,OAAA;AAaA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AACA,IAAAW,OAAA,GAAAX,OAAA;AAQA,IAAAY,OAAA,GAAAZ,OAAA;AACA,IAAAa,OAAA,GAAAb,OAAA;AACA,IAAAc,OAAA,GAAAd,OAAA;AACA,IAAAe,OAAA,GAAAf,OAAA;AASA,IAAAgB,OAAA,GAAAhB,OAAA;AAQA,IAAAiB,OAAA,GAAAjB,OAAA;AACA,IAAAkB,QAAA,GAAAlB,OAAA;AACA,IAAAmB,QAAA,GAAAnB,OAAA"}
|
|
@@ -70,12 +70,14 @@ export class CallHistory extends Eventing {
|
|
|
70
70
|
return errorStatus;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
+
handleSessionEvents = async (event) => {
|
|
74
|
+
if (event && event.data.userSessions.userSessions) {
|
|
75
|
+
this.emit(COMMON_EVENT_KEYS.CALL_HISTORY_USER_SESSION_INFO, event);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
73
78
|
registerSessionsListener() {
|
|
74
|
-
this.sdkConnector.registerListener(MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE,
|
|
75
|
-
|
|
76
|
-
this.emit(COMMON_EVENT_KEYS.CALL_HISTORY_USER_SESSION_INFO, event);
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
+
this.sdkConnector.registerListener(MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_INCLUSIVE, this.handleSessionEvents);
|
|
80
|
+
this.sdkConnector.registerListener(MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_LEGACY, this.handleSessionEvents);
|
|
79
81
|
}
|
|
80
82
|
}
|
|
81
83
|
export const createCallHistoryClient = (webex, logger) => new CallHistory(webex, logger);
|
|
@@ -289,10 +289,57 @@ const WEBEX_CALL_SESSION = {
|
|
|
289
289
|
conversationUrl: 'https://conv-a.wbx2.com/conversation/api/v1/conversations/c9252ff0-9de2-11ec-a582-59d00c02cca9',
|
|
290
290
|
callbackAddress: '123-456-7890',
|
|
291
291
|
},
|
|
292
|
+
callingSpecifics: {
|
|
293
|
+
redirectionDetails: {
|
|
294
|
+
phoneNumber: '+18308508011',
|
|
295
|
+
name: 'Test QA Call Center',
|
|
296
|
+
reason: 'CALLQUEUE',
|
|
297
|
+
userId: '604a966d-7518-4b74-8d78-6c05caf98239',
|
|
298
|
+
isPrivate: false,
|
|
299
|
+
},
|
|
300
|
+
},
|
|
292
301
|
isDeleted: false,
|
|
293
302
|
isPMR: false,
|
|
294
303
|
correlationIds: ['58ea6cd9-852b-4a77-957f-e704c8b0e63e'],
|
|
295
304
|
};
|
|
305
|
+
const SPARK_CALL_SESSION = {
|
|
306
|
+
id: '2ce4b9e0-7ee7-12a1-4a94-df524443b520',
|
|
307
|
+
durationSecs: 0,
|
|
308
|
+
self: {
|
|
309
|
+
id: '0fea4a63-4e27-46ee-99c3-2472cb12bf68',
|
|
310
|
+
name: 'Alice',
|
|
311
|
+
incomingCallProtocols: [],
|
|
312
|
+
callbackInfo: {
|
|
313
|
+
callbackAddress: 'alice@cisco.com',
|
|
314
|
+
callbackType: 'EMAIL',
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
url: 'https://janus-a.wbx2.com/janus/api/v1/history/userSessions/2ce4b9e0-7ee7-12a1-4a94-df524443b520',
|
|
318
|
+
sessionId: '2ce4b9e0-7ee7-12a1-4a94-df524443b520',
|
|
319
|
+
sessionType: SessionType.SPARK,
|
|
320
|
+
startTime: '2024-02-23T09:12:31.703Z',
|
|
321
|
+
endTime: '2024-02-23T09:12:39.468Z',
|
|
322
|
+
direction: 'OUTGOING',
|
|
323
|
+
disposition: Disposition.INITIATED,
|
|
324
|
+
other: {
|
|
325
|
+
id: '8391c34e-9cb1-4fd0-b868-31902c02290c',
|
|
326
|
+
name: 'Umar Patel',
|
|
327
|
+
isPrivate: false,
|
|
328
|
+
callbackAddress: '8391c34e-9cb1-4fd0-b868-31902c02290c',
|
|
329
|
+
},
|
|
330
|
+
durationSeconds: 0,
|
|
331
|
+
joinedDurationSeconds: 7,
|
|
332
|
+
participantCount: 2,
|
|
333
|
+
links: {
|
|
334
|
+
locusUrl: 'https://locus-a.wbx2.com/locus/api/v1/loci/bdb775e5-e7ad-370c-8fa9-b5d7e2795ae2',
|
|
335
|
+
conversationUrl: 'https://conv-a.wbx2.com/conversation/api/v1/conversations/0ed14356-1bf5-3eb9-99d6-9f7a3ad07426',
|
|
336
|
+
callbackAddress: '8391c34e-9cb1-4fd0-b868-31902c02290c',
|
|
337
|
+
},
|
|
338
|
+
isDeleted: false,
|
|
339
|
+
isPMR: false,
|
|
340
|
+
isTest: false,
|
|
341
|
+
correlationIds: ['dfe83701-3e1f-4e1d-8aeb-6fe81f53b653'],
|
|
342
|
+
};
|
|
296
343
|
export const MOCK_SESSION_EVENT = {
|
|
297
344
|
id: 'id',
|
|
298
345
|
data: {
|
|
@@ -305,3 +352,15 @@ export const MOCK_SESSION_EVENT = {
|
|
|
305
352
|
timestamp: 12345,
|
|
306
353
|
trackingId: 'tracking-id',
|
|
307
354
|
};
|
|
355
|
+
export const MOCK_SESSION_EVENT_LEGACY = {
|
|
356
|
+
id: 'id',
|
|
357
|
+
data: {
|
|
358
|
+
userSessions: {
|
|
359
|
+
userSessions: [SPARK_CALL_SESSION],
|
|
360
|
+
statusCode: 0,
|
|
361
|
+
},
|
|
362
|
+
eventType: MOBIUS_EVENT_KEYS.CALL_SESSION_EVENT_LEGACY,
|
|
363
|
+
},
|
|
364
|
+
timestamp: 12345,
|
|
365
|
+
trackingId: 'tracking-id',
|
|
366
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { FAILURE_MESSAGE, STATUS_CODE, SUCCESS_MESSAGE, UCM_CONNECTOR_FILE, VOICEMAIL, } from '../common/constants';
|
|
2
|
-
import SDKConnector from '../SDKConnector';
|
|
3
1
|
import log from '../Logger';
|
|
2
|
+
import SDKConnector from '../SDKConnector';
|
|
3
|
+
import { serviceErrorCodeHandler } from '../common/Utils';
|
|
4
|
+
import { FAILURE_MESSAGE, STATUS_CODE, SUCCESS_MESSAGE, UCM_CONNECTOR_FILE, VOICEMAIL, } from '../common/constants';
|
|
4
5
|
import { HTTP_METHODS } from '../common/types';
|
|
5
6
|
import { CF_ENDPOINT, ORG_ENDPOINT, PEOPLE_ENDPOINT, WEBEX_APIS_INT_URL, WEBEX_APIS_PROD_URL, } from './constants';
|
|
6
|
-
import { serviceErrorCodeHandler } from '../common/Utils';
|
|
7
7
|
export class UcmBackendConnector {
|
|
8
8
|
sdkConnector;
|
|
9
9
|
webex;
|
|
@@ -59,7 +59,7 @@ export class UcmBackendConnector {
|
|
|
59
59
|
method: HTTP_METHODS.GET,
|
|
60
60
|
});
|
|
61
61
|
const { callForwarding } = resp.body;
|
|
62
|
-
const cfa = callForwarding.always.find((item) => item.dn.endsWith(directoryNumber));
|
|
62
|
+
const cfa = callForwarding.always.find((item) => item.dn.endsWith(directoryNumber) || item.e164Number.endsWith(directoryNumber));
|
|
63
63
|
if (cfa) {
|
|
64
64
|
const response = {
|
|
65
65
|
statusCode: Number(resp[STATUS_CODE]),
|
|
@@ -5,12 +5,11 @@ import { LOGGER } from '../Logger/types';
|
|
|
5
5
|
import SDKConnector from '../SDKConnector';
|
|
6
6
|
import { Eventing } from '../Events/impl';
|
|
7
7
|
import { MOBIUS_EVENT_KEYS, SessionType, CALLING_CLIENT_EVENT_KEYS, } from '../Events/types';
|
|
8
|
-
import { ServiceIndicator, ALLOWED_SERVICES, HTTP_METHODS, } from '../common/types';
|
|
8
|
+
import { ServiceIndicator, ALLOWED_SERVICES, HTTP_METHODS, RegistrationStatus, } from '../common/types';
|
|
9
9
|
import log from '../Logger';
|
|
10
10
|
import { getCallManager } from './calling/callManager';
|
|
11
|
-
import { CALLING_CLIENT_FILE, CALLS_CLEARED_HANDLER_UTIL, CALLING_USER_AGENT, CISCO_DEVICE_URL, DISCOVERY_URL, GET_MOBIUS_SERVERS_UTIL, IP_ENDPOINT, SPARK_USER_AGENT, URL_ENDPOINT, NETWORK_FLAP_TIMEOUT, } from './constants';
|
|
11
|
+
import { CALLING_CLIENT_FILE, CALLS_CLEARED_HANDLER_UTIL, CALLING_USER_AGENT, CISCO_DEVICE_URL, DISCOVERY_URL, GET_MOBIUS_SERVERS_UTIL, IP_ENDPOINT, SPARK_USER_AGENT, URL_ENDPOINT, NETWORK_FLAP_TIMEOUT, API_V1, MOBIUS_US_PROD, MOBIUS_EU_PROD, MOBIUS_US_INT, MOBIUS_EU_INT, } from './constants';
|
|
12
12
|
import Line from './line';
|
|
13
|
-
import { LINE_EVENTS, LineStatus } from './line/types';
|
|
14
13
|
import { METRIC_EVENT, REG_ACTION, METRIC_TYPE } from '../Metrics/types';
|
|
15
14
|
import { getMetricManager } from '../Metrics';
|
|
16
15
|
export class CallingClient extends Eventing {
|
|
@@ -22,6 +21,8 @@ export class CallingClient extends Eventing {
|
|
|
22
21
|
sdkConfig;
|
|
23
22
|
primaryMobiusUris;
|
|
24
23
|
backupMobiusUris;
|
|
24
|
+
mobiusClusters;
|
|
25
|
+
mobiusHost;
|
|
25
26
|
mediaEngine;
|
|
26
27
|
lineDict = {};
|
|
27
28
|
constructor(webex, config) {
|
|
@@ -43,6 +44,12 @@ export class CallingClient extends Eventing {
|
|
|
43
44
|
this.mediaEngine = Media;
|
|
44
45
|
this.primaryMobiusUris = [];
|
|
45
46
|
this.backupMobiusUris = [];
|
|
47
|
+
this.mobiusClusters =
|
|
48
|
+
this.webex.internal.services._hostCatalog[MOBIUS_US_PROD] ||
|
|
49
|
+
this.webex.internal.services._hostCatalog[MOBIUS_EU_PROD] ||
|
|
50
|
+
this.webex.internal.services._hostCatalog[MOBIUS_US_INT] ||
|
|
51
|
+
this.webex.internal.services._hostCatalog[MOBIUS_EU_INT];
|
|
52
|
+
this.mobiusHost = '';
|
|
46
53
|
this.registerSessionsListener();
|
|
47
54
|
log.setLogger(logLevel, CALLING_CLIENT_FILE);
|
|
48
55
|
this.registerCallsClearedListener();
|
|
@@ -63,47 +70,57 @@ export class CallingClient extends Eventing {
|
|
|
63
70
|
file: CALLING_CLIENT_FILE,
|
|
64
71
|
method: this.detectNetworkChange.name,
|
|
65
72
|
});
|
|
66
|
-
line.lineEmitter(LINE_EVENTS.UNREGISTERED);
|
|
67
73
|
line.registration.clearKeepaliveTimer();
|
|
68
74
|
retry = true;
|
|
69
75
|
}
|
|
70
76
|
if (retry && this.webex.internal.mercury.connected) {
|
|
71
|
-
|
|
77
|
+
if (line.getStatus() !== RegistrationStatus.IDLE) {
|
|
78
|
+
retry = await line.registration.handleConnectionRestoration(retry);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
retry = false;
|
|
82
|
+
}
|
|
72
83
|
}
|
|
73
84
|
}, NETWORK_FLAP_TIMEOUT);
|
|
74
85
|
}
|
|
75
86
|
async getClientRegionInfo() {
|
|
76
87
|
const regionInfo = {};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
88
|
+
for (const mobius of this.mobiusClusters) {
|
|
89
|
+
this.mobiusHost = `https://${mobius.host}${API_V1}`;
|
|
90
|
+
try {
|
|
91
|
+
const temp = await this.webex.request({
|
|
92
|
+
uri: `${this.mobiusHost}${URL_ENDPOINT}${IP_ENDPOINT}`,
|
|
93
|
+
method: HTTP_METHODS.GET,
|
|
94
|
+
headers: {
|
|
95
|
+
[CISCO_DEVICE_URL]: this.webex.internal.device.url,
|
|
96
|
+
[SPARK_USER_AGENT]: CALLING_USER_AGENT,
|
|
97
|
+
},
|
|
98
|
+
service: ALLOWED_SERVICES.MOBIUS,
|
|
99
|
+
});
|
|
100
|
+
const myIP = temp.body.ipv4;
|
|
101
|
+
const response = await this.webex.request({
|
|
102
|
+
uri: `${DISCOVERY_URL}/${myIP}`,
|
|
103
|
+
method: HTTP_METHODS.GET,
|
|
104
|
+
addAuthHeader: false,
|
|
105
|
+
headers: {
|
|
106
|
+
[SPARK_USER_AGENT]: null,
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
const clientRegionInfo = response.body;
|
|
110
|
+
regionInfo.clientRegion = clientRegionInfo?.clientRegion
|
|
111
|
+
? clientRegionInfo.clientRegion
|
|
112
|
+
: '';
|
|
113
|
+
regionInfo.countryCode = clientRegionInfo?.countryCode ? clientRegionInfo.countryCode : '';
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
catch (err) {
|
|
117
|
+
handleCallingClientErrors(err, (clientError) => {
|
|
118
|
+
this.metricManager.submitRegistrationMetric(METRIC_EVENT.REGISTRATION_ERROR, REG_ACTION.REGISTER, METRIC_TYPE.BEHAVIORAL, clientError);
|
|
119
|
+
this.emit(CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
|
|
120
|
+
}, { method: GET_MOBIUS_SERVERS_UTIL, file: CALLING_CLIENT_FILE });
|
|
121
|
+
regionInfo.clientRegion = '';
|
|
122
|
+
regionInfo.countryCode = '';
|
|
123
|
+
}
|
|
107
124
|
}
|
|
108
125
|
return regionInfo;
|
|
109
126
|
}
|
|
@@ -118,6 +135,7 @@ export class CallingClient extends Eventing {
|
|
|
118
135
|
});
|
|
119
136
|
clientRegion = this.sdkConfig?.discovery?.region;
|
|
120
137
|
countryCode = this.sdkConfig?.discovery?.country;
|
|
138
|
+
this.mobiusHost = this.webex.internal.services._serviceUrls.mobius;
|
|
121
139
|
}
|
|
122
140
|
else {
|
|
123
141
|
log.info('Updating region and country through Region discovery', {
|
|
@@ -132,7 +150,7 @@ export class CallingClient extends Eventing {
|
|
|
132
150
|
log.log(`Found Region: ${clientRegion} and country: ${countryCode}, going to fetch Mobius server`, '');
|
|
133
151
|
try {
|
|
134
152
|
const temp = await this.webex.request({
|
|
135
|
-
uri: `${this.
|
|
153
|
+
uri: `${this.mobiusHost}${URL_ENDPOINT}?regionCode=${clientRegion}&countryCode=${countryCode}`,
|
|
136
154
|
method: HTTP_METHODS.GET,
|
|
137
155
|
headers: {
|
|
138
156
|
[CISCO_DEVICE_URL]: this.webex.internal.device.url,
|
|
@@ -142,7 +160,7 @@ export class CallingClient extends Eventing {
|
|
|
142
160
|
});
|
|
143
161
|
log.log('Mobius Server found for the region', '');
|
|
144
162
|
const mobiusServers = temp.body;
|
|
145
|
-
const mobiusUris = filterMobiusUris(mobiusServers, this.
|
|
163
|
+
const mobiusUris = filterMobiusUris(mobiusServers, this.mobiusHost);
|
|
146
164
|
this.primaryMobiusUris = mobiusUris.primary;
|
|
147
165
|
this.backupMobiusUris = mobiusUris.backup;
|
|
148
166
|
log.info(`Final list of Mobius Servers, primary: ${mobiusUris.primary} and backup: ${mobiusUris.backup}`, '');
|
|
@@ -159,10 +177,9 @@ export class CallingClient extends Eventing {
|
|
|
159
177
|
useDefault = true;
|
|
160
178
|
}
|
|
161
179
|
if (useDefault) {
|
|
162
|
-
log.warn('
|
|
163
|
-
this.
|
|
164
|
-
|
|
165
|
-
];
|
|
180
|
+
log.warn(`Couldn't resolve the region and country code. Defaulting to the catalog entries to discover mobius servers`, '');
|
|
181
|
+
this.mobiusHost = `https://${this.mobiusClusters[0].host}${API_V1}`;
|
|
182
|
+
this.primaryMobiusUris = [`${this.mobiusHost}${URL_ENDPOINT}`];
|
|
166
183
|
}
|
|
167
184
|
}
|
|
168
185
|
registerCallsClearedListener() {
|
|
@@ -212,7 +229,7 @@ export class CallingClient extends Eventing {
|
|
|
212
229
|
});
|
|
213
230
|
}
|
|
214
231
|
async createLine() {
|
|
215
|
-
const line = new Line(this.webex.internal.device.userId, this.webex.internal.device.url,
|
|
232
|
+
const line = new Line(this.webex.internal.device.userId, this.webex.internal.device.url, this.mutex, this.primaryMobiusUris, this.backupMobiusUris, this.getLoggingLevel(), this.sdkConfig?.serviceData);
|
|
216
233
|
this.lineDict[line.lineId] = line;
|
|
217
234
|
}
|
|
218
235
|
getLines() {
|
|
@@ -79,10 +79,6 @@ export class CallerId {
|
|
|
79
79
|
const num = data.substring(data.indexOf(':') + 1, data.length);
|
|
80
80
|
if (nameMatch) {
|
|
81
81
|
result.name = nameMatch[0].trimEnd();
|
|
82
|
-
log.info(`Parsed Name: ${result.name}`, {
|
|
83
|
-
file: CALLER_ID_FILE,
|
|
84
|
-
method: 'parseSipUri',
|
|
85
|
-
});
|
|
86
82
|
}
|
|
87
83
|
else {
|
|
88
84
|
log.warn(`Name field not found!`, {
|
|
@@ -93,10 +89,6 @@ export class CallerId {
|
|
|
93
89
|
const phoneMatch = num.match(VALID_PHONE);
|
|
94
90
|
if (phoneMatch && phoneMatch[0].length === num.length) {
|
|
95
91
|
result.num = num;
|
|
96
|
-
log.info(`Parsed Number: ${result.num}`, {
|
|
97
|
-
file: CALLER_ID_FILE,
|
|
98
|
-
method: 'parseSipUri',
|
|
99
|
-
});
|
|
100
92
|
}
|
|
101
93
|
else {
|
|
102
94
|
log.warn(`Number field not found!`, {
|
|
@@ -112,28 +104,20 @@ export class CallerId {
|
|
|
112
104
|
this.callerInfo.name = undefined;
|
|
113
105
|
this.callerInfo.num = undefined;
|
|
114
106
|
if ('p-asserted-identity' in callerId) {
|
|
115
|
-
log.info(
|
|
107
|
+
log.info('Parsing p-asserted-identity within remote party information', {
|
|
116
108
|
file: CALLER_ID_FILE,
|
|
117
109
|
method: 'fetchCallerDetails',
|
|
118
110
|
});
|
|
119
111
|
const result = this.parseSipUri(callerId['p-asserted-identity']);
|
|
120
112
|
this.callerInfo.name = result.name;
|
|
121
113
|
this.callerInfo.num = result.num;
|
|
122
|
-
log.info(`CallerId retrieved from p-asserted-identity: name: ${this.callerInfo.name} , num: ${this.callerInfo.num}`, {
|
|
123
|
-
file: CALLER_ID_FILE,
|
|
124
|
-
method: 'fetchCallerDetails',
|
|
125
|
-
});
|
|
126
114
|
}
|
|
127
115
|
if (callerId.from) {
|
|
128
|
-
log.info(
|
|
116
|
+
log.info('Parsing from header within the remote party information', {
|
|
129
117
|
file: CALLER_ID_FILE,
|
|
130
118
|
method: 'fetchCallerDetails',
|
|
131
119
|
});
|
|
132
120
|
const result = this.parseSipUri(callerId.from);
|
|
133
|
-
log.info(`CallerId retrieved from FROM: name: ${result.name} , num: ${result.num}`, {
|
|
134
|
-
file: CALLER_ID_FILE,
|
|
135
|
-
method: 'fetchCallerDetails',
|
|
136
|
-
});
|
|
137
121
|
if (!this.callerInfo.name && result.name) {
|
|
138
122
|
log.info('Updating name field from From header', {
|
|
139
123
|
file: CALLER_ID_FILE,
|
|
@@ -153,16 +137,12 @@ export class CallerId {
|
|
|
153
137
|
this.emitter(this.callerInfo);
|
|
154
138
|
}
|
|
155
139
|
if ('x-broadworks-remote-party-info' in callerId) {
|
|
156
|
-
log.info(
|
|
140
|
+
log.info('Parsing x-broadworks-remote-party-info within remote party information', {
|
|
157
141
|
file: CALLER_ID_FILE,
|
|
158
142
|
method: 'fetchCallerDetails',
|
|
159
143
|
});
|
|
160
144
|
this.parseRemotePartyInfo(callerId['x-broadworks-remote-party-info']);
|
|
161
145
|
}
|
|
162
|
-
log.log(`Intermediate callerId :- name: ${this.callerInfo.name} , num: ${this.callerInfo.num}`, {
|
|
163
|
-
file: CALLER_ID_FILE,
|
|
164
|
-
method: 'fetchCallerDetails',
|
|
165
|
-
});
|
|
166
146
|
return this.callerInfo;
|
|
167
147
|
}
|
|
168
148
|
}
|