Integrating Voice AI with a CTI system
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.
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:
- The CTI system sends a REST request to the Pega server to alert an incoming call to a sales representative.
- The Pega server notifies the agent desktop of the incoming call by using a notification channel, and a screen pop displays.
- 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:
- 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.
- Update the JavaScript function that is subscribed to the notification to invoke
the
pega.cs.voiceai.startCall
function with the following parameters:- sessionID
- channelId
- accessToken
- isolationId
- languageModel
- speechModel
- operatorId
- recordOnlyMode
- callTransfer
- routerURL
- 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:- sessionID
- callTransfer
Previous topic Creating training data Next topic Installing the Voice AI desktop app