JavaScript Customer Interaction Services Package

< Back to Package Overview

WebRTC Enabled Agents


Fetch configuration for the Agent from UAC, passing agent's authHandle (from the JWT SSO Token) as a parameter. Initiate the Communication Services package with call and service gateway configuration properties if 'configuration.isWebRTC' is true.

clientSession.getConfiguration(tokenData.authHandle).then(function(data) {
    var loadedConfig = data.configuration;

    if (loadedConfig.isWebRTC) {
        // To configure the Communication Services package to handle a WebRTC enabled agent with Avaya Aura Web Gateway, use the following configuration
        var cpConfig = new AvayaCustomerServices.Config.CPConfiguration({
            callUserConfiguration: {
              incomingCall: true,
              videoEnabled: true,
              videoMaxBandwidthAnyNetwork: 1024
            sgConfiguration: {
              enabled: true,
              authToken: tokenData.jwt,
              networkConfiguration: {
                hostName: loadedConfig.aawgFQDN,
                isSecure: true
            logger: console

        clientSession.setConfig({ cpConfiguration: cpConfig });


If the agent will be WebRTC enabled, a user must first be registered with the Communication Services package before activating with UAC:

// Event listener called on successful user registration (Communication Services package)
clientSession.addOnUserRegistrationSuccessfulCallback(function() {

// Event listener called on failed user registration (Communication Services package)
clientSession.addOnUserRegistrationFailedCallback(function (error) {

// And then start the client session (creates Communication Services package user and initiates atmosphere session)

Your feedback has been successfully submitted.

There was a problem submitting your feedback. Please contact your product support representative.

Page Feedback