Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional fields for Teams Call Queues #5070

Open
wants to merge 3 commits into
base: Dev
Choose a base branch
from

Conversation

matthewmgamble
Copy link

Pull Request (PR) description

This PR introduces several new fields to the export of Teams Call Queues in the Microsoft365 DSC project. These changes enhance the customization and detail provided during the export, particularly around call queue handling, voicemail prompts, and redirection actions.

Added Fields:

•	Boolean
•	EnableOverflowSharedVoicemailSystemPromptSuppression
•	EnableTimeoutSharedVoicemailSystemPromptSuppression
•	String
•	NoAgentAction – Accepted values: {“Queue”, “Forward”, “Disconnect”, “ForwardVoicemail”, “SharedVoicemail”}
•	NoAgentActionTarget
•	NoAgentSharedVoicemailTextToSpeechPrompt
•	NoAgentSharedVoicemailAudioFilePrompt
•	OverflowRedirectPersonAudioFilePromptFileName
•	OverflowRedirectVoiceAppAudioFilePromptFileName
•	OverflowRedirectPhoneNumberAudioFilePromptFileName
•	OverflowRedirectVoicemailAudioFilePromptFileName
•	TimeoutSharedVoicemailAudioFilePromptFileName
•	TimeoutDisconnectAudioFilePromptFileName
•	TimeoutRedirectPersonAudioFilePromptFileName
•	TimeoutRedirectVoiceAppAudioFilePromptFileName
•	TimeoutRedirectVoicemailAudioFilePromptFileName
•	MusicOnHoldFileName
•	NoAgentSharedVoicemailAudioFilePromptFileName
•	WelcomeTextToSpeechPrompt
•	WelcomeMusicFileName

Purpose

The inclusion of these fields aims to provide users with greater flexibility and control over their Teams Call Queue configurations. This is particularly useful in scenarios requiring customized voicemail prompts, redirection actions, and specific handling behaviors when no agents are available.

This Pull Request (PR) fixes the following issues

None

@matthewmgamble
Copy link
Author

@microsoft-github-policy-service agree

Copy link
Collaborator

@NikCharlebois NikCharlebois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Please add an entry in the changelog.

Copy link
Member

@ykuijs ykuijs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the schema the description of several new parameters show that they rely on the value of another parameter, for example the NoAgentActionTarget parameter relies on the value of NoAgentAction:

[Write, Description("The NoAgentActionTarget represents represents the target of the no agent action. If the NoAgentAction is set to Forward, this parameter must be set to a Guid or a telephone number with a mandatory 'tel:' prefix. If the NoAgentAction is set to SharedVoicemail, this parameter must be set to a group ID (Microsoft 365, Distribution list, or Mail-enabled security). Otherwise, this field is optional.")] String NoAgentActionTarget;

Please make sure you implement checks to the Get and Set methods to make sure these requirements are valid. In the Get you can return a Verbose message, so the discrepancy is logged. In the Set method, you should also throw an exception like this:

New-M365DSCLogEntry -Message 'Error retrieving data:' `
-Exception $_ `
-Source $($MyInvocation.MyCommand.Source) `
-TenantId $TenantId `
-Credential $Credential
throw $_

[Write, Description("The MusicOnHoldFileContent parameter represents music to play when callers are placed on hold. This is the unique identifier of the audio file. This parameter is required if the UseDefaultMusicOnHold parameter is not specified.")] String MusicOnHoldAudioFileId;
[Write, Description("The NoAgentAction parameter designates the action toto take if the no agents condition is reached. The NoAgentAction property must be set to one of the following values: Queue, Disconnect, Forward, Voicemail, and SharedVoicemail. The default value is Queue."), ValueMap{"Queue","Forward","Disconnect","Forward","Voicemail","SharedVoicemail"},Values{"Queue","Forward","Disconnect","Forward","Voicemail","SharedVoicemail"}] String NoAgentAction;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change "action toto take" to "action to take" (one "to" too many)

And Forward is in the ValueMap and Values list twice. Please remove one entry.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the PR title I see that the 2nd Forward probably should be combined with the Voicemail string that is immediately behind it, so ForwardVoicemail instead of Forward, Voicemail.

@@ -20,32 +30,46 @@ class MSFT_TeamsCallQueue : OMI_BaseResource
[Write, Description("The Users parameter lets you add agents to the Call Queue. This parameter expects a list of user unique identifiers (GUID).")] String Users[];
[Write, Description("The LanguageId parameter indicates the language that is used to play shared voicemail prompts. This parameter becomes a required parameter If either OverflowAction or TimeoutAction is set to SharedVoicemail. You can query the supported languages using the Get-CsAutoAttendantSupportedLanguage cmdlet.")] String LanguageId;
[Write, Description("The OboResourceAccountIds parameter lets you add resource account with phone number to the Call Queue. The agents in the Call Queue will be able to make outbound calls using the phone number on the resource accounts. This is a list of resource account GUIDs. Only Call Queue managed by a Teams Channel will be able to use this feature.")] String OboResourceAccountIds[];
[Write, Description("The WelcomeMusicFileName parameter indicates the unique identifier for the Audio file prompt which is played to the caller when entering the queue")] String WelcomeMusicFileName;
[Write, Description("The WelcomeTextToSpeechPrompt parameter indicates the Text-to-Speech (TTS) prompt which is played to the caller when entering the queue)] String WelcomeTextToSpeechPrompt;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Description field is missing a closing quote. This is causing the unit tests to fail.

[Write, Description("The OverflowRedirectPersonTextToSpeechPrompt parameter indicates the Text-to-Speech (TTS) prompt which is played to the caller when being redirected to a person in the organization due to overflow.")] String OverflowRedirectPersonTextToSpeechPrompt;
[Write, Description("The OverflowRedirectPersonAudioFilePrompt parameter indicates the unique identifier for the Audio file prompt which is played to the caller when being redirected to a person in the organization due to overflow.")] String OverflowRedirectPersonAudioFilePrompt;
[Write, Description("The OverflowRedirectVoiceAppsTextToSpeechPrompt parameter indicates the Text-to-Speech (TTS) prompt which is played to the caller when being redirected to a voice application due to overflow.")] String OverflowRedirectVoiceAppTextToSpeechPrompt;
[Write, Description("The OverflowRedirectVoiceAppAudioFilePrompt parameter indicates the unique identifier for the Audio file prompt which is played to the caller when being redirected to a voice application due to overflow.")] String OverflowRedirectVoiceAppAudioFilePrompt;
[Write, Description("The OverflowRedirectPhoneNumberTextToSpeechPrompt parameter indicates the Text-to-Speech (TTS) prompt which is played to the caller when being redirected to an external PSTN phone number due to overflow.")] String OverflowRedirectPhoneNumberTextToSpeechPrompt;
[Write, Description("The OverflowRedirectPhoneNumberAudioFilePrompt parameter indicates the unique identifier for the Audio file prompt which is played to the caller when being redirected to an external PSTN phone number due to overflow.")] String OverflowRedirectPhoneNumberAudioFilePrompt;
[Write, Description("The OverflowRedirectPhoneNumberAudioFilePromptFileName parameter indicates the name of the Audio file prompt which is played to the caller when being redirected to an external PSTN phone number due to overflow.)] String OverflowRedirectPhoneNumberAudioFilePromptFileName;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Description field is missing a closing quote. This is causing the unit tests to fail.

[Write, Description("The OverflowRedirectVoicemailTextToSpeechPrompt parameter indicates the Text-to-Speech (TTS) prompt which is played to the caller when being redirected to a person's voicemail due to overflow.")] String OverflowSharedVoicemailTextToSpeechPrompt;
[Write, Description("The OverflowSharedVoicemailAudioFilePrompt parameter indicates the unique identifier for the Audio file prompt which is to be played as a greeting to the caller when transferred to shared voicemail on overflow. This parameter becomes a required parameter when OverflowAction is SharedVoicemail and OverflowSharedVoicemailTextToSpeechPrompt is null.")] String OverflowSharedVoicemailAudioFilePrompt;
[Write, Description("The EnableOverflowSharedVoicemailTranscription parameter is used to turn on transcription for voicemails left by a caller on overflow. This parameter is only applicable when OverflowAction is set to SharedVoicemail.")] Boolean EnableOverflowSharedVoicemailTranscription;
[Write, Description("The EnableOverflowSharedVoicemailSystemPromptSuppression parameter is used to turn off the default voicemail system prompts. This parameter is only applicable when OverflowAction is set to SharedVoicemail.)] Boolean EnableOverflowSharedVoicemailSystemPromptSuppression;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Description field is missing a closing quote. This is causing the unit tests to fail.

[Write, Description("The TimeoutRedirectPersonTextToSpeechPrompt parameter indicates the Text-to-Speech (TTS) prompt which is played to the caller when being redirected to a person in the organization due to timeout.")] String TimeoutRedirectPersonTextToSpeechPrompt;
[Write, Description("The TimeoutRedirectPersonAudioFilePrompt parameter indicates the unique identifier for the Audio file prompt which is played to the caller when being redirected to a person in the organization due to timeout.")] String TimeoutRedirectPersonAudioFilePrompt;
[Write, Description("The TimeoutRedirectPersonAudioFilePromptFileName parameter indicates the file name for the Audio file prompt which is played to the caller when being redirected to a person in the organization due to timeout.)] String TimeoutRedirectPersonAudioFilePromptFileName;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Description field is missing a closing quote. This is causing the unit tests to fail.

[Write, Description("The TimeoutRedirectVoiceAppsTextToSpeechPrompt parameter indicates the Text-to-Speech (TTS) prompt which is played to the caller when being redirected to a voice application due to timeout.")] String TimeoutRedirectVoiceAppTextToSpeechPrompt;
[Write, Description("The TimeoutRedirectVoiceAppAudioFilePrompt parameter indicates the unique identifier for the Audio file prompt which is played to the caller when being redirected to a voice application due to timeout.")] String TimeoutRedirectVoiceAppAudioFilePrompt;
[Write, Description("The TimeoutRedirectVoiceAppAudioFilePromptFileName parameter indicates the file name for the Audio file prompt which is played to the caller when being redirected to a voice application due to timeout)] String TimeoutRedirectVoiceAppAudioFilePromptFileName;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Description field is missing a closing quote. This is causing the unit tests to fail.

[Write, Description("The TimeoutSharedVoicemailAudioFilePrompt parameter indicates the unique identifier for the Audio file prompt which is to be played as a greeting to the caller when transferred to shared voicemail on timeout. This parameter becomes a required parameter when TimeoutAction is SharedVoicemail and TimeoutSharedVoicemailTextToSpeechPrompt is null.")] String TimeoutSharedVoicemailAudioFilePrompt;
[Write, Description("The EnableTimeoutSharedVoicemailTranscription parameter is used to turn on transcription for voicemails left by a caller on timeout. This parameter is only applicable when TimeoutAction is set to SharedVoicemail.")] Boolean EnableTimeoutSharedVoicemailTranscription;
[Write, Description("The EnableTimeoutSharedVoicemailSystemPromptSuppression parameter is used to turn off the default voicemail system prompts. This parameter is only applicable when OverflowAction is set to SharedVoicemail.)] Boolean EnableTimeoutSharedVoicemailSystemPromptSuppression;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Description field is missing a closing quote. This is causing the unit tests to fail.

@@ -52,10 +52,44 @@ function Get-TargetResource
[System.String]
$TimeoutAction,

[Parameter()]
[ValidateSet("Queue","Forward","Disconnect","Forward","Voicemail","SharedVoicemail")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forward is in this list twice. Please correct, also for the other methods.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the PR title I see that the 2nd Forward probably should be combined with the Voicemail string that is immediately behind it, so ForwardVoicemail instead of Forward, Voicemail.

[Parameter()]
[ValidateSet("Queue","Forward","Disconnect","Forward","Voicemail","SharedVoicemail")]
[System.String]
$NoAgentAction,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The schema shows 22 new parameters, but the Get/Set/Test methods only show 10 new parameters. Please make sure the parameter in the schema matches the parameters in the *-TargetResource functions.

@ykuijs
Copy link
Member

ykuijs commented Nov 22, 2024

And like Nik mentions, please also add an entry of this change to the changelog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants