This project is intended as a sample widget to provide a visual Message Waiting Indicator (MWI) on a "shared" Webex Calling voicemail box for agents using the Webex Contact Center (WxCC) desktop.
It is common for contact centers to offer an option to leave a voicemail either after hours or during periods of high call volume. Depending on the agent's phone configuration, it might not be possible to have a MWI light on the agent's phone or the agent might not have an deskphone altogether.
This widget provides the following features:
- Message Waiting Indicator (MWI) with unread message count
- Click to dial the voicemail pilot number
Note: The voicemail box is required to be a licensed user. Today it's not possible to use a virtual-line for the voicemail box and receive notification through the webhook.
Note: The click to dial is not able set the ANI for the voicemail box. For this reason, the agent will have to enter the voicemail extension and pin when calling in.
This widget requires the use of some Google cloud services to function efficiently. The following process happens whenever a voicemail is marked read or a new message is received.
- Webex Calling (WxC) triggers a webhook when a "telephony_mwi" updated event occurs
- A cloud function receives the Webhook and updates a Firestore DB with the number of unread messages
- The widget(s) maintains a real-time connection to the Firestore DB for updates
WxC Webhook -> Cloud Function -> Firestore DB <- Widget(s)
Requirements: Node.js, NPM, a Webex Calling & Webex Contact Center tenant, Google Cloud Functions, Firebase, & any cloud storage/cdn
- There are numerous settings for building a cloud function. Google is also in the process of migrating cloud functions to cloud run functions. Check Google's documentation for instructions on how to create a cloud run function.
Note: It is recommended to use the same Google Cloud Project for the Cloud Function and Firebase, otherwise you will have to configure service accounts and permissions between them.
-
Create an unauthenticated cloud function using the
index.jsandpackage.jsonfiles provided in the in the cloud-functions folder. -
Create a Firestore DB with using the default database name and a collection named
sharedVoicemailand set the rules using thefirestore.rulesfile provided in the cloud-firestore folder. Check Google's documentation for instructions on how to create a Firebase Firestore DB. -
Add a firebase web app. This enables the real-time connection between the widget and Firestore. You will need to copy the firebaseConfig from this step to the firebase.js file in a later step.
-
Log into
https://developer.webex.com/docs/api/v1/webhooks/create-a-webhookwith the use Webex userid of the "shared" voicemail box. -
Fill out the required fields and submit to create a new webhook.
- name (this is used as the key for the Firestore DB, suggest something like sharedVoicemail1052)
- targetUrl (this is the public url for the cloud function created above)
- resource (telephony_mwi)
- event (updated)
-
Download this project or
git clone https//github.com/dwfinnegan/shared-voicemail -
From the project directory
run npm install -
Copy your firebaseConfig to the
src/firebase.jsfile -
Run
npm run buildto build the widget for deployment. -
Copy the build file from
dist/assetsfolder to your preferred cloud storage.
Note: The prject will not run in dev mode, as the desktop SDK only work when used in the agent desktop.
-
Add the widget template from the desktop-layout folder to the
advancedHeadersection of your desktop layout JSON file. -
Set the following fields in the widget template:
- webhookname (name from the webex calling webhook, must match case)
- voicemaildn (the ANI that you want to use when calling voicemail, must be a valid WxCC DN)
- voicemailpilot (the number to dial for voicemail)
- entrypointid (the entry point id to use when making the call to voicemial)
- script (the location where you upload to the script to cloud storage)
- Update this desktop layout and ensure its associated to the correct team.
- Initial project commit