Using Webhooks to Measure Call Quality
Typically, eG Enterprise uses Microsoft API to pull metrics on call quality. The Audio Streams test, the Video Streams test, Call Quality Check test, VBSS Streams test, and Network Quality Summary test rely only on the API for measuring the quality of Teams calls and the overall end user experience with them.
One of the key limitations of the Microsoft API is its inability to provide real-time analytics on calls. The prime reason for this is that APIs do not run automatically; they need to be manually polled for metrics. Obviously therefore, administrators need to wait for the next polling interval for metrics collection. As a result, only non-real-time data is available for their consumption. Secondly, Microsoft publishes call records at 4-hour intervals; the API accesses these published records only. Because of the delay in data access, problem identification takes time, and troubleshooting becomes iterative. Users are hence left frustrated.
To overcome the shortcomings of the API, Microsoft introduced Webhooks. Webhooks can be thought of as automated API responses, without the request. It is a mechanism used by the Microsoft Graph API to deliver change notifications to clients. No manual polling is required for Webhooks to work. Via Webhooks, data is automatically passed to the clients when an update is made. Webhooks assure administrators of real-time metrics, and greatly ease troubleshooting.
The eG agent now leverages the capabilities of Webhooks. The agent now runs additional tests that pull real-time call quality analytics using Webhooks. Figure 1 depicts how the eG agent runs these tests and collects diagnostics.
Figure 1 : How does the eG agent use Webhooks to pull call quality analytics?
-
Whenever a call is completed in Microsoft teams, a new call record is sent from Microsoft office 365 to the Notification endpoint. A notification endpoint is a URL which is publicly accessible via HTTPS so that Microsoft can send call records to the endpoint.
-
The key information in the call record is call record ID. Notification endpoint will query Microsoft for details of the call record using the ‘call record ID’ received and tenant properties. In return, call record details will be sent in JSON format to notification endpoint.
-
Call record response - i.e., the JSON response - received by the notification endpoint is parsed, written to CSV files, and stored in the H2 database.
-
The eG agent queries the H2 database and reads the call quality measures.
-
The eG agent also filters/groups the metrics so read, and sends them to the eG manager.
-
The eG manager publishes the metrics to the eG web console.
Before running the Webhooks-based tests for Teams, make sure that the following pre-requisites are fulfilled:
-
Make sure that all the pre-requisites detailed in Pre-requisites for Monitoring Microsoft Office 365 Environments under Monitoring Office 365 are fulfilled;
-
Install and start the Webhooks service on the same system that hosts the eG agent; refer to Installing and Starting the Webhooks Service to know how to achieve the above.
-
A public HTTPS URL is required for the endpoint, so it can receive call records from Microsoft. To enable this transmission, make sure that the firewall is configured to allow traffic from the internet to the system hosting the Webhooks service. Also, make sure that the port at which the service listens is open.
-
Ensure that the Webhooks service is SSL-enabled. For this, follow the steps detailed in SSL Enabling the Webhooks Service.
-
The Microsoft Graph app should be configured with the User.Read.All Delegated Permission and the CallRecords.Read.All Application Permission; to know how to register the Microsoft Graph app on Azure Active Directory and assign permissions to it, refer to Registering the Microsoft Graph App On Microsoft Azure Active Directory under Monitoring Office 365.
You can now proceed to run the Webhooks-based tests.