@webex/plugin-meetings 3.0.0-beta.216 → 3.0.0-beta.218

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 (53) hide show
  1. package/README.md +1 -1
  2. package/dist/breakouts/breakout.js +1 -1
  3. package/dist/breakouts/index.js +1 -1
  4. package/dist/constants.js +11 -2
  5. package/dist/constants.js.map +1 -1
  6. package/dist/interpretation/index.js +1 -1
  7. package/dist/interpretation/siLanguage.js +1 -1
  8. package/dist/meeting/locusMediaRequest.js +2 -1
  9. package/dist/meeting/locusMediaRequest.js.map +1 -1
  10. package/dist/meeting/request.js +4 -3
  11. package/dist/meeting/request.js.map +1 -1
  12. package/dist/meeting/util.js +4 -2
  13. package/dist/meeting/util.js.map +1 -1
  14. package/dist/meetings/index.js +4 -18
  15. package/dist/meetings/index.js.map +1 -1
  16. package/dist/reachability/index.js +11 -1
  17. package/dist/reachability/index.js.map +1 -1
  18. package/dist/reachability/request.js +5 -3
  19. package/dist/reachability/request.js.map +1 -1
  20. package/dist/roap/index.js +8 -4
  21. package/dist/roap/index.js.map +1 -1
  22. package/dist/roap/request.js +4 -3
  23. package/dist/roap/request.js.map +1 -1
  24. package/dist/roap/turnDiscovery.js +6 -2
  25. package/dist/roap/turnDiscovery.js.map +1 -1
  26. package/dist/types/constants.d.ts +8 -0
  27. package/dist/types/meeting/locusMediaRequest.d.ts +3 -0
  28. package/dist/types/meeting/request.d.ts +2 -0
  29. package/dist/types/meetings/index.d.ts +4 -10
  30. package/dist/types/reachability/index.d.ts +6 -0
  31. package/dist/types/reachability/request.d.ts +3 -1
  32. package/dist/types/roap/request.d.ts +2 -0
  33. package/package.json +19 -19
  34. package/src/constants.ts +10 -0
  35. package/src/meeting/locusMediaRequest.ts +4 -1
  36. package/src/meeting/request.ts +4 -0
  37. package/src/meeting/util.ts +2 -0
  38. package/src/meetings/index.ts +5 -18
  39. package/src/reachability/index.ts +12 -2
  40. package/src/reachability/request.ts +7 -3
  41. package/src/roap/index.ts +4 -0
  42. package/src/roap/request.ts +4 -2
  43. package/src/roap/turnDiscovery.ts +4 -0
  44. package/test/unit/spec/meeting/index.js +4 -0
  45. package/test/unit/spec/meeting/locusMediaRequest.ts +5 -0
  46. package/test/unit/spec/meeting/request.js +8 -4
  47. package/test/unit/spec/meeting/utils.js +7 -1
  48. package/test/unit/spec/meetings/index.js +7 -25
  49. package/test/unit/spec/reachability/index.ts +9 -0
  50. package/test/unit/spec/reachability/request.js +3 -1
  51. package/test/unit/spec/roap/index.ts +2 -1
  52. package/test/unit/spec/roap/request.ts +7 -1
  53. package/test/unit/spec/roap/turnDiscovery.ts +7 -2
@@ -146,7 +146,7 @@ export default class Meetings extends WebexPlugin {
146
146
  meetingCollection: any;
147
147
  personalMeetingRoom: any;
148
148
  preferredWebexSite: any;
149
- reachability: any;
149
+ reachability: Reachability;
150
150
  registered: any;
151
151
  request: any;
152
152
  geoHintInfo: any;
@@ -202,15 +202,17 @@ export default class Meetings extends WebexPlugin {
202
202
  * @memberof Meetings
203
203
  */
204
204
  this.personalMeetingRoom = null;
205
+
205
206
  /**
206
- * The Reachability object to interact with server, starts as null until {@link Meeting#setReachability} is called
207
+ * The Reachability object to interact with server
207
208
  * starts as null
208
209
  * @instance
209
210
  * @type {Object}
210
211
  * @private
211
212
  * @memberof Meetings
212
213
  */
213
- this.reachability = null;
214
+ // @ts-ignore
215
+ this.reachability = new Reachability(this.webex);
214
216
 
215
217
  /**
216
218
  * If the meetings plugin has been registered and listening via {@link Meetings#register}
@@ -927,17 +929,6 @@ export default class Meetings extends WebexPlugin {
927
929
  });
928
930
  }
929
931
 
930
- /**
931
- * initializes the reachability instance for Meetings
932
- * @returns {undefined}
933
- * @public
934
- * @memberof Meetings
935
- */
936
- setReachability() {
937
- // @ts-ignore
938
- this.reachability = new Reachability(this.webex);
939
- }
940
-
941
932
  /**
942
933
  * gets the reachability instance for Meetings
943
934
  * @returns {Reachability}
@@ -955,10 +946,6 @@ export default class Meetings extends WebexPlugin {
955
946
  * @memberof Meetings
956
947
  */
957
948
  startReachability() {
958
- if (!this.reachability) {
959
- this.setReachability();
960
- }
961
-
962
949
  return this.getReachability().gatherReachability();
963
950
  }
964
951
 
@@ -7,7 +7,7 @@
7
7
  import _ from 'lodash';
8
8
 
9
9
  import LoggerProxy from '../common/logs/logger-proxy';
10
- import {ICE_GATHERING_STATE, CONNECTION_STATE, REACHABILITY} from '../constants';
10
+ import {ICE_GATHERING_STATE, CONNECTION_STATE, REACHABILITY, IP_VERSION} from '../constants';
11
11
 
12
12
  import ReachabilityRequest from './request';
13
13
 
@@ -70,7 +70,9 @@ export default class Reachability {
70
70
 
71
71
  // Fetch clusters and measure latency
72
72
  try {
73
- const {clusters, joinCookie} = await this.reachabilityRequest.getClusters();
73
+ const {clusters, joinCookie} = await this.reachabilityRequest.getClusters(
74
+ this.getIpVersion()
75
+ );
74
76
 
75
77
  // Perform Reachability Check
76
78
  const results = await this.performReachabilityCheck(clusters);
@@ -132,6 +134,14 @@ export default class Reachability {
132
134
  return reachable;
133
135
  }
134
136
 
137
+ /**
138
+ * Returns what we know about the IP version of the networks we're connected to.
139
+ * @returns {IP_VERSION}
140
+ */
141
+ getIpVersion(): IP_VERSION {
142
+ return IP_VERSION.unknown;
143
+ }
144
+
135
145
  /**
136
146
  * Generate peerConnection config settings
137
147
  * @param {object} cluster
@@ -1,5 +1,5 @@
1
1
  import LoggerProxy from '../common/logs/logger-proxy';
2
- import {HTTP_VERBS, RESOURCE, API} from '../constants';
2
+ import {HTTP_VERBS, RESOURCE, API, IP_VERSION} from '../constants';
3
3
 
4
4
  export interface ClusterNode {
5
5
  isVideoMesh: boolean;
@@ -30,9 +30,10 @@ class ReachabilityRequest {
30
30
  /**
31
31
  * Gets the cluster information
32
32
  *
33
+ * @param {IP_VERSION} ipVersion information about current ip network we're on
33
34
  * @returns {Promise}
34
35
  */
35
- getClusters = (): Promise<{clusters: ClusterList; joinCookie: any}> =>
36
+ getClusters = (ipVersion: IP_VERSION): Promise<{clusters: ClusterList; joinCookie: any}> =>
36
37
  this.webex
37
38
  .request({
38
39
  method: HTTP_VERBS.GET,
@@ -41,6 +42,7 @@ class ReachabilityRequest {
41
42
  resource: RESOURCE.CLUSTERS,
42
43
  qs: {
43
44
  JCSupport: 1,
45
+ ipver: ipVersion,
44
46
  },
45
47
  })
46
48
  .then((res) => {
@@ -51,7 +53,9 @@ class ReachabilityRequest {
51
53
  });
52
54
 
53
55
  LoggerProxy.logger.log(
54
- `Reachability:request#getClusters --> get clusters successful:${JSON.stringify(clusters)}`
56
+ `Reachability:request#getClusters --> get clusters (ipver=${ipVersion}) successful:${JSON.stringify(
57
+ clusters
58
+ )}`
55
59
  );
56
60
 
57
61
  return {
package/src/roap/index.ts CHANGED
@@ -100,6 +100,7 @@ export default class Roap extends StatelessWebexPlugin {
100
100
  mediaId: options.mediaId,
101
101
  meetingId: meeting.id,
102
102
  locusMediaRequest: meeting.locusMediaRequest,
103
+ ipVersion: meeting.webex.meetings.reachability.getIpVersion(),
103
104
  })
104
105
  .then(() => {
105
106
  LoggerProxy.logger.log(`Roap:index#sendRoapOK --> ROAP OK sent with seq ${options.seq}`);
@@ -134,6 +135,7 @@ export default class Roap extends StatelessWebexPlugin {
134
135
  mediaId: options.mediaId,
135
136
  meetingId: meeting.id,
136
137
  locusMediaRequest: meeting.locusMediaRequest,
138
+ ipVersion: meeting.webex.meetings.reachability.getIpVersion(),
137
139
  });
138
140
  }
139
141
 
@@ -163,6 +165,7 @@ export default class Roap extends StatelessWebexPlugin {
163
165
  mediaId: options.mediaId,
164
166
  meetingId: meeting.id,
165
167
  locusMediaRequest: meeting.locusMediaRequest,
168
+ ipVersion: meeting.webex.meetings.reachability.getIpVersion(),
166
169
  })
167
170
  .then(() => {
168
171
  LoggerProxy.logger.log(
@@ -201,6 +204,7 @@ export default class Roap extends StatelessWebexPlugin {
201
204
  meetingId: meeting.id,
202
205
  preferTranscoding: !meeting.isMultistream,
203
206
  locusMediaRequest: meeting.locusMediaRequest,
207
+ ipVersion: meeting.webex.meetings.reachability.getIpVersion(),
204
208
  })
205
209
  .then(({locus, mediaConnections}) => {
206
210
  if (mediaConnections) {
@@ -2,7 +2,7 @@
2
2
  import {StatelessWebexPlugin} from '@webex/webex-core';
3
3
 
4
4
  import LoggerProxy from '../common/logs/logger-proxy';
5
- import {REACHABILITY} from '../constants';
5
+ import {IP_VERSION, REACHABILITY} from '../constants';
6
6
  import {LocusMediaRequest} from '../meeting/locusMediaRequest';
7
7
 
8
8
  /**
@@ -70,9 +70,10 @@ export default class RoapRequest extends StatelessWebexPlugin {
70
70
  locusSelfUrl: string;
71
71
  mediaId: string;
72
72
  meetingId: string;
73
+ ipVersion: IP_VERSION;
73
74
  locusMediaRequest?: LocusMediaRequest;
74
75
  }) {
75
- const {roapMessage, locusSelfUrl, mediaId, meetingId, locusMediaRequest} = options;
76
+ const {roapMessage, locusSelfUrl, mediaId, meetingId, locusMediaRequest, ipVersion} = options;
76
77
 
77
78
  if (!mediaId) {
78
79
  LoggerProxy.logger.info('Roap:request#sendRoap --> sending empty mediaID');
@@ -109,6 +110,7 @@ export default class RoapRequest extends StatelessWebexPlugin {
109
110
  mediaId,
110
111
  roapMessage,
111
112
  reachability: localSdpWithReachabilityData.reachability,
113
+ ipVersion,
112
114
  })
113
115
  .then((res) => {
114
116
  // @ts-ignore
@@ -182,6 +182,8 @@ export default class TurnDiscovery {
182
182
  mediaId: isReconnecting ? '' : meeting.mediaId,
183
183
  meetingId: meeting.id,
184
184
  locusMediaRequest: meeting.locusMediaRequest,
185
+ // @ts-ignore - because of meeting.webex
186
+ ipVersion: meeting.webex.meetings.reachability.getIpVersion(),
185
187
  })
186
188
  .then(({mediaConnections}) => {
187
189
  if (mediaConnections) {
@@ -212,6 +214,8 @@ export default class TurnDiscovery {
212
214
  mediaId: meeting.mediaId,
213
215
  meetingId: meeting.id,
214
216
  locusMediaRequest: meeting.locusMediaRequest,
217
+ // @ts-ignore - because of meeting.webex
218
+ ipVersion: meeting.webex.meetings.reachability.getIpVersion(),
215
219
  });
216
220
  }
217
221
 
@@ -27,6 +27,7 @@ import {
27
27
  PC_BAIL_TIMEOUT,
28
28
  DISPLAY_HINTS,
29
29
  SELF_POLICY,
30
+ IP_VERSION,
30
31
  } from '@webex/plugin-meetings/src/constants';
31
32
  import * as InternalMediaCoreModule from '@webex/internal-media-core';
32
33
  import {
@@ -1658,6 +1659,7 @@ describe('plugin-meetings', () => {
1658
1659
  meeting.webex.meetings.geoHintInfo = {regionCode: 'EU', countryCode: 'UK'};
1659
1660
  meeting.webex.meetings.reachability = {
1660
1661
  isAnyClusterReachable: sinon.stub().resolves(true),
1662
+ getIpVersion: () => IP_VERSION.unknown,
1661
1663
  };
1662
1664
  meeting.roap.doTurnDiscovery = sinon
1663
1665
  .stub()
@@ -1797,6 +1799,7 @@ describe('plugin-meetings', () => {
1797
1799
  clientMediaPreferences: {
1798
1800
  preferTranscoding: !meeting.isMultistream,
1799
1801
  joinCookie: undefined,
1802
+ ipver: 0,
1800
1803
  },
1801
1804
  },
1802
1805
  });
@@ -1822,6 +1825,7 @@ describe('plugin-meetings', () => {
1822
1825
  ],
1823
1826
  clientMediaPreferences: {
1824
1827
  preferTranscoding: !meeting.isMultistream,
1828
+ ipver: 0,
1825
1829
  },
1826
1830
  respOnlySdp: true,
1827
1831
  usingResource: null,
@@ -7,6 +7,7 @@ import Meetings from '@webex/plugin-meetings';
7
7
  import { LocalMuteRequest, LocusMediaRequest, RoapRequest } from "@webex/plugin-meetings/src/meeting/locusMediaRequest";
8
8
  import testUtils from '../../../utils/testUtils';
9
9
  import { Defer } from '@webex/common';
10
+ import { IP_VERSION } from '../../../../src/constants';
10
11
 
11
12
  describe('LocusMediaRequest.send()', () => {
12
13
  let locusMediaRequest: LocusMediaRequest;
@@ -37,6 +38,7 @@ describe('LocusMediaRequest.send()', () => {
37
38
  clientIpAddress: 'some ip',
38
39
  timeShot: '2023-05-23T08:03:49Z',
39
40
  },
41
+ ipVersion: IP_VERSION.only_ipv4,
40
42
  };
41
43
 
42
44
  const createExpectedRoapBody = (expectedMessageType, expectedMute:{audioMuted: boolean, videoMuted: boolean}) => {
@@ -51,6 +53,7 @@ describe('LocusMediaRequest.send()', () => {
51
53
  ],
52
54
  clientMediaPreferences: {
53
55
  preferTranscoding: true,
56
+ ipver: 4,
54
57
  joinCookie: {
55
58
  anycastEntryPoint: 'aws-eu-west-1',
56
59
  clientIpAddress: 'some ip',
@@ -65,6 +68,7 @@ describe('LocusMediaRequest.send()', () => {
65
68
  mediaId: 'mediaId',
66
69
  selfUrl: 'fakeMeetingSelfUrl',
67
70
  muteOptions: {},
71
+ ipVersion: IP_VERSION.only_ipv6
68
72
  };
69
73
 
70
74
  const createExpectedLocalMuteBody = (expectedMute:{audioMuted: boolean, videoMuted: boolean}, sequence = undefined) => {
@@ -85,6 +89,7 @@ describe('LocusMediaRequest.send()', () => {
85
89
  ],
86
90
  clientMediaPreferences: {
87
91
  preferTranscoding: true,
92
+ ipver: 6,
88
93
  },
89
94
  };
90
95
 
@@ -4,7 +4,9 @@ import MockWebex from '@webex/test-helper-mock-webex';
4
4
  import Meetings from '@webex/plugin-meetings';
5
5
  import MeetingRequest from '@webex/plugin-meetings/src/meeting/request';
6
6
  import uuid from 'uuid';
7
- import {merge} from 'lodash';
7
+ import { merge } from 'lodash';
8
+ import {IP_VERSION} from '@webex/plugin-meetings/src/constants';
9
+
8
10
 
9
11
  describe('plugin-meetings', () => {
10
12
  let meetingsRequest;
@@ -291,7 +293,7 @@ describe('plugin-meetings', () => {
291
293
  assert.deepEqual(requestParams.body.locale, undefined);
292
294
  });
293
295
 
294
- it('includes joinCookie correctly', async () => {
296
+ it('includes joinCookie and ipver correctly', async () => {
295
297
  const locusUrl = 'locusURL';
296
298
  const deviceUrl = 'deviceUrl';
297
299
  const correlationId = 'random-uuid';
@@ -304,14 +306,16 @@ describe('plugin-meetings', () => {
304
306
  correlationId,
305
307
  roapMessage,
306
308
  permissionToken,
309
+ ipVersion: IP_VERSION.ipv4_and_ipv6
307
310
  });
308
311
  const requestParams = meetingsRequest.request.getCall(0).args[0];
309
312
 
310
313
  assert.equal(requestParams.method, 'POST');
311
314
  assert.equal(requestParams.uri, `${locusUrl}/participant?alternateRedirect=true`);
312
315
  assert.deepEqual(requestParams.body.clientMediaPreferences, {
313
- joinCookie: {anycastEntryPoint: 'aws-eu-west-1'},
314
- preferTranscoding: true,
316
+ "joinCookie": {anycastEntryPoint: "aws-eu-west-1"},
317
+ "preferTranscoding": true,
318
+ "ipver": 1
315
319
  });
316
320
  });
317
321
  });
@@ -1,5 +1,6 @@
1
1
  import sinon from 'sinon';
2
2
  import {assert} from '@webex/test-helper-chai';
3
+ import Meetings from '@webex/plugin-meetings';
3
4
  import MeetingUtil from '@webex/plugin-meetings/src/meeting/util';
4
5
  import LoggerProxy from '@webex/plugin-meetings/src/common/logs/logger-proxy';
5
6
  import LoggerConfig from '@webex/plugin-meetings/src/common/logs/logger-config';
@@ -15,7 +16,11 @@ describe('plugin-meetings', () => {
15
16
  const meeting = {};
16
17
 
17
18
  beforeEach(() => {
18
- webex = new MockWebex({});
19
+ webex = new MockWebex({
20
+ children: {
21
+ meetings: Meetings,
22
+ },
23
+ });
19
24
  const logger = {
20
25
  info: sandbox.stub(),
21
26
  log: sandbox.stub(),
@@ -334,6 +339,7 @@ describe('plugin-meetings', () => {
334
339
  selfUrl: 'self url',
335
340
  sequence: {},
336
341
  type: 'LocalMute',
342
+ ipVersion: 0,
337
343
  });
338
344
 
339
345
  assert.calledWith(webex.internal.newMetrics.submitClientEvent, {
@@ -452,32 +452,14 @@ describe('plugin-meetings', () => {
452
452
  it('should have #getReachability', () => {
453
453
  assert.exists(webex.meetings.getReachability);
454
454
  });
455
- describe('before #setReachability', () => {
456
- it('does not get a reachability instance', () => {
457
- const reachability = webex.meetings.getReachability();
455
+ it('gets the reachability data instance from webex.meetings', () => {
456
+ const reachability = webex.meetings.getReachability();
458
457
 
459
- assert.notExists(
460
- reachability,
461
- 'reachability is undefined because #setReachability has not been called'
462
- );
463
- });
464
- });
465
- describe('after #setReachability', () => {
466
- beforeEach(() => {
467
- webex.meetings.setReachability();
468
- const reachabilityMocker = webex.meetings.getReachability();
469
-
470
- sinon.stub(reachabilityMocker, 'gatherReachability').returns(true);
471
- });
472
- it('gets the reachability data instance from webex.meetings', () => {
473
- const reachability = webex.meetings.getReachability();
474
-
475
- assert.exists(
476
- reachability,
477
- 'reachability is defined because #setReachability has been called'
478
- );
479
- assert.instanceOf(reachability, Reachability, 'should be a reachability instance');
480
- });
458
+ assert.exists(
459
+ reachability,
460
+ 'reachability is defined'
461
+ );
462
+ assert.instanceOf(reachability, Reachability, 'should be a reachability instance');
481
463
  });
482
464
  });
483
465
  describe('#getPersonalMeetingRoom', () => {
@@ -2,6 +2,7 @@ import {assert} from '@webex/test-helper-chai';
2
2
  import MockWebex from '@webex/test-helper-mock-webex';
3
3
  import sinon from 'sinon';
4
4
  import Reachability, {ICECandidateResult} from '@webex/plugin-meetings/src/reachability/';
5
+ import { IP_VERSION } from '@webex/plugin-meetings/src/constants';
5
6
 
6
7
  describe('isAnyClusterReachable', () => {
7
8
  let webex;
@@ -250,4 +251,12 @@ describe('gatherReachability', () => {
250
251
  });
251
252
  });
252
253
  });
254
+
255
+ describe('getIpVersion', () => {
256
+ it('returns unknown', () => {
257
+ const reachability = new Reachability(webex);
258
+
259
+ assert.equal(reachability.getIpVersion(), IP_VERSION.unknown);
260
+ })
261
+ })
253
262
  });
@@ -3,6 +3,7 @@ import {assert} from '@webex/test-helper-chai';
3
3
  import MockWebex from '@webex/test-helper-mock-webex';
4
4
  import Meetings from '@webex/plugin-meetings';
5
5
  import ReachabilityRequest from '@webex/plugin-meetings/src/reachability/request';
6
+ import {IP_VERSION} from '@webex/plugin-meetings/src/constants';
6
7
 
7
8
 
8
9
  describe('plugin-meetings/reachability', () => {
@@ -47,7 +48,7 @@ describe('plugin-meetings/reachability', () => {
47
48
  }
48
49
  }));
49
50
 
50
- const res = await reachabilityRequest.getClusters();
51
+ const res = await reachabilityRequest.getClusters(IP_VERSION.only_ipv4);
51
52
 
52
53
  const requestParams = webex.request.getCall(0).args[0];
53
54
 
@@ -58,6 +59,7 @@ describe('plugin-meetings/reachability', () => {
58
59
 
59
60
  assert.deepEqual(requestParams.qs, {
60
61
  JCSupport: 1,
62
+ ipver: 4,
61
63
  });
62
64
  assert.deepEqual(res.clusters.clusterId, {udp: "testUDP", isVideoMesh: true})
63
65
  assert.deepEqual(res.joinCookie, {anycastEntryPoint: "aws-eu-west-1"})
@@ -6,6 +6,7 @@ import MockWebex from '@webex/test-helper-mock-webex';
6
6
  import RoapRequest from '@webex/plugin-meetings/src/roap/request';
7
7
  import Roap from '@webex/plugin-meetings/src/roap/';
8
8
  import Meeting from '@webex/plugin-meetings/src/meeting';
9
+ import { IP_VERSION } from '../../../../src/constants';
9
10
 
10
11
  describe('Roap', () => {
11
12
  describe('doTurnDiscovery', () => {
@@ -61,7 +62,7 @@ describe('Roap', () => {
61
62
  setRoapSeq: sinon.stub(),
62
63
  config: {experimental: {enableTurnDiscovery: false}},
63
64
  locusMediaRequest: {fake: true},
64
- webex: { meetings: { reachability: { isAnyClusterReachable: () => true}}},
65
+ webex: { meetings: { reachability: { isAnyClusterReachable: () => true, getIpVersion: () => IP_VERSION.unknown}}},
65
66
  };
66
67
 
67
68
  sendRoapStub = sinon.stub(RoapRequest.prototype, 'sendRoap').resolves({});
@@ -3,7 +3,7 @@ import {assert} from '@webex/test-helper-chai';
3
3
  import MockWebex from '@webex/test-helper-mock-webex';
4
4
  import Meetings from '@webex/plugin-meetings';
5
5
  import RoapRequest from '@webex/plugin-meetings/src/roap/request';
6
- import {REACHABILITY} from '@webex/plugin-meetings/src/constants';
6
+ import {IP_VERSION, REACHABILITY} from '@webex/plugin-meetings/src/constants';
7
7
 
8
8
  describe('plugin-meetings/roap', () => {
9
9
  let roapRequest;
@@ -109,9 +109,11 @@ describe('plugin-meetings/roap', () => {
109
109
  describe('sendRoap', () => {
110
110
  it('includes joinCookie in the request correctly', async () => {
111
111
  const locusMediaRequest = {send: sinon.stub().resolves({body: {locus: {}}})};
112
+ const ipVersion = IP_VERSION.unknown;
112
113
 
113
114
  await roapRequest.sendRoap({
114
115
  locusSelfUrl: locusUrl,
116
+ ipVersion,
115
117
  mediaId: 'mediaId',
116
118
  roapMessage: {
117
119
  seq: 'seq',
@@ -138,6 +140,7 @@ describe('plugin-meetings/roap', () => {
138
140
  assert.deepEqual(requestParams, {
139
141
  type: 'RoapMessage',
140
142
  selfUrl: locusUrl,
143
+ ipVersion,
141
144
  joinCookie: {
142
145
  anycastEntryPoint: 'aws-eu-west-1',
143
146
  },
@@ -180,6 +183,7 @@ describe('plugin-meetings/roap', () => {
180
183
  new: 'sdp',
181
184
  reachability: { someResult: 'whatever' }
182
185
  };
186
+ const ipVersion = IP_VERSION.only_ipv6;
183
187
 
184
188
  roapRequest.attachReachabilityData = sinon.stub().returns(
185
189
  Promise.resolve({
@@ -195,6 +199,7 @@ describe('plugin-meetings/roap', () => {
195
199
  seq: 1,
196
200
  },
197
201
  locusSelfUrl: 'locusSelfUrl',
202
+ ipVersion,
198
203
  mediaId: 'mediaId',
199
204
  meetingId: 'meetingId',
200
205
  preferTranscoding: true,
@@ -206,6 +211,7 @@ describe('plugin-meetings/roap', () => {
206
211
  assert.deepEqual(requestParams, {
207
212
  type: 'RoapMessage',
208
213
  selfUrl: 'locusSelfUrl',
214
+ ipVersion,
209
215
  joinCookie: {
210
216
  anycastEntryPoint: 'aws-eu-west-1',
211
217
  },
@@ -7,6 +7,7 @@ import BEHAVIORAL_METRICS from '@webex/plugin-meetings/src/metrics/constants';
7
7
  import RoapRequest from '@webex/plugin-meetings/src/roap/request';
8
8
 
9
9
  import testUtils from '../../../utils/testUtils';
10
+ import { IP_VERSION } from '../../../../src/constants';
10
11
 
11
12
  describe('TurnDiscovery', () => {
12
13
  let clock;
@@ -50,7 +51,10 @@ describe('TurnDiscovery', () => {
50
51
  testMeeting.roapSeq = newSeq;
51
52
  }),
52
53
  updateMediaConnections: sinon.stub(),
53
- webex: {meetings: {reachability: {isAnyClusterReachable: () => Promise.resolve(false)}}},
54
+ webex: {meetings: {reachability: {
55
+ isAnyClusterReachable: () => Promise.resolve(false),
56
+ getIpVersion: () => IP_VERSION.unknown,
57
+ }}},
54
58
  isMultistream: false,
55
59
  locusMediaRequest: { fake: true },
56
60
  };
@@ -78,7 +82,8 @@ describe('TurnDiscovery', () => {
78
82
  locusSelfUrl: testMeeting.selfUrl,
79
83
  mediaId: expectedMediaId,
80
84
  meetingId: testMeeting.id,
81
- locusMediaRequest: testMeeting.locusMediaRequest
85
+ locusMediaRequest: testMeeting.locusMediaRequest,
86
+ ipVersion: 0,
82
87
  });
83
88
 
84
89
  if (messageType === 'TURN_DISCOVERY_REQUEST') {