Skip to content

fix(samples): fix agent logging in without default option. #4204

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

Open
wants to merge 6 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion docs/samples/contact-center/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,6 @@ function register() {
teamsDropdown.add(option);
});
const loginVoiceOptions = agentProfile.loginVoiceOptions;
agentLogin.innerHTML = '<option value="" selected>Choose Agent Login ...</option>'; // Clear previously selected option on agentLogin.
dialNumber.value = agentProfile.defaultDn ? agentProfile.defaultDn : '';
dialNumber.disabled = agentProfile.defaultDn ? false : true;
if (loginVoiceOptions.length > 0) loginAgentElm.disabled = false;
Expand Down
1 change: 0 additions & 1 deletion docs/samples/contact-center/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ <h2 class="collapsible">
<fieldset>
<legend>Agent Login</legend>
<select name="AgentLogin" id="AgentLogin" class="AgentLogin" onchange="handleAgentLogin(event)">
<option value="" selected hidden>Choose Agent Login ...</option>
</select>
<input id="dialNumber" name="dialNumber" placeholder="Dial Number" value="" type="text">
<button id="loginAgent" disabled class="btn btn-primary my-3" onclick="doAgentLogin()">Login</button>
Expand Down
9 changes: 9 additions & 0 deletions packages/@webex/plugin-cc/src/cc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,10 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
private async silentRelogin(): Promise<void> {
try {
const reLoginResponse = await this.services.agent.reload();
LoggerProxy.info('event=silentRelogin | Silent relogin successful', {
module: CC_FILE,
method: this.silentRelogin.name,
});
const {
agentId,
lastStateChangeReason,
Expand All @@ -576,6 +580,11 @@ export default class ContactCenter extends WebexPlugin implements IContactCenter
this.agentConfig.lastIdleCodeChangeTimestamp = lastIdleCodeChangeTimestamp;
await this.handleDeviceType(deviceType as LoginOption, dn);

LoggerProxy.info('handleDeviceType completed successfully', {
module: CC_FILE,
method: this.silentRelogin.name,
});

// To handle re-registration of event listeners on silent relogin
// TODO: https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-626777 Implement the de-register method and close the listener there
// this.incomingTaskListener();
Expand Down
Loading