A Webex Contact Center (WxCC) Agent Desktop header widget that plays a ringtone on an audio device of the agent’s choosing whenever a contact or consult is offered. Agents who wear a headset can have incoming calls also ring out loud on their laptop or desk speakers, so they don’t miss a call while the headset is off.
localStorage, so they survive reloads and sign-outs.The ringtone loops until the offer is answered or goes away:
| Desktop event | Ringer |
|---|---|
Contact offered (eAgentOfferContact) |
Starts ringing |
Consult offered (eAgentOfferConsult) |
Starts ringing |
Contact accepted (eAgentContactAssigned) |
Stops |
Consult accepted (eAgentConsulting) |
Stops |
Contact ended / abandoned (eAgentContactEnded) |
Stops |
Ring-no-answer timeout (eAgentOfferContactRona) |
Stops |
HTMLElement and Shadow DOM, with no framework and no build step. index.js is the source.<audio> element, and HTMLMediaElement.setSinkId() sends it to the chosen device.getUserMedia({ audio: true }), then releases it straight away. The Agent Desktop normally has mic permission already for WebRTC calling.window.AGENTX_SERVICE.aqm.contact event emitters.ring.mp3 is loaded from the same folder as index.js, so the two files must be hosted together.setSinkId.
Both files are served from this repo by GitHub Pages:
https://krich5.github.io/RingerDevice/index.js
https://krich5.github.io/RingerDevice/ring.mp3
To host your own copy, fork this repo and turn on GitHub Pages, or upload index.js and ring.mp3 into the same folder on any static HTTPS host.
Add ringer-device to the advancedHeader of each persona that should have it: agent, supervisor and/or supervisorAgent.
"advancedHeader": [
{
"comp": "ringer-device",
"script": "https://krich5.github.io/RingerDevice/index.js",
"attributes": {
"darkmode": "$STORE.app.darkMode"
}
},
"digital-outbound",
"outdial-call",
"notification"
]
A complete sample layout with the widget in all three personas is included in this repo:
ringer-device_Layout.json
In Control Hub → Contact Center → Desktop Layouts, upload the layout and assign it to the team(s) that should have it. Agents must sign out and back in to pick up the new layout.
| Attribute | Store binding | Description |
|---|---|---|
darkmode |
$STORE.app.darkMode |
Switches the widget between light and dark styling to match the desktop |
| What | How |
|---|---|
| Ringtone | Replace ring.mp3 with your own audio file of the same name. It loops, so a short clip works best. |
| Lit colour | Edit --sr-lit, --sr-lit-border and --sr-lit-glow in STYLES. There’s one set for light mode and one under :host([dark]) |
| Colors | Edit the --sr-* CSS variables in STYLES. There’s one set for light mode and one under :host([dark]) |
localStorage, so they don’t follow an agent to another computer or browser.window.AGENTX_SERVICE, which isn’t part of the documented Desktop SDK. A future desktop release could change it. If that happens, the widget fails silently and simply won’t ring.See LICENSE.