Teams Voice: Powershell: New-CsAutoAttendantCallFlow redirect to CQ (No Menu or disconnect)

Jurgen Verhelst 326 Reputation points

Dear Guru's,

Trying to create an Autoattendant with powershell but one that uses a call flow that redirects to a Call Queue (voice App) instead of one or more menu options, or disconnect

In Teams Admin Portal it looks like this:


Put in powerhell I think it should be in the New-CsAutoAttendantCallFlow cmdlet but I can only use a variable for the name, greeting and menu. no redirect or disconnect as in the portal.

The code I am using is this to get the default call flow in an AA to send a call to a CQ while not in After Hours, but am missing the step how to get the call flow to redirect to the CSAAcallableEntity... Might need something in between but have no clue how and what.

    # Call Flow  
    $greetingPrompt = New-CsAutoAttendantPrompt -TextToSpeechPrompt "Welcome to Contoso!"  
    $CaptainsRoomCQ = (Get-CsOnlineUser -Identity "").ObjectId # one of the application instances associated to the Call Queue  
    $CaptainsRoomCE = New-CsAutoAttendantCallableEntity -Identity $CaptainsRoomCQ -Type applicationendpoint  
    $defaultCallFlow = New-CsAutoAttendantCallFlow -Name "Default call flow" -Greetings @($greetingPrompt) **-Menu $defaultMenu # Not menu but REDIRECT Call to a CallQueue**  
    # Create a new AA with the default call flow set to the Test Call Queue  
    $aa = New-CsAutoAttendant -Name "Test auto attendant 5" -DefaultCallFlow $defaultCallFlow -CallFlows @($afterHoursCallFlowNOTSHOWNHERE) -   
    CallHandlingAssociations @($afterHoursCallHandlingAssociationNOTSHOWNHERE) -LanguageId "en-US" -TimeZoneId "UTC"  
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,545 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sharon Zhao-MSFT 25,081 Reputation points Microsoft Vendor

    @Jurgen Verhelst ,

    It seems no direct way to create a new call flow with no menu. The structure of New-CsAutoAttendantCallFlow indicates this.

    The following script could be the next best thing. It shows how to reference a Call Queue as a menu option.

    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

  2. Rui Manuel de jesus Rodrigues 1 Reputation point

    You can find how to do this on the folloing link...

    0 comments No comments