Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Integrating Voice AI with a CTI system

Updated on May 10, 2021

Voice AI automatically supports all out-of-the-box computer telephony integrations (CTI) that are available with Pega Call. No action is required by you if you are using a standard CTI integration. However, if you use a custom CTI integration, you must implement a mechanism to notify the Voice AI desktop app of call connections and disconnections.

Pega Sales Automation Implementation Guide

For more information about CTI integration, see the Pega Call Implementation Guide.

Custom CTI integration example

Pega Sales Automation can integrate with an external CTI system in various ways. The following example describes one possible method by which a CTI system can route calls to an agent desktop with Voice AI features integrated:

  1. The CTI system sends a REST request to the Pega server to alert an incoming call to a sales representative.
  2. The Pega server notifies the agent desktop of the incoming call by using a notification channel, and a screen pop displays.
  3. A JavaScript action invokes the function for the Voice AI desktop app to capture the audio.

To implement a customization that works in this way, make the following changes:

Note: As indicated below, changes to some of the properties require the use of the Expression Builder. Click the settings icon for the property to open the Expression Builder, and then browse to the corresponding properties under ConfigurationsVoice AI to build the property values. For more information about using the Expression Builder, see Building expressions with the Expression Builder.

  1. Update the REST service activity with the following properties before invoking the notification channel:
    .AISessionID
    Use the @Utilities.pxGetNewGUID() function to generate a GUIDV4 string.
    .AIChannelID
    Use the Voice AI Channel ID setting in the Voice AI configuration set.
    Use the Expression Builder to build this property value.
    .AIIsolationID
    Use the Isolation ID setting of the Voice AI configuration set.
    Use the Expression Builder to build this property value.
    .AILanguageModel
    Use the Language Model setting of the Voice AI configuration set.
    Use the Expression Builder to build this property value.
    .AISpeechModel
    Use the Speech Model setting of the Voice AI configuration set.
    Use the Expression Builder to build this property value.
    .AIRecordOnlyMode
    Use the VAD Record Only Mode setting of the Voice AI configuration set.
    Use the Expression Builder to build this property value.
    .AIAccessToken
    Populate this parameter by calling the RetrieveAccessToken activity on the current primary page.
    OperatorID
    Enter the ID of the operator to whom the notification is sent.
    RouterURL
    Use the RetrieveAudioRouterURL data transform to populate the Voice AI transcript URL on the current primary page.
  2. Update the JavaScript function that is subscribed to the notification to invoke the pega.cs.voiceai.startCall function with the following parameters:
    1. sessionID
    2. channelId
    3. accessToken
    4. isolationId
    5. languageModel
    6. speechModel
    7. operatorId
    8. recordOnlyMode
    9. callTransfer
      Note: As of Pega Sales Automation version 8.7, the callTransfer parameter is a placeholder for future implementation. For now, set this parameter to null or "".
    10. routerURL
  3. Ensure that Voice AI desktop app stops capturing the audio when the call disconnects by invoking the Pega.cs.voiceai.endcall function with the following parameters:
    1. sessionID
    2. callTransfer
      Note: As of Pega Sales Automation version 8.7, the callTransfer parameter is a placeholder for future implementation. For now, set this parameter to null or "".

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us