New-CsOrganizationalAutoAttendant

Use the New-CsOrganizationalAutoAttendant cmdlet to create a new Organizational Auto Attendant (OAA).

Syntax

New-CsOrganizationalAutoAttendant
   [-DefaultCallFlow <Object>]
   [-LanguageId <Object>]
   [-LineUris <Object>]
   [-Name <Object>]
   [-ApplicationId <Object>]
   [-BypassDualWrite <Object>]
   [-CallbackUri <Object>]
   [-CallFlows <Object>]
   [-CallHandlingAssociations <Object>]
   [-ClientAudience <Object>]
   [-Domain <Object>]
   [-DomainController <Object>]
   [-EnableVoiceResponse]
   [-Force]
   [-Operator <Object>]
   [-Ring <Object>]
   [-Schedules <Object>]
   [-Tenant <Object>]
   [-TimeZoneId <Object>]
   [-VoiceId <Object>]
   [-AsJob]
   [-ExclusionScope <Object>]
   [-InclusionScope <Object>]
   [<CommonParameters>]

Description

OAAs are a key element in the Cloud PBX application. Each OAA is associated with a phone number that allows callers to reach specific people in the organization through a directory lookup. Alternatively, it can route the calls to an operator, a user, another OAA, or a call queue.

You can create new OAAs by using the New-CsOrganizationalAutoAttendant cmdlet; each newly created OAA gets assigned a random Primary (SIP) URI that serves as the identity of the OAA.

NOTE

Examples

-------------------------- Example 1 --------------------------

$lineUri = [System.Uri] "tel:+11098765432"

$operatorUri = "sip:operator@contoso.com"
$operatorEntity = New-CsOrganizationalAutoAttendantCallableEntity -Identity $operatorUri -Type User

$greetingPrompt = New-CsOrganizationalAutoAttendantPrompt -TextToSpeechPrompt "Welcome to Contoso!"
$menuOptionZero = New-CsOrganizationalAutoAttendantMenuOption -Action TransferCallToOperator -DtmfResponse Tone0
$menuPrompt = New-CsOrganizationalAutoAttendantPrompt -TextToSpeechPrompt "To reach your party by name, enter it now, followed by the pound sign or press 0 to reach the operator."
$defaultMenu=New-CsOrganizationalAutoAttendantMenu -Name "Default menu" -Prompts @($menuPrompt) -EnableDialByName -MenuOptions @($menuOptionZero)
$defaultCallFlow = New-CsOrganizationalAutoAttendantCallFlow -Name "Default call flow" -Menu $defaultMenu -Greetings @($greetingPrompt)

$afterHoursGreetingPrompt = New-CsOrganizationalAutoAttendantPrompt -TextToSpeechPrompt "Welcome to Contoso! Unfortunately, you have reached us outside of our business hours. We value your call please call us back Monday to Friday, between 9 A.M. to 12 P.M. and 1 P.M. to 5 P.M. Goodbye!"
$automaticMenuOption = New-CsOrganizationalAutoAttendantMenuOption -Action Disconnect -DtmfResponse Automatic 
$afterHoursMenu=New-CsOrganizationalAutoAttendantMenu -Name "After Hours menu" -MenuOptions @($automaticMenuOption)
$afterHoursCallFlow = New-CsOrganizationalAutoAttendantCallFlow -Name "Default call flow" -Menu $afterHoursMenu -Greetings @($afterHoursGreetingPrompt)

$timerange1 = New-CsOnlineTimeRange -Start 09:00 -end 12:00
$timerange2 = New-CsOnlineTimeRange -Start 13:00 -end 17:00
$afterHoursSchedule = New-CsOnlineSchedule -WeeklyRecurrentSchedule -MondayHours @($timerange1, $timerange2) -TuesdayHours @($timerange1, $timerange2) -WednesdayHours @($timerange1, $timerange2) -ThursdayHours @($timerange1, $timerange2) -FridayHours @($timerange1, $timerange2) -Name "After Hours Schedule" -Complement

$afterHoursCallHandlingAssociation = New-CsOrganizationalAutoAttendantCallHandlingAssociation -Type AfterHours -ScheduleId $afterHoursSchedule.Id -CallFlowId $afterHoursCallFlow.Id

$inclusionScopeGroupIds = @(“4c3053a6-20bf-43df-bf7a-156124168856”)
$inclusionScope = New-CsOrganizationalAutoAttendantDialScope -GroupScope -GroupIds $inclusionScopeGroupIds

$o=New-CsOrganizationalAutoAttendant -Name "Main organizational auto attendant" -LineUris @($lineUri) -DefaultCallFlow $defaultCallFlow -EnableVoiceResponse -Schedules @($afterHoursSchedule) -CallFlows @($afterHoursCallFlow) -CallHandlingAssociations @($afterHoursCallHandlingAssociation) -Language "en-us" -TimeZoneId "UTC" -Operator $operatorEntity  -InclusionScope $inclusionScope

This example creates a new OAA named Main organizational auto attendant that has the following properties:

Optional Parameters

-ApplicationId

PARAMVALUE: Guid

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-AsJob

{{Fill AsJob Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-BypassDualWrite

PARAMVALUE: $true | $false

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-CallFlows

PARAMVALUE: System.Collections.Generic.List

The CallFlows parameter represents call flows, which are required if they are referenced in the CallHandlingAssociations parameter.

You can create CallFlows by using the New-CsOrganizationalAutoAttendantCallFlow cmdlet.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-CallHandlingAssociations

PARAMVALUE: System.Collections.Generic.List

The CallHandlingAssociations parameter represents the call handling associations. The OAA service uses call handling associations to determine which call flow to execute when a specific schedule is in effect.

You can create CallHandlingAssociations by using the New-CsOrganizationalAutoAttendantCallHandlingAssociation cmdlet.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-CallbackUri

PARAMVALUE: Uri

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-ClientAudience

PARAMVALUE: Uri

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-DefaultCallFlow

PARAMVALUE: Microsoft.Rtc.Management.Hosted.OAA.Models.CallFlow

The DefaultCallFlow parameter is the flow to be executed when no other call flow is in effect (for example, during business hours).

You can create the DefaultCallFlow by using the New-CsOrganizationalAutoAttendantCallFlow cmdlet.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-Domain

PARAMVALUE: String

The Domain parameter represents the domain part of the Primary (SIP) URI that is generated for the OAA. The domain name is validated against the list of domains that are configured by the tenant. If not provided, then a domain is randomly chosen for primary URI.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-DomainController

PARAMVALUE: Fqdn

Type:Object
Aliases:DC
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-EnableVoiceResponse

PARAMVALUE: System.Management.Automation.SwitchParameter

The EnableVoiceResponse parameter indicates whether voice response for OAA is enabled.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-ExclusionScope

PARAMVALUE: Microsoft.Rtc.Management.Hosted.OAA.Models.DialScope

Specifies the users to which call transfers are not allowed through directory lookup feature. If not specified, no user in the organization is excluded from directory lookup.

Dial scopes can be created by using the New-CsOrganizationalAutoAttendantDialScope cmdlet.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-Force

PARAMVALUE: SwitchParameter

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-InclusionScope

PARAMVALUE: Microsoft.Rtc.Management.Hosted.OAA.Models.DialScope

Specifies the users to which call transfers are allowed through directory lookup feature. If not specified, all users in the organization can be reached through directory lookup.

Dial scopes can be created by using the New-CsOrganizationalAutoAttendantDialScope cmdlet.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-LanguageId

PARAMVALUE: String

The LanguageId parameter is the language that is used to read text-to-speech (TTS) prompts.

You can query the supported languages using the Get-CsOrganizationalAutoAttendantSupportedLanguage cmdlet.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-LineUris

PARAMVALUE: System.Collections.Generic.List

The LineUris parameter represents PSTN numbers that are assigned to the OAA. PSTN numbers must be your Service number or Toll-free number, because User PSTN Numbers (normal numbers) cannot be added to Auto Attendant. Each Uniform Resource Identifier (URI) must be specified by using the following format: the tel: prefix followed by a plus sign, followed by the country/region calling code, area code, and phone number (using only digits, no blank spaces, periods, or hyphens). For example: -LineUris [System.Uri]"tel:+4255551219".

Note: Only PSTN numbers that are acquired through or migrated to are supported.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-Name

PARAMVALUE: String

The Name parameter is a friendly name that is assigned to the OAA.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-Operator

PARAMVALUE: Microsoft.Rtc.Management.Hosted.OAA.Models.CallableEntity

The Operator parameter represents the SIP address or PSTN number of the operator.

You can create callable entities by using the New-CsOrganizationalAutoAttendantCallableEntity cmdlet.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-Ring

PARAMVALUE: String

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-Schedules

PARAMVALUE: System.Collections.Generic.List

The Schedules parameter reflects schedules that are associated with the OAA. Schedules are required if they are referenced in the CallHandlingAssociations parameter.

You can create schedules by using the New-CsOnlineSchedule cmdlet.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-Tenant

PARAMVALUE: Guid

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-TimeZoneId

PARAMVALUE: String

The TimeZoneId parameter represents the OAA time zone. All schedules are evaluated based on this time zone.

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online
-VoiceId

PARAMVALUE: String

The VoiceId parameter represents the voice that is used to read text-to-speech (TTS) prompts.

You can query the supported voices by using the Get-CsOrganizationalAutoAttendantSupportedLanguage cmdlet. You can determine the default voice for a language by issuing the following command:

$language = Get-CsOrganizationalAutoAttendantSupportedLanguage -Identity "en-US"

$defaultVoice = $language.Voices[0].Gender

Type:Object
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Skype for Business Online

Inputs

None

Outputs

Microsoft.Rtc.Management.OAA.Models.OrgAutoAttendant