Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/byods next 1 #3844

Merged
merged 54 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
6302094
fix(plugin-meetings): clientSignallingProtocol stat (#3803)
SomeBody16 Sep 4, 2024
d354100
fix(audio-mute): fix sometimes out-of-sync remote audio mute (#3797)
chburket Sep 4, 2024
73e75b7
fix: update internal media core version (#3806)
edvujic Sep 5, 2024
90cc9c2
fix(plugin-meetings): add to peer connection bare turn tcp server (#3…
k-wasniowski Sep 5, 2024
d5da303
fix: update internal media core (#3814)
k-wasniowski Sep 6, 2024
7e6755b
feat:(munge-sdp): updated-sdk-with-latest-media-core (#3815)
adhmenon Sep 9, 2024
77ac358
fix(plugin-authorization): use orgId if emailhash unavailable (#3788)
Coread Sep 9, 2024
6a34e63
feat(webex-core): hostmap interceptor (#3789)
Coread Sep 10, 2024
de15248
feat(contacts): move contacts to scim from dss (#3819)
sreenara Sep 11, 2024
eaa8f48
fix(meetings): sending ice candidate errors with add media success me…
marcin-bazyl Sep 12, 2024
3f6f375
refactor: remove network quality monitor (#3817)
edvujic Sep 12, 2024
8573ece
fix(contacts): handle optional scim fields (#3827)
sreenara Sep 13, 2024
523ae6d
fix(contacts): fix loop and use only resolved contacts from scim (#3829)
sreenara Sep 13, 2024
1de73b3
fix(contacts): use webexapis.com url to avoid cors (#3834)
sreenara Sep 14, 2024
8fa3283
fix(meetings): empty webrtc dumps when user closes the browser early …
marcin-bazyl Sep 16, 2024
cd652ad
docs(samples): add support for locus calls and resolve join button is…
RAM1232 Sep 16, 2024
9bb81a2
fix(meetings): webrtc dumps are sometimes empty when users join a mee…
marcin-bazyl Sep 16, 2024
4c321d2
Upstreamsvcs (#3832)
chrisadubois Sep 16, 2024
d927e6f
fix(plugin-meetings): add retry mechanism to fetching clusters (#3813)
k-wasniowski Sep 17, 2024
11f97f5
feat(meetings): do ip version detection in parallel with reachability…
marcin-bazyl Sep 17, 2024
c04a29f
feat(calling): update failover logic for cc (#3805)
rarajes2 Sep 18, 2024
e42b390
feat(callhistory): add-support-for-multiline-in-callhistory (#3816)
akulakum Sep 18, 2024
ce687dc
Merge branch 'next' into feat/byods-next-1
bhabalan Sep 18, 2024
15d6e91
Operational buisness metrics (#3818)
Sep 19, 2024
1eaba02
feat(contacts): add the resolved field to contacts (#3848)
sreenara Sep 23, 2024
0af7097
feat(presence-plugin): pass label to aphelia API whilst setting statu…
CormacGCisco Sep 24, 2024
b93ddef
fix(meetings): added reachability trigger to metrics (#3850)
marcin-bazyl Sep 24, 2024
8f8e880
fix(media-effects): include fix for sluggy video in background tab (#…
sreenara Sep 26, 2024
0bf3d24
fix(meetings): webex.internal.device doesn't know when user is in a m…
marcin-bazyl Sep 26, 2024
19c6bf5
fix: update internal-media-core with conditional device permissions f…
antsukanova Sep 27, 2024
40a9120
Merge branch 'webex:next' into feat/byods-next-1
bhabalan Sep 27, 2024
ed15626
feat(ca-metrics): allow override of buildType when running e2e tests …
chburket Sep 27, 2024
a4ae02d
fix(voicemail): process check in metrics for voicemail (#3867)
akulakum Sep 27, 2024
aeacec7
feat(internal-plugin-metrics): lazy build metrics backend follow-up (…
Sep 27, 2024
32e1137
feat(metrics): add session correlation id identifier (#3865)
chrisadubois Sep 27, 2024
1a8e376
SPARK-351232 - Add timers to handle missed events during a call (#3839)
Shreyas281299 Sep 30, 2024
bf7c1ba
fix(voicemail): process-check-for-ms-teams-integration (#3872)
akulakum Sep 30, 2024
2a9f66c
fix(mobius): mobius cluster should be inferred from serviceUrl in hos…
bhabalan Oct 1, 2024
f319209
Merge branch 'feat/byods' into feat/byods-next-1
bhabalan Oct 1, 2024
dd83988
fix(plugin-meetings): Eliminate Unnecessary Camera Prompts for Disabl…
Parimala032 Oct 1, 2024
9c6820e
test: fix window undefined issue for tests (#3874)
antsukanova Oct 2, 2024
b4e565c
feat(meetings): add meeting join time marker (#3877)
chrisadubois Oct 2, 2024
83a3b17
fix(mercury): fix logout mercury delete (#3878)
chrisadubois Oct 3, 2024
48dcc50
feat(ca): add saveable sessionCorrelationId (#3884)
chrisadubois Oct 8, 2024
541189f
feat: add `upgradeChannel` metric (#3873)
edvujic Oct 8, 2024
cd5a086
feat(policy): add supportPollingAndQA policy for slido (#3889)
xiaolin5207 Oct 8, 2024
ad8d241
fix(ca): typo (#3892)
chrisadubois Oct 8, 2024
d78f855
fix: update media-core version with roap fix (#3894)
antsukanova Oct 9, 2024
3abb5c9
fix(internal-plugin-metrics): restricted region wdm error marked as e…
jor-row Oct 9, 2024
4a00a43
fix(ca): fix session correlation id unknown (#3900)
chrisadubois Oct 9, 2024
988ebd5
refactor(internal-plugin-metrics): move rtcMetrics from plugin-meetin…
rarajes2 Oct 10, 2024
cd8094e
Merge branch 'webex:next' into feat/byods-next-1
bhabalan Oct 10, 2024
2e11eea
Merge branch 'feat/byods' into feat/byods-next-1
bhabalan Oct 10, 2024
a9e7a7c
Merge branch 'feat/byods' into feat/byods-next-1
bhabalan Oct 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion docs/samples/browser-plugin-meetings/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ const passwordCaptchaStatusElm = document.querySelector('#password-captcha-statu
const refreshCaptchaElm = document.querySelector('#meetings-join-captcha-refresh');
const verifyPasswordElm = document.querySelector('#btn-verify-password');
const displayMeetingStatusElm = document.querySelector('#display-meeting-status');
const notes=document.querySelector('#notes');
const spaceIDError = `Using the space ID as a destination is no longer supported. Please refer to the <a href="https://github.com/webex/webex-js-sdk/wiki/Migration-to-Unified-Space-Meetings" target="_blank">migration guide</a> to migrate to use the meeting ID or SIP address.`;
const BNR = 'BNR';
const VBG = 'VBG';
Expand Down Expand Up @@ -381,6 +382,17 @@ createMeetingSelectElm.addEventListener('change', (event) => {
}
});

createMeetingSelectElm.addEventListener('change', (event) => {
if (event.target.value === 'Others') {
notes.classList.remove('hidden');
}
else {
notes.classList.add('hidden');

}
});


function createMeeting(e) {
e.preventDefault();

Expand Down Expand Up @@ -427,19 +439,26 @@ function refreshCaptcha() {
meetingsListElm.onclick = (e) => {
selectedMeetingId = e.target.value;
const meeting = webex.meetings.getAllMeetings()[selectedMeetingId];
const selectedMeetingType = createMeetingSelectElm.options[createMeetingSelectElm.selectedIndex].innerText;

if (meeting && meeting.passwordStatus === 'REQUIRED') {
meetingsJoinPinElm.disabled = false;
verifyPasswordElm.disabled = false;
document.getElementById('btn-join').disabled = true;
document.getElementById('btn-join-media').disabled = true;
}
else if (meeting && meeting.passwordStatus === 'UNKNOWN') {
else if (meeting && (meeting.passwordStatus === 'UNKNOWN' && selectedMeetingType === 'SIP URI')) {
meetingsJoinPinElm.disabled = true;
verifyPasswordElm.disabled = true;
document.getElementById('btn-join').disabled = true;
document.getElementById('btn-join-media').disabled = true;
}
else if(meeting && (meeting.passwordStatus === 'UNKNOWN' && selectedMeetingType != 'SIP URI')) {
meetingsJoinPinElm.disabled = true;
verifyPasswordElm.disabled = true;
document.getElementById('btn-join').disabled = false;
document.getElementById('btn-join-media').disabled = false;
}
else {
meetingsJoinPinElm.disabled = true;
verifyPasswordElm.disabled = true;
Expand Down
4 changes: 2 additions & 2 deletions docs/samples/browser-plugin-meetings/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,14 @@ <h2 class="collapsible">
<input id="create-meeting-destination" name="createMeetingDestination" placeholder="Destination"
value="" type="text" required>
<select name="createMeetingDest" id="createMeetingDest">
<option value="">Email</option>
<option value="">Person ID</option>
<option value="">SIP URI</option>
<option value="CONVERSATION_URL">Conversation URL</option>
<option value="Others">Others</option>
</select>
<button id="create-meeting-action" type="submit" class="btn-code">Create Meeting</button>
</div>
</div>
<p class="note hidden" id="notes">NOTE: The destination shall be "Person ID" or "Email".</p>
</form>
</div>

Expand Down
4 changes: 4 additions & 0 deletions docs/samples/calling/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,10 @@ async function createCustomContact() {
type: 'work',
value: formData.get('phone')
}],
emails: [{
type: 'work',
value: formData.get('email')
}],
contactType: 'CUSTOM',
};
const res = await contacts.createContact(contact);
Expand Down
6 changes: 6 additions & 0 deletions packages/@webex/internal-plugin-device/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ export default {
* @type {boolean}
*/
ephemeralDeviceTTL: 30 * 60,

/**
* energyForcast
* @type {boolean}
*/
energyForecast: false,
},

/**
Expand Down
27 changes: 27 additions & 0 deletions packages/@webex/internal-plugin-device/src/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,14 @@ const Device = WebexPlugin.extend({
*/
isReachabilityChecked: ['boolean', false, false],

/**
* This property stores whether or not the next refresh or register request should request energy forecast data
* in order to prevent over fetching energy forecasts
*
* @type {boolean}
*/
energyForecastConfig: 'boolean',

/**
* This property stores whether or not the current device is in a meeting
* to prevent an unneeded timeout of a meeting due to inactivity.
Expand Down Expand Up @@ -344,6 +352,15 @@ const Device = WebexPlugin.extend({
this.webex.trigger('meeting ended');
},

/**
* Set the value of energy forecast config for the current registered device.
* @param {boolean} [energyForecastConfig=false] - fetch an energy forecast on the next refresh/register
* @returns {void}
*/
setEnergyForecastConfig(energyForecastConfig = false) {
this.energyForecastConfig = energyForecastConfig;
},

// Registration method members

/* eslint-disable require-jsdoc */
Expand Down Expand Up @@ -395,6 +412,11 @@ const Device = WebexPlugin.extend({
uri: this.url,
body,
headers,
qs: {
includeUpstreamServices: `all${
this.config.energyForecast && this.energyForecastConfig ? ',energyforecast' : ''
}`,
},
})
.then((response) => this.processRegistrationSuccess(response))
.catch((reason) => {
Expand Down Expand Up @@ -464,6 +486,11 @@ const Device = WebexPlugin.extend({
resource: 'devices',
body,
headers,
qs: {
includeUpstreamServices: `all${
this.config.energyForecast && this.energyForecastConfig ? ',energyforecast' : ''
}`,
},
})
.catch((error) => {
this.webex.internal.newMetrics.submitInternalEvent({
Expand Down
68 changes: 66 additions & 2 deletions packages/@webex/internal-plugin-device/test/unit/spec/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,14 @@ describe('plugin-device', () => {
describe('#refresh()', () => {
let requestSpy;

const setup = () => {
const setup = (config = {}) => {
sinon.stub(device, 'canRegister').callsFake(() => Promise.resolve());
sinon.stub(device, 'processRegistrationSuccess').callsFake(() => {});
requestSpy = sinon.spy(device, 'request');
device.config.defaults = {};
Object.keys((config)).forEach((key) => {
device.config[key] = config[key];
});
device.set('registered', true);
};

Expand All @@ -207,15 +210,40 @@ describe('plugin-device', () => {

assert.deepEqual(requestSpy.args[0][0].headers, {});
});

it('uses the energy forecast config to append upstream services to the outgoing call', async () => {
setup({energyForecast: true});
device.setEnergyForecastConfig(true);

await device.register();

assert.calledWith(requestSpy, sinon.match({
qs: { includeUpstreamServices: 'all,energyforecast' }
}))
});

it('uses the energy forecast config to not append upstream services to the outgoing call', async () => {
setup({energyForecast: true});
device.setEnergyForecastConfig(false);

await device.register();

assert.calledWith(requestSpy, sinon.match({
qs: { includeUpstreamServices: 'all' }
}))
});
});

describe('#register()', () => {
const setup = () => {
const setup = (config = {}) => {
webex.internal.metrics.submitClientMetrics = sinon.stub();

sinon.stub(device, 'processRegistrationSuccess').callsFake(() => {});

device.config.defaults = {};
Object.keys(config).forEach((key) => {
device.config[key] = config[key];
});
device.set('registered', false);
};

Expand Down Expand Up @@ -284,6 +312,42 @@ describe('plugin-device', () => {

});

it('uses the energy forecast config to append upstream services to the outgoing call', async () => {
setup({energyForecast: true});
sinon.stub(device, 'canRegister').callsFake(() => Promise.resolve());
const spy = sinon.spy(device, 'request');
device.setEnergyForecastConfig(true);

await device.register();

assert.calledWith(spy, {
method: 'POST',
service: 'wdm',
resource: 'devices',
body: {},
headers: {},
qs: { includeUpstreamServices: 'all,energyforecast' }
} )
});

it('uses the energy forecast config to not append upstream services to the outgoing call', async () => {
setup({energyForecast: true});
sinon.stub(device, 'canRegister').callsFake(() => Promise.resolve());
const spy = sinon.spy(device, 'request');
device.setEnergyForecastConfig(false);

await device.register();

assert.calledWith(spy, {
method: 'POST',
service: 'wdm',
resource: 'devices',
body: {},
headers: {},
qs: { includeUpstreamServices: 'all' }
} )
});

});

describe('#processRegistrationSuccess()', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,9 @@ export default class CallDiagnosticMetrics extends StatelessWebexPlugin {
},
intervals: payload.intervals,
callingServiceType: 'LOCUS',
meetingJoinInfo: {
clientSignallingProtocol: 'WebRTC',
},
sourceMetadata: {
applicationSoftwareType: CLIENT_NAME,
// @ts-ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,9 @@ describe('internal-plugin-metrics', () => {
eventData: {webClientDomain: 'whatever'},
intervals: [{}],
callingServiceType: 'LOCUS',
meetingJoinInfo: {
clientSignallingProtocol: 'WebRTC',
},
sourceMetadata: {
applicationSoftwareType: 'webex-js-sdk',
applicationSoftwareVersion: 'webex-version',
Expand Down Expand Up @@ -1490,6 +1493,9 @@ describe('internal-plugin-metrics', () => {
eventData: {webClientDomain: 'whatever'},
intervals: [{}],
callingServiceType: 'LOCUS',
meetingJoinInfo: {
clientSignallingProtocol: 'WebRTC',
},
sourceMetadata: {
applicationSoftwareType: 'webex-js-sdk',
applicationSoftwareVersion: 'webex-version',
Expand Down Expand Up @@ -1524,6 +1530,9 @@ describe('internal-plugin-metrics', () => {
eventData: {webClientDomain: 'whatever'},
intervals: [{}],
callingServiceType: 'LOCUS',
meetingJoinInfo: {
clientSignallingProtocol: 'WebRTC',
},
sourceMetadata: {
applicationSoftwareType: 'webex-js-sdk',
applicationSoftwareVersion: 'webex-version',
Expand Down
2 changes: 1 addition & 1 deletion packages/@webex/media-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"deploy:npm": "yarn npm publish"
},
"dependencies": {
"@webex/internal-media-core": "2.9.1",
"@webex/internal-media-core": "2.10.2",
"@webex/ts-events": "^1.1.0",
"@webex/web-media-effects": "2.18.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,24 @@ const Authorization = WebexPlugin.extend({
this._verifySecurityToken(location.query);
this._cleanUrl(location);

let preauthCatalogParams;

const orgId = this._extractOrgIdFromCode(code);

if (emailhash) {
preauthCatalogParams = {emailhash};
} else if (orgId) {
preauthCatalogParams = {orgId};
}

// Wait until nextTick in case `credentials` hasn't initialized yet
process.nextTick(() => {
this.webex.internal.services
.collectPreauthCatalog(emailhash ? {emailhash}: undefined)
.collectPreauthCatalog(preauthCatalogParams)
.catch(() => Promise.resolve())
.then(() => this.requestAuthorizationCodeGrant({code, codeVerifier}))
.catch((error) => {
this.logger.warn('authorization: failed initial authorization code grant request', error)
this.logger.warn('authorization: failed initial authorization code grant request', error);
})
.then(() => {
this.ready = true;
Expand Down Expand Up @@ -230,6 +240,20 @@ const Authorization = WebexPlugin.extend({
});
},

/**
* Extracts the orgId from the returned code from idbroker
* Description of how to parse the code can be found here:
* https://wiki.cisco.com/display/IDENTITY/Federated+Token+Validation
* @instance
* @memberof AuthorizationBrowserFirstParty
* @param {String} code
* @private
* @returns {String}
*/
_extractOrgIdFromCode(code) {
return code?.split('_')[2] || undefined;
},

/**
* Checks if the result of the login redirect contains an error string
* @instance
Expand Down
Loading
Loading