Setup - Third Party Voice Agents

This article is for IT pros and Teams administrators who want to integrate certified third party voice agent solutions and use them with Teams Phone Agent, Auto Attendant, and Call Queue.

Planning and licensing review

Planning

Licensing

Known issues

  • When a call is transferred from Teams to a third party voice agent, and the voice agent tries to conference or transfer an external phone number, the call will fail.

What's new for third party voice agents in the past six months

  • June 15
    • Generally available

Steps to create a third party voice agent for Teams Phone Agent, Auto Attendant, or Call Queue

The Teams portion of the third party voice agent configuration is currently available through PowerShell only.

The following Azure resources are also required:

  1. Obtain the Azure application identifer for the voice agent
  2. Create and license a new resource account that links to the Azure application
$raVA = New-CsOnlineApplicationInstance -UserPrincipalName <contoso_user@contoso.com> -DisplayName "<Name of Resource Account>" -ApplicationID "<3rd Party Voice Agent Application ID>"

# Set the Resource Account’s Location
Update-MgUser -UserId $raVA.ObjectId -UsageLocation <Location (i.e. US)>

# Assign the Microsoft Teams Phone Resource Account license to the Resource Account
$skuID = (Get-MgSubscribedSKU | Where {$_.SkuPartNumber -eq "PHONESYSTEM_VIRTUALUSER"}).SkuId 
Set-MgUserLicense -UserId $raVA.Identity -AddLicenses @{SkuId = $skuID} -RemoveLicenses @()

Example 1 - Via an auto attendant

Create an auto attendant
$aaDefaultGreetingText = "<Greeting>"

$aaDefaultGreetingPrompt = New-CsAutoAttendantPrompt -TextToSpeechPrompt $aaDefaultGreetingText 

$aaDefaultMenuPromptText = "<For the voice agent, press 1>"

$aaDefaultMenuPromptPrompt = New-CsAutoAttendantPrompt -TextToSpeechPrompt $aaDefaultMenuPromptText

$aaDefaultMenuOpt1CE = New-CsAutoAttendantCallableEntity -Type ApplicationEndpoint -Identity $raVA.Identity

$aaDefaultMenuOpt1 = New-CsAutoAttendantMenuOption -Action TransferCallToTarget -CallTarget $aaDefaultMenuOpt1CE -DtmfResponse Tone1 -VoiceResponses "<Voice Agent>"

$aaDefaultMenu = New-CsAutoAttendantMenu -Name "Default Open Menu" -MenuOptions @($aaDefaultMenuOpt1) -Prompt @($aaDefaultMenuPromptPrompt)

$aaDefaultMenuCallFlow = New-CsAutoAttendantCallFlow -Name "Default Open Call Flow" -menu $aaDefaultMenu -Greetings @($aaDefaultGreetingPrompt)

$aaAA = New-CsAutoAttendant -Name "<Name>" -LanguageId <Language ID> -TimeZoneId "<Insert your Time Zone ID>" -DefaultCallFlow $aaDefaultMenuCallFlow 

Perform the following steps in the Teams Admin Center:

  1. Create a resource account
  2. License the resource account
  3. Assign the resource account to the auto attendant
  4. Optionally, assign a phone number to the resource account