Rule description
This rule assigns Direct Routing telephone numbers and voice routing policies to an Active Directory user (hybrid) when Teams Voice Settings web action is performed for him and Direct Routing > Next Free in Range option is selected.
An instance of the rule is automatically created during installation under the HOME > RULES > WebAdmin Rules (Pre-configured) folder. This instance is linked to the Teams Voice Settings web action as a post-action rule in the Rules to run after section.
When to use this rule
Typically you do not need to create an instance of this rule, as it is automatically created during installation and linked to the Teams Voice Settings web action. The rule is executed when you perform Teams Voice Settings web action for a selected user and use the Direct Routing > Next Free in Range option.
The rule makes use of the following three CSV files :
- Phone ranges - specifies your phone number ranges, possible extensions, corresponding locations, and other attributes;
- Reserved numbers - specifies phone numbers that are reserved and cannot be assigned to users;
- Mapping settings - specifies mapping settings between Active Directory users and data in CSV files.
You can use the template CSV file provided with the rule, or create a file in Microsoft Excel and export as CSV.
Rule Settings
Query Section
Setting name | Description |
---|---|
Use previous provision rule results instead of AD query results | When using this rule in a runbook, set this rule to use the result set of a previously supported rule in that runbook. |
Limit scope to this domain or OU |
This setting defines the search query scope.
|
AD query criteria |
Query criteria are sent with the query and may improve query performance. Note: As this rule is run as post-rule, by default query scope is ObjectGUID of User Created in Web UI.
|
Filter AD query results |
To hide unwanted data based on criteria set the filtering conditions here. |
Phone Number Ranges |
|
Phone ranges data source |
Specifies the CSV file where ranges data are defined. The […] button allows browsing for the file and the Create/Edit button allows the creation or editing of the existing file in the built-in Data Source editor. Note: Cayosoft does not keep data on actual number assignments. The assigned numbers are queried each time the rule runs on the live Microsoft 365 system by using the ranges defined in this file.
|
Separator used in file |
Specify the separator used in the file: comma or semi-colon. |
Range Start Range End |
You should specify the number format in the range start and range end columns and select these columns here. The number should be in standard E.164 format like +123456789. Note: If one number is used by multiple people with different extensions, you can use the following format: Range start = +12346789;ext=10, Range end = +12346789;ext=100. In this case, the base number must be identical for each range. If you are using the last X digits of a number to set the extension, this is a different scenario; use the setting defined in the action section below
|
Ignore assigned extension |
When set to Yes, the currently assigned extension will be ignored for matching the assigned number with the range. |
Range anchor property |
Select the column that will be used for matching the range with the user when the rule runs. You can use any column in your file, but the default scenario would be to search by location. If multiple ranges are matched by the search property, the first range with free numbers is used. |
Filter CSV data |
The filter can be used to filter by the values in the CSV file columns like {$_.ColumnName -eq 'value'} |
Reserved Numbers |
|
Reserved numbers data source |
In this CSV file, you should specify reserved numbers that can't be assigned to users in the rule scope. These numbers are always considered as assigned. Used to define numbers that cannot be queried in Microsoft 365, like those assigned to analog devices |
Reserved number |
Select the column in the data source that contains reserved telephone numbers. |
Map Settings from File |
|
Data source |
Specifies the CSV file to be used for mapping the Active directory users. The […] button allows browsing for the file and the Create/Edit button allows the creation or editing of the existing file in the built-in Data Source editor. |
Separator used in file |
Specify the separator used in the file: comma or semi-colon. |
Data source anchor attribute |
Defines the column in the Data Source that will be used to find existent users in Active Directory. This value is compared to the Active Directory Anchor Attribute. |
Active Directory anchor attribute |
Defines the attribute in the Active Directory to which the Data Source anchor attribute is to be compared. |
Filter CSV data |
The filter can be used to filter by the values in the CSV file columns like {$_.ColumnName -eq 'value'} |
Users with anchor not found in the file |
You can select what users should be moved: those whose anchor is not found in the CSV file or only those whose anchor is found in the CSV file. |
More Options |
|
Returned Properties |
To display additional properties for each object found by the query, add those properties to the list. |
Sort by |
Sort result objects list. |
Exclude disabled AD users |
Specify if disabled AD user accounts should be excluded. |
Maximum number of users |
By default, all objects that you have provisioned in Microsoft Office 365 are returned. Tip: It is possible to change the default value in Microsoft Skype Server extension settings.
|
Post filter |
In this filter, you can use both Active Directory attributes and column names from the CSV file. Column names you should type manually. |
Initialization Script |
|
Script |
Usually, rules use query criteria to limit the query search scope. It improves the performance of the executed rule. Due to PowerShell limitations, it is not possible to use calculated expressions in query criteria. That is the point where the initialization script can help. You can initialize a global variable in this setting and then use it in query criteria. Important: To use a variable, declared in the initialization script, in the query scope, it must be global: $global:<variable name>.
Example: Update AD users, created in the last ten days.
{$global:DatePeriod = (Get-Date).AddDays(-10)}
|
Action Section
Setting name | Description |
---|---|
Telephone number | By default, will search for the next available number in the range matched to the value defined in the Math range by the property setting below. |
Override existing number |
If set to No, the rule will check if a user already has a number and skip a user if it has it. If set to Yes, the rule will override the existing number if a user has it. |
Match range by property |
This is the property in the mapping file that will be matched with the Range anchor property in the phone number ranges file. Tip: the user is matched by the AD anchor attribute to a row in the mapping file, this row contains a value for the selected match range property column. This value is used to search inside the range file by way of the 'Range anchor property' selected in the Query section above
|
Voice routing policy | If you need to apply a voice routing policy, you can click "..." select it from the list or select the corresponding column from the mapping file. |
Extension |
To set the extension, you can take 2-6 last digits from the assigned number. Note: If your extensions are defined as a range over a single number, set them in the phone ranges file. When extensions are set in the ranges file, this setting will be ignored. If you use both types of extensions, create two different rule instances to cover both scenarios.
|
Write number to AD attributes |
You can specify the Active Directory string attribute in which the number assigned to a user will also be written. |
Enable Enterprise Voice | Specify if the user should be enabled for Enterprise Voice, which is the Microsoft implementation of Voice over Internet Protocol (VoIP). With Enterprise Voice, users can make telephone calls using the Internet rather than using the standard telephone network. |
Phone System license | A phone system is required for all enterprise voice users. Select one of the licenses listed in the field, type an SKU ID directly or select a column from the mapping file if the license assignment is mapped. |
Other licenses |
You can specify the ID of additional licenses that also should be assigned. If Separator used in file set to a comma then licenses IDs must be separated by a semi-colon. If the separator is set to semi-colon then license IDs must be separated by a comma. |
Verify license prerequisites |
A user must be licensed for Skype for Business Online and Teams to assign a Phone System and Calling Plan add-on. Setting to 'No' will attempt to assign the Phone System and other licenses in this section without verifying the prerequisites. Use 'No' if you plan to assign licenses that include all required services, such as E5 licenses. Note: If a user has an extra license, because of which the number cannot be assigned, or, on the contrary, does not have the required license, you will see the same error message in both cases: "User lacks appropriate licenses to assign a 'DirectRouting' number".
|
License delay (seconds) | Allow time for the license assignment to be complete. |
Output Section
This section defines the output format of this rule.
To get more information about this section, please see the Output section article.
Enforce/Schedule section
This section defines the schedule for how often to run the rule.
To get more information about this section, please see the Enforce/Schedule section article.
Change History
Version | Notes |
---|---|
9.4.0 | The Assign Teams only mode setting has been removed. |
9.3.0 | Enable Hosted Voicemail setting was removed. |
8.4.0 | The rule is introduced in the product. |
Comments
0 comments
Article is closed for comments.