@webex/calling 3.0.0-next.5 → 3.0.0-next.51

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.
Files changed (246) hide show
  1. package/dist/CallHistory/CallHistory.js +201 -0
  2. package/dist/CallHistory/CallHistory.js.map +1 -0
  3. package/dist/CallHistory/CallHistory.test.js +142 -0
  4. package/dist/CallHistory/CallHistory.test.js.map +1 -0
  5. package/dist/CallHistory/callHistoryFixtures.js +366 -0
  6. package/dist/CallHistory/callHistoryFixtures.js.map +1 -0
  7. package/dist/CallHistory/constants.js +17 -0
  8. package/dist/CallHistory/constants.js.map +1 -0
  9. package/dist/CallHistory/types.js +7 -0
  10. package/dist/CallHistory/types.js.map +1 -0
  11. package/dist/CallSettings/CallSettings.js +279 -0
  12. package/dist/CallSettings/CallSettings.js.map +1 -0
  13. package/dist/CallSettings/CallSettings.test.js +122 -0
  14. package/dist/CallSettings/CallSettings.test.js.map +1 -0
  15. package/dist/CallSettings/UcmBackendConnector.js +216 -0
  16. package/dist/CallSettings/UcmBackendConnector.js.map +1 -0
  17. package/dist/CallSettings/UcmBackendConnector.test.js +259 -0
  18. package/dist/CallSettings/UcmBackendConnector.test.js.map +1 -0
  19. package/dist/CallSettings/WxCallBackendConnector.js +547 -0
  20. package/dist/CallSettings/WxCallBackendConnector.js.map +1 -0
  21. package/dist/CallSettings/WxCallBackendConnector.test.js +802 -0
  22. package/dist/CallSettings/WxCallBackendConnector.test.js.map +1 -0
  23. package/dist/CallSettings/constants.js +19 -0
  24. package/dist/CallSettings/constants.js.map +1 -0
  25. package/dist/CallSettings/testFixtures.js +68 -0
  26. package/dist/CallSettings/testFixtures.js.map +1 -0
  27. package/dist/CallSettings/types.js +7 -0
  28. package/dist/CallSettings/types.js.map +1 -0
  29. package/dist/CallingClient/CallingClient.js +631 -0
  30. package/dist/CallingClient/CallingClient.js.map +1 -0
  31. package/dist/CallingClient/CallingClient.test.js +992 -0
  32. package/dist/CallingClient/CallingClient.test.js.map +1 -0
  33. package/dist/CallingClient/callRecordFixtures.js +101 -0
  34. package/dist/CallingClient/callRecordFixtures.js.map +1 -0
  35. package/dist/CallingClient/calling/CallerId/index.js +267 -0
  36. package/dist/CallingClient/calling/CallerId/index.js.map +1 -0
  37. package/dist/CallingClient/calling/CallerId/index.test.js +274 -0
  38. package/dist/CallingClient/calling/CallerId/index.test.js.map +1 -0
  39. package/dist/CallingClient/calling/CallerId/types.js +7 -0
  40. package/dist/CallingClient/calling/CallerId/types.js.map +1 -0
  41. package/dist/CallingClient/calling/call.js +3055 -0
  42. package/dist/CallingClient/calling/call.js.map +1 -0
  43. package/dist/CallingClient/calling/call.test.js +2858 -0
  44. package/dist/CallingClient/calling/call.test.js.map +1 -0
  45. package/dist/CallingClient/calling/callManager.js +432 -0
  46. package/dist/CallingClient/calling/callManager.js.map +1 -0
  47. package/dist/CallingClient/calling/callManager.test.js +683 -0
  48. package/dist/CallingClient/calling/callManager.test.js.map +1 -0
  49. package/dist/CallingClient/calling/index.js +30 -0
  50. package/dist/CallingClient/calling/index.js.map +1 -0
  51. package/dist/CallingClient/calling/types.js +69 -0
  52. package/dist/CallingClient/calling/types.js.map +1 -0
  53. package/dist/CallingClient/callingClientFixtures.js +143 -0
  54. package/dist/CallingClient/callingClientFixtures.js.map +1 -0
  55. package/dist/CallingClient/constants.js +134 -0
  56. package/dist/CallingClient/constants.js.map +1 -0
  57. package/dist/CallingClient/line/index.js +314 -0
  58. package/dist/CallingClient/line/index.js.map +1 -0
  59. package/dist/CallingClient/line/line.test.js +270 -0
  60. package/dist/CallingClient/line/line.test.js.map +1 -0
  61. package/dist/CallingClient/line/types.js +21 -0
  62. package/dist/CallingClient/line/types.js.map +1 -0
  63. package/dist/CallingClient/registration/index.js +19 -0
  64. package/dist/CallingClient/registration/index.js.map +1 -0
  65. package/dist/CallingClient/registration/register.js +1286 -0
  66. package/dist/CallingClient/registration/register.js.map +1 -0
  67. package/dist/CallingClient/registration/register.test.js +839 -0
  68. package/dist/CallingClient/registration/register.test.js.map +1 -0
  69. package/dist/CallingClient/registration/registerFixtures.js +36 -0
  70. package/dist/CallingClient/registration/registerFixtures.js.map +1 -0
  71. package/dist/CallingClient/registration/types.js +7 -0
  72. package/dist/CallingClient/registration/types.js.map +1 -0
  73. package/dist/CallingClient/types.js +7 -0
  74. package/dist/CallingClient/types.js.map +1 -0
  75. package/dist/Contacts/ContactsClient.js +1156 -0
  76. package/dist/Contacts/ContactsClient.js.map +1 -0
  77. package/dist/Contacts/ContactsClient.test.js +725 -0
  78. package/dist/Contacts/ContactsClient.test.js.map +1 -0
  79. package/dist/Contacts/constants.js +28 -0
  80. package/dist/Contacts/constants.js.map +1 -0
  81. package/dist/Contacts/contactFixtures.js +314 -0
  82. package/dist/Contacts/contactFixtures.js.map +1 -0
  83. package/dist/Contacts/types.js +43 -0
  84. package/dist/Contacts/types.js.map +1 -0
  85. package/dist/Errors/catalog/CallError.js +92 -0
  86. package/dist/Errors/catalog/CallError.js.map +1 -0
  87. package/dist/Errors/catalog/CallingDeviceError.js +86 -0
  88. package/dist/Errors/catalog/CallingDeviceError.js.map +1 -0
  89. package/dist/Errors/catalog/ExtendedError.js +44 -0
  90. package/dist/Errors/catalog/ExtendedError.js.map +1 -0
  91. package/dist/Errors/catalog/LineError.js +88 -0
  92. package/dist/Errors/catalog/LineError.js.map +1 -0
  93. package/dist/Errors/index.js +28 -0
  94. package/dist/Errors/index.js.map +1 -0
  95. package/dist/Errors/types.js +57 -0
  96. package/dist/Errors/types.js.map +1 -0
  97. package/dist/Events/impl/index.js +81 -0
  98. package/dist/Events/impl/index.js.map +1 -0
  99. package/dist/Events/types.js +103 -0
  100. package/dist/Events/types.js.map +1 -0
  101. package/dist/Logger/index.js +220 -0
  102. package/dist/Logger/index.js.map +1 -0
  103. package/dist/Logger/index.test.js +62 -0
  104. package/dist/Logger/index.test.js.map +1 -0
  105. package/dist/Logger/types.js +34 -0
  106. package/dist/Logger/types.js.map +1 -0
  107. package/dist/Metrics/index.js +327 -0
  108. package/dist/Metrics/index.js.map +1 -0
  109. package/dist/Metrics/index.test.js +291 -0
  110. package/dist/Metrics/index.test.js.map +1 -0
  111. package/dist/Metrics/types.js +45 -0
  112. package/dist/Metrics/types.js.map +1 -0
  113. package/dist/SDKConnector/index.js +104 -0
  114. package/dist/SDKConnector/index.js.map +1 -0
  115. package/dist/SDKConnector/index.test.js +9 -0
  116. package/dist/SDKConnector/index.test.js.map +1 -0
  117. package/dist/SDKConnector/types.js +7 -0
  118. package/dist/SDKConnector/types.js.map +1 -0
  119. package/dist/SDKConnector/utils.js +39 -0
  120. package/dist/SDKConnector/utils.js.map +1 -0
  121. package/dist/SDKConnector/utils.test.js +9 -0
  122. package/dist/SDKConnector/utils.test.js.map +1 -0
  123. package/dist/Voicemail/BroadworksBackendConnector.js +641 -0
  124. package/dist/Voicemail/BroadworksBackendConnector.js.map +1 -0
  125. package/dist/Voicemail/BroadworksBackendConnector.test.js +733 -0
  126. package/dist/Voicemail/BroadworksBackendConnector.test.js.map +1 -0
  127. package/dist/Voicemail/UcmBackendConnector.js +574 -0
  128. package/dist/Voicemail/UcmBackendConnector.js.map +1 -0
  129. package/dist/Voicemail/UcmBackendConnector.test.js +629 -0
  130. package/dist/Voicemail/UcmBackendConnector.test.js.map +1 -0
  131. package/dist/Voicemail/Voicemail.js +380 -0
  132. package/dist/Voicemail/Voicemail.js.map +1 -0
  133. package/dist/Voicemail/Voicemail.test.js +226 -0
  134. package/dist/Voicemail/Voicemail.test.js.map +1 -0
  135. package/dist/Voicemail/WxCallBackendConnector.js +547 -0
  136. package/dist/Voicemail/WxCallBackendConnector.js.map +1 -0
  137. package/dist/Voicemail/WxCallBackendConnector.test.js +942 -0
  138. package/dist/Voicemail/WxCallBackendConnector.test.js.map +1 -0
  139. package/dist/Voicemail/constants.js +37 -0
  140. package/dist/Voicemail/constants.js.map +1 -0
  141. package/dist/Voicemail/types.js +7 -0
  142. package/dist/Voicemail/types.js.map +1 -0
  143. package/dist/Voicemail/voicemailFixture.js +524 -0
  144. package/dist/Voicemail/voicemailFixture.js.map +1 -0
  145. package/dist/api.js +157 -0
  146. package/dist/api.js.map +1 -0
  147. package/dist/common/Utils.js +1257 -0
  148. package/dist/common/Utils.js.map +1 -0
  149. package/dist/common/Utils.test.js +1227 -0
  150. package/dist/common/Utils.test.js.map +1 -0
  151. package/dist/common/constants.js +49 -0
  152. package/dist/common/constants.js.map +1 -0
  153. package/dist/common/index.js +19 -0
  154. package/dist/common/index.js.map +1 -0
  155. package/dist/common/testUtil.js +959 -0
  156. package/dist/common/testUtil.js.map +1 -0
  157. package/dist/common/types.js +66 -0
  158. package/dist/common/types.js.map +1 -0
  159. package/dist/index.js +309 -0
  160. package/dist/index.js.map +1 -0
  161. package/dist/module/CallHistory/CallHistory.js +7 -5
  162. package/dist/module/CallHistory/callHistoryFixtures.js +59 -0
  163. package/dist/module/CallSettings/UcmBackendConnector.js +4 -4
  164. package/dist/module/CallingClient/CallingClient.js +59 -42
  165. package/dist/module/CallingClient/calling/CallerId/index.js +3 -23
  166. package/dist/module/CallingClient/calling/call.js +69 -26
  167. package/dist/module/CallingClient/calling/callManager.js +0 -6
  168. package/dist/module/CallingClient/callingClientFixtures.js +119 -1
  169. package/dist/module/CallingClient/constants.js +8 -4
  170. package/dist/module/CallingClient/line/index.js +9 -12
  171. package/dist/module/CallingClient/line/types.js +0 -5
  172. package/dist/module/CallingClient/registration/register.js +28 -20
  173. package/dist/module/Contacts/ContactsClient.js +3 -0
  174. package/dist/module/Errors/catalog/CallingDeviceError.js +2 -2
  175. package/dist/module/Errors/catalog/LineError.js +2 -2
  176. package/dist/module/Errors/index.js +1 -0
  177. package/dist/module/Events/types.js +2 -0
  178. package/dist/module/api.js +6 -5
  179. package/dist/module/common/Utils.js +14 -19
  180. package/dist/module/common/testUtil.js +2 -1
  181. package/dist/module/common/types.js +6 -5
  182. package/dist/module/index.js +9 -0
  183. package/dist/types/CallHistory/CallHistory.d.ts +2 -1
  184. package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
  185. package/dist/types/CallHistory/callHistoryFixtures.d.ts +1 -0
  186. package/dist/types/CallHistory/callHistoryFixtures.d.ts.map +1 -1
  187. package/dist/types/CallSettings/CallSettings.d.ts.map +1 -1
  188. package/dist/types/CallSettings/UcmBackendConnector.d.ts +1 -1
  189. package/dist/types/CallSettings/UcmBackendConnector.d.ts.map +1 -1
  190. package/dist/types/CallSettings/types.d.ts +1 -0
  191. package/dist/types/CallSettings/types.d.ts.map +1 -1
  192. package/dist/types/CallingClient/CallingClient.d.ts +2 -0
  193. package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
  194. package/dist/types/CallingClient/calling/CallerId/index.d.ts.map +1 -1
  195. package/dist/types/CallingClient/calling/CallerId/types.d.ts.map +1 -1
  196. package/dist/types/CallingClient/calling/call.d.ts +2 -0
  197. package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
  198. package/dist/types/CallingClient/calling/callManager.d.ts +0 -1
  199. package/dist/types/CallingClient/calling/callManager.d.ts.map +1 -1
  200. package/dist/types/CallingClient/calling/types.d.ts +30 -30
  201. package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
  202. package/dist/types/CallingClient/callingClientFixtures.d.ts +69 -1
  203. package/dist/types/CallingClient/callingClientFixtures.d.ts.map +1 -1
  204. package/dist/types/CallingClient/constants.d.ts +7 -3
  205. package/dist/types/CallingClient/constants.d.ts.map +1 -1
  206. package/dist/types/CallingClient/line/index.d.ts +6 -6
  207. package/dist/types/CallingClient/line/index.d.ts.map +1 -1
  208. package/dist/types/CallingClient/line/types.d.ts +11 -23
  209. package/dist/types/CallingClient/line/types.d.ts.map +1 -1
  210. package/dist/types/CallingClient/registration/register.d.ts +3 -3
  211. package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
  212. package/dist/types/CallingClient/registration/types.d.ts +14 -14
  213. package/dist/types/CallingClient/registration/types.d.ts.map +1 -1
  214. package/dist/types/CallingClient/types.d.ts +6 -4
  215. package/dist/types/CallingClient/types.d.ts.map +1 -1
  216. package/dist/types/Contacts/ContactsClient.d.ts +3 -2
  217. package/dist/types/Contacts/ContactsClient.d.ts.map +1 -1
  218. package/dist/types/Contacts/types.d.ts +2 -0
  219. package/dist/types/Contacts/types.d.ts.map +1 -1
  220. package/dist/types/Errors/catalog/CallingDeviceError.d.ts +4 -4
  221. package/dist/types/Errors/catalog/CallingDeviceError.d.ts.map +1 -1
  222. package/dist/types/Errors/catalog/LineError.d.ts +4 -4
  223. package/dist/types/Errors/catalog/LineError.d.ts.map +1 -1
  224. package/dist/types/Errors/index.d.ts +1 -0
  225. package/dist/types/Errors/index.d.ts.map +1 -1
  226. package/dist/types/Errors/types.d.ts +2 -3
  227. package/dist/types/Errors/types.d.ts.map +1 -1
  228. package/dist/types/Events/types.d.ts +28 -5
  229. package/dist/types/Events/types.d.ts.map +1 -1
  230. package/dist/types/SDKConnector/types.d.ts +2 -1
  231. package/dist/types/SDKConnector/types.d.ts.map +1 -1
  232. package/dist/types/Voicemail/UcmBackendConnector.d.ts +1 -1
  233. package/dist/types/Voicemail/Voicemail.d.ts.map +1 -1
  234. package/dist/types/Voicemail/WxCallBackendConnector.d.ts +1 -1
  235. package/dist/types/Voicemail/types.d.ts +10 -10
  236. package/dist/types/Voicemail/types.d.ts.map +1 -1
  237. package/dist/types/api.d.ts +10 -10
  238. package/dist/types/api.d.ts.map +1 -1
  239. package/dist/types/common/Utils.d.ts.map +1 -1
  240. package/dist/types/common/testUtil.d.ts +1 -0
  241. package/dist/types/common/testUtil.d.ts.map +1 -1
  242. package/dist/types/common/types.d.ts +3 -2
  243. package/dist/types/common/types.d.ts.map +1 -1
  244. package/dist/types/index.d.ts +13 -0
  245. package/dist/types/index.d.ts.map +1 -1
  246. package/package.json +3 -3
@@ -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
- retry = await line.registration.handleConnectionRestoration(retry);
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
- try {
78
- const temp = await this.webex.request({
79
- uri: `${this.webex.internal.services._serviceUrls.mobius}${URL_ENDPOINT}${IP_ENDPOINT}`,
80
- method: HTTP_METHODS.GET,
81
- headers: {
82
- [CISCO_DEVICE_URL]: this.webex.internal.device.url,
83
- [SPARK_USER_AGENT]: CALLING_USER_AGENT,
84
- },
85
- service: ALLOWED_SERVICES.MOBIUS,
86
- });
87
- const myIP = temp.body.ipv4;
88
- const response = await this.webex.request({
89
- uri: `${DISCOVERY_URL}/${myIP}`,
90
- method: HTTP_METHODS.GET,
91
- addAuthHeader: false,
92
- headers: {
93
- [SPARK_USER_AGENT]: null,
94
- },
95
- });
96
- const clientRegionInfo = response.body;
97
- regionInfo.clientRegion = clientRegionInfo?.clientRegion ? clientRegionInfo.clientRegion : '';
98
- regionInfo.countryCode = clientRegionInfo?.countryCode ? clientRegionInfo.countryCode : '';
99
- }
100
- catch (err) {
101
- handleCallingClientErrors(err, (clientError) => {
102
- this.metricManager.submitRegistrationMetric(METRIC_EVENT.REGISTRATION_ERROR, REG_ACTION.REGISTER, METRIC_TYPE.BEHAVIORAL, clientError);
103
- this.emit(CALLING_CLIENT_EVENT_KEYS.ERROR, clientError);
104
- }, { method: GET_MOBIUS_SERVERS_UTIL, file: CALLING_CLIENT_FILE });
105
- regionInfo.clientRegion = '';
106
- regionInfo.countryCode = '';
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.webex.internal.services._serviceUrls.mobius}${URL_ENDPOINT}?regionCode=${clientRegion}&countryCode=${countryCode}`,
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.webex.internal.services._serviceUrls.mobius);
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('Error in finding Mobius Servers. Will use the default URL.', '');
163
- this.primaryMobiusUris = [
164
- `${this.webex.internal.services._serviceUrls.mobius}${URL_ENDPOINT}`,
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, LineStatus.INACTIVE, this.mutex, this.primaryMobiusUris, this.backupMobiusUris, this.getLoggingLevel(), this.sdkConfig?.serviceData);
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(`Parsing p-asserted-identity:- ${callerId['p-asserted-identity']}`, {
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(`Parsing from header:- ${callerId.from}`, {
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(`Parsing x-broadworks-remote-party-info:- ${callerId['x-broadworks-remote-party-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
  }
@@ -31,6 +31,7 @@ export class Call extends Eventing {
31
31
  mediaConnection;
32
32
  earlyMedia;
33
33
  connected;
34
+ mediaInactivity;
34
35
  callerInfo;
35
36
  localRoapMessage;
36
37
  mobiusUrl;
@@ -72,6 +73,7 @@ export class Call extends Eventing {
72
73
  this.correlationId = uuid();
73
74
  this.deleteCb = deleteCb;
74
75
  this.connected = false;
76
+ this.mediaInactivity = false;
75
77
  this.held = false;
76
78
  this.earlyMedia = false;
77
79
  this.callerInfo = {};
@@ -79,7 +81,7 @@ export class Call extends Eventing {
79
81
  this.mobiusUrl = activeUrl;
80
82
  this.receivedRoapOKSeq = 0;
81
83
  this.mediaNegotiationCompleted = false;
82
- log.info(`Mobius Url:- ${this.mobiusUrl}`, {
84
+ log.info(`Webex Calling Url:- ${this.mobiusUrl}`, {
83
85
  file: CALL_FILE,
84
86
  method: 'constructor',
85
87
  });
@@ -153,6 +155,10 @@ export class Call extends Eventing {
153
155
  target: 'S_RECV_CALL_PROGRESS',
154
156
  actions: ['incomingCallProgress'],
155
157
  },
158
+ E_RECV_CALL_CONNECT: {
159
+ target: 'S_RECV_CALL_CONNECT',
160
+ actions: ['incomingCallConnect'],
161
+ },
156
162
  E_RECV_CALL_DISCONNECT: {
157
163
  target: 'S_RECV_CALL_DISCONNECT',
158
164
  actions: ['incomingCallDisconnect'],
@@ -577,7 +583,7 @@ export class Call extends Eventing {
577
583
  this.setCallId(response.body.callId);
578
584
  }
579
585
  catch (e) {
580
- log.warn('Call setup failed with Mobius', {
586
+ log.warn('Failed to setup the call', {
581
587
  file: CALL_FILE,
582
588
  method: this.handleOutgoingCallSetup.name,
583
589
  });
@@ -614,7 +620,7 @@ export class Call extends Eventing {
614
620
  }
615
621
  }
616
622
  catch (e) {
617
- log.warn('Call Hold failed with Mobius', {
623
+ log.warn('Failed to put the call on hold', {
618
624
  file: CALL_FILE,
619
625
  method: this.handleCallHold.name,
620
626
  });
@@ -651,7 +657,7 @@ export class Call extends Eventing {
651
657
  }
652
658
  }
653
659
  catch (e) {
654
- log.warn('Call Resume failed with Mobius', {
660
+ log.warn('Failed to resume the call', {
655
661
  file: CALL_FILE,
656
662
  method: this.handleCallResume.name,
657
663
  });
@@ -735,7 +741,7 @@ export class Call extends Eventing {
735
741
  });
736
742
  }
737
743
  catch (err) {
738
- log.warn('Call Progress failed with Mobius', {
744
+ log.warn('Failed to signal call progression', {
739
745
  file: CALL_FILE,
740
746
  method: this.handleOutgoingCallAlerting.name,
741
747
  });
@@ -771,15 +777,15 @@ export class Call extends Eventing {
771
777
  return;
772
778
  }
773
779
  try {
780
+ this.mediaConnection.roapMessageReceived(this.remoteRoapMessage);
774
781
  const res = await this.patch(MobiusCallState.CONNECTED);
775
782
  log.log(`PATCH response: ${res.statusCode}`, {
776
783
  file: CALL_FILE,
777
784
  method: this.handleOutgoingCallConnect.name,
778
785
  });
779
- this.mediaConnection.roapMessageReceived(this.remoteRoapMessage);
780
786
  }
781
787
  catch (err) {
782
- log.warn('Call Connect failed with Mobius', {
788
+ log.warn('Failed to connect the call', {
783
789
  file: CALL_FILE,
784
790
  method: this.handleOutgoingCallConnect.name,
785
791
  });
@@ -805,7 +811,7 @@ export class Call extends Eventing {
805
811
  });
806
812
  }
807
813
  catch (e) {
808
- log.warn('Delete Call failed with Mobius', {
814
+ log.warn('Failed to delete the call', {
809
815
  file: CALL_FILE,
810
816
  method: this.handleIncomingCallDisconnect.name,
811
817
  });
@@ -832,7 +838,7 @@ export class Call extends Eventing {
832
838
  });
833
839
  }
834
840
  catch (e) {
835
- log.warn('Delete Call failed with Mobius', {
841
+ log.warn('Failed to delete the call', {
836
842
  file: CALL_FILE,
837
843
  method: this.handleOutgoingCallDisconnect.name,
838
844
  });
@@ -909,7 +915,7 @@ export class Call extends Eventing {
909
915
  });
910
916
  }
911
917
  catch (e) {
912
- log.warn('Delete Call failed with Mobius', {
918
+ log.warn('Failed to delete the call', {
913
919
  file: CALL_FILE,
914
920
  method: this.handleUnknownState.name,
915
921
  });
@@ -967,7 +973,8 @@ export class Call extends Eventing {
967
973
  method: 'handleRoapEstablished',
968
974
  });
969
975
  try {
970
- if (this.callStateMachine.state.value === 'S_RECV_CALL_PROGRESS') {
976
+ if (this.callStateMachine.state.value === 'S_RECV_CALL_PROGRESS' ||
977
+ this.callStateMachine.state.value === 'S_SEND_CALL_SETUP') {
971
978
  log.info('Media negotiation completed before call connect. Setting media negotiation completed flag.', {
972
979
  file: CALL_FILE,
973
980
  method: 'handleRoapEstablished',
@@ -985,7 +992,7 @@ export class Call extends Eventing {
985
992
  }
986
993
  }
987
994
  catch (err) {
988
- log.warn('MediaOk failed with Mobius', {
995
+ log.warn('Failed to process MediaOk request', {
989
996
  file: CALL_FILE,
990
997
  method: 'handleRoapEstablished',
991
998
  });
@@ -1039,7 +1046,7 @@ export class Call extends Eventing {
1039
1046
  });
1040
1047
  }
1041
1048
  catch (err) {
1042
- log.warn('Failed to communicate ROAP error with Mobius', {
1049
+ log.warn('Failed to communicate ROAP error to Webex Calling', {
1043
1050
  file: CALL_FILE,
1044
1051
  method: this.handleRoapError.name,
1045
1052
  });
@@ -1080,7 +1087,7 @@ export class Call extends Eventing {
1080
1087
  });
1081
1088
  }
1082
1089
  catch (err) {
1083
- log.warn('MediaOk failed with Mobius', {
1090
+ log.warn('Failed to process MediaOk request', {
1084
1091
  file: CALL_FILE,
1085
1092
  method: this.handleOutgoingRoapOffer.name,
1086
1093
  });
@@ -1109,7 +1116,7 @@ export class Call extends Eventing {
1109
1116
  });
1110
1117
  }
1111
1118
  catch (err) {
1112
- log.warn('MediaAnswer failed with Mobius', {
1119
+ log.warn('Failed to send MediaAnswer request', {
1113
1120
  file: CALL_FILE,
1114
1121
  method: this.handleOutgoingRoapAnswer.name,
1115
1122
  });
@@ -1206,7 +1213,11 @@ export class Call extends Eventing {
1206
1213
  });
1207
1214
  };
1208
1215
  setDisconnectReason() {
1209
- if (this.connected || this.direction === CallDirection.OUTBOUND) {
1216
+ if (this.mediaInactivity) {
1217
+ this.disconnectReason.code = DisconnectCode.MEDIA_INACTIVITY;
1218
+ this.disconnectReason.cause = DisconnectCause.MEDIA_INACTIVITY;
1219
+ }
1220
+ else if (this.connected || this.direction === CallDirection.OUTBOUND) {
1210
1221
  this.disconnectReason.code = DisconnectCode.NORMAL;
1211
1222
  this.disconnectReason.cause = DisconnectCause.NORMAL;
1212
1223
  }
@@ -1220,6 +1231,15 @@ export class Call extends Eventing {
1220
1231
  };
1221
1232
  async answer(localAudioStream) {
1222
1233
  const localAudioTrack = localAudioStream.outputStream.getAudioTracks()[0];
1234
+ if (!localAudioTrack) {
1235
+ log.warn(`Did not find a local track while answering the call ${this.getCorrelationId()}`, {
1236
+ file: CALL_FILE,
1237
+ method: 'answer',
1238
+ });
1239
+ this.mediaInactivity = true;
1240
+ this.sendCallStateMachineEvt({ type: 'E_SEND_CALL_DISCONNECT' });
1241
+ return;
1242
+ }
1223
1243
  localAudioTrack.enabled = true;
1224
1244
  if (!this.mediaConnection) {
1225
1245
  this.initMediaConnection(localAudioTrack);
@@ -1236,6 +1256,15 @@ export class Call extends Eventing {
1236
1256
  }
1237
1257
  async dial(localAudioStream) {
1238
1258
  const localAudioTrack = localAudioStream.outputStream.getAudioTracks()[0];
1259
+ if (!localAudioTrack) {
1260
+ log.warn(`Did not find a local track while dialing the call ${this.getCorrelationId()}`, {
1261
+ file: CALL_FILE,
1262
+ method: 'dial',
1263
+ });
1264
+ this.deleteCb(this.getCorrelationId());
1265
+ this.emit(CALL_EVENT_KEYS.DISCONNECT, this.getCorrelationId());
1266
+ return;
1267
+ }
1239
1268
  localAudioTrack.enabled = true;
1240
1269
  if (!this.mediaConnection) {
1241
1270
  this.initMediaConnection(localAudioTrack);
@@ -1276,7 +1305,7 @@ export class Call extends Eventing {
1276
1305
  });
1277
1306
  };
1278
1307
  async patch(state) {
1279
- log.info(`Send a PATCH for ${state} to mobius`, {
1308
+ log.info(`Send a PATCH for ${state} to Webex Calling`, {
1280
1309
  file: CALL_FILE,
1281
1310
  method: this.patch.name,
1282
1311
  });
@@ -1437,7 +1466,7 @@ export class Call extends Eventing {
1437
1466
  return parseMediaQualityStatistics(stats);
1438
1467
  }
1439
1468
  async postMedia(roapMessage) {
1440
- log.log('Posting message to mobius', {
1469
+ log.log('Posting message to Webex Calling', {
1441
1470
  file: CALL_FILE,
1442
1471
  method: this.postMedia.name,
1443
1472
  });
@@ -1621,18 +1650,19 @@ export class Call extends Eventing {
1621
1650
  this.callerInfo = this.callerId.fetchCallerDetails(callerInfo);
1622
1651
  }
1623
1652
  sendDigit(tone) {
1624
- if (!this.connected) {
1625
- log.warn(`Can't send DTMF as call is not yet connected`, {
1653
+ try {
1654
+ log.info(`Sending digit : ${tone}`, {
1655
+ file: CALL_FILE,
1656
+ method: 'sendDigit',
1657
+ });
1658
+ this.mediaConnection.insertDTMF(tone);
1659
+ }
1660
+ catch (e) {
1661
+ log.warn(`Unable to send digit on call: ${e.message}`, {
1626
1662
  file: CALL_FILE,
1627
1663
  method: 'sendDigit',
1628
1664
  });
1629
- return;
1630
1665
  }
1631
- log.info(`Sending digit : ${tone}`, {
1632
- file: CALL_FILE,
1633
- method: 'sendDigit',
1634
- });
1635
- this.mediaConnection.insertDTMF(tone);
1636
1666
  }
1637
1667
  mute = (localAudioStream) => {
1638
1668
  const localAudioTrack = localAudioStream.outputStream.getAudioTracks()[0];
@@ -1645,6 +1675,19 @@ export class Call extends Eventing {
1645
1675
  this.muted = true;
1646
1676
  }
1647
1677
  };
1678
+ updateMedia = (newAudioStream) => {
1679
+ const localAudioTrack = newAudioStream.outputStream.getAudioTracks()[0];
1680
+ if (!localAudioTrack) {
1681
+ log.warn(`Did not find a local track while updating media for call ${this.getCorrelationId()}. Will not update media`, {
1682
+ file: CALL_FILE,
1683
+ method: 'updateMedia',
1684
+ });
1685
+ return;
1686
+ }
1687
+ this.mediaConnection.updateLocalTracks({
1688
+ audio: localAudioTrack,
1689
+ });
1690
+ };
1648
1691
  setBroadworksCorrelationInfo(broadworksCorrelationInfo) {
1649
1692
  this.broadworksCorrelationInfo = broadworksCorrelationInfo;
1650
1693
  }
@@ -257,12 +257,6 @@ export class CallManager extends Eventing {
257
257
  }
258
258
  }
259
259
  }
260
- endCall = (correlationId) => {
261
- const call = this.getCall(correlationId);
262
- if (call) {
263
- call.end();
264
- }
265
- };
266
260
  getCall = (correlationId) => {
267
261
  return this.callCollection[correlationId];
268
262
  };
@@ -35,4 +35,122 @@ const registrationPayload = {
35
35
  };
36
36
  const uri = `${webex.internal.services._serviceUrls.mobius}${URL_ENDPOINT}`;
37
37
  const myIP = mockIPReturnBody.ipv4;
38
- export { ipPayload, regionBody, regionPayload, primaryUrl, discoveryPayload, registrationPayload, uri, myIP, };
38
+ const mockUSServiceHosts = [
39
+ {
40
+ host: 'mobius-us-east-1.prod.infra.webex.com',
41
+ ttl: -1,
42
+ priority: 5,
43
+ id: 'urn:TEAM:us-east-2_a:mobius',
44
+ },
45
+ {
46
+ host: 'mobius-ca-central-1.prod.infra.webex.com',
47
+ ttl: -1,
48
+ priority: 10,
49
+ id: 'urn:TEAM:us-east-2_a:mobius',
50
+ },
51
+ {
52
+ host: 'mobius-eu-central-1.prod.infra.webex.com',
53
+ ttl: -1,
54
+ priority: 15,
55
+ id: 'urn:TEAM:us-east-2_a:mobius',
56
+ },
57
+ {
58
+ host: 'mobius-ap-southeast-2.prod.infra.webex.com',
59
+ ttl: -1,
60
+ priority: 20,
61
+ id: 'urn:TEAM:us-east-2_a:mobius',
62
+ },
63
+ ];
64
+ const mockEUServiceHosts = [
65
+ {
66
+ host: 'mobius-eu-central-1.prod.infra.webex.com',
67
+ ttl: -1,
68
+ priority: 5,
69
+ id: 'urn:TEAM:eu-central-1_k:mobius',
70
+ },
71
+ {
72
+ host: 'mobius-us-east-1.prod.infra.webex.com',
73
+ ttl: -1,
74
+ priority: 15,
75
+ id: 'urn:TEAM:eu-central-1_k:mobius',
76
+ },
77
+ {
78
+ host: 'mobius-ca-central-1.prod.infra.webex.com',
79
+ ttl: -1,
80
+ priority: 10,
81
+ id: 'urn:TEAM:eu-central-1_k:mobius',
82
+ },
83
+ {
84
+ host: 'mobius-ap-southeast-2.prod.infra.webex.com',
85
+ ttl: -1,
86
+ priority: 20,
87
+ id: 'urn:TEAM:eu-central-1_k:mobius',
88
+ },
89
+ ];
90
+ const mockEUIntServiceHosts = [
91
+ {
92
+ host: 'mobius-eu-central-1.int.infra.webex.com',
93
+ ttl: -1,
94
+ priority: 15,
95
+ id: 'urn:TEAM:us-east-2_a:mobius',
96
+ },
97
+ {
98
+ host: 'mobius-us-east-1.int.infra.webex.com',
99
+ ttl: -1,
100
+ priority: 5,
101
+ id: 'urn:TEAM:us-east-2_a:mobius',
102
+ },
103
+ {
104
+ host: 'mobius-ca-central-1.int.infra.webex.com',
105
+ ttl: -1,
106
+ priority: 10,
107
+ id: 'urn:TEAM:us-east-2_a:mobius',
108
+ },
109
+ {
110
+ host: 'mobius-ap-southeast-2.int.infra.webex.com',
111
+ ttl: -1,
112
+ priority: 20,
113
+ id: 'urn:TEAM:us-east-2_a:mobius',
114
+ },
115
+ ];
116
+ const mockIntServiceHosts = [
117
+ {
118
+ host: 'mobius-us-east-1.int.infra.webex.com',
119
+ ttl: -1,
120
+ priority: 5,
121
+ id: 'urn:TEAM:us-east-2_a:mobius',
122
+ },
123
+ {
124
+ host: 'mobius-ca-central-1.int.infra.webex.com',
125
+ ttl: -1,
126
+ priority: 10,
127
+ id: 'urn:TEAM:us-east-2_a:mobius',
128
+ },
129
+ {
130
+ host: 'mobius-eu-central-1.int.infra.webex.com',
131
+ ttl: -1,
132
+ priority: 15,
133
+ id: 'urn:TEAM:us-east-2_a:mobius',
134
+ },
135
+ {
136
+ host: 'mobius-ap-southeast-2.int.infra.webex.com',
137
+ ttl: -1,
138
+ priority: 20,
139
+ id: 'urn:TEAM:us-east-2_a:mobius',
140
+ },
141
+ ];
142
+ const mockCatalogEU = {
143
+ 'mobius-eu-central-1.prod.infra.webex.com': mockEUServiceHosts,
144
+ };
145
+ const mockCatalogEUInt = {
146
+ 'mobius-eu-central-1.int.infra.webex.com': mockEUIntServiceHosts,
147
+ };
148
+ const mockCatalogUS = {
149
+ 'mobius-us-east-1.prod.infra.webex.com': mockUSServiceHosts,
150
+ 'mobius-eu-central-1.prod.infra.webex.com': mockEUServiceHosts,
151
+ };
152
+ const mockCatalogUSInt = {
153
+ 'mobius-us-east-1.int.infra.webex.com': mockIntServiceHosts,
154
+ 'mobius-eu-central-1.int.infra.webex.com': mockEUIntServiceHosts,
155
+ };
156
+ export { ipPayload, regionBody, regionPayload, primaryUrl, discoveryPayload, registrationPayload, uri, myIP, mockEUServiceHosts, mockEUIntServiceHosts, mockIntServiceHosts, mockUSServiceHosts, mockCatalogEU, mockCatalogEUInt, mockCatalogUS, mockCatalogUSInt, };