VoIP:Teams:Resource Management: Difference between revisions
From VTX Public Wiki
(→Number Mapping : Assign numbers to Resource accounts: Use same variable name as in the script) |
|||
Line 60: | Line 60: | ||
# Set Variables |
# Set Variables |
||
$ |
$TeamsDomain = '''"123456.teams.ipvoip.ch"''' |
||
$ |
$TeamsResourceEmail = "'''resourceX@MSDOMAIN.onmicrosoft.com'''" |
||
$ |
$TeamsResourceNumber = '''"+41215661234"''' |
||
# Connect to Microsoft Teams management and assign number and profile to the user |
# Connect to Microsoft Teams management and assign number and profile to the user |
||
$Session = New-CsOnlineSession |
$Session = New-CsOnlineSession |
||
Import-PSSession $Session -AllowClobber |
Import-PSSession $Session -AllowClobber |
||
# Assign a number to your resource |
# Assign a number to your resource |
||
Set-CsOnlineApplicationInstance -Identity $ |
Set-CsOnlineApplicationInstance -Identity $TeamsResourceEmail -OnpremPhoneNumber $TeamsResourceNumber |
||
# Assign a Voice Routing Policy to your resource to allow it to call out towards external numbers |
# Assign a Voice Routing Policy to your resource to allow it to call out towards external numbers |
||
Get-CsOnlineUser -Identity $ |
Get-CsOnlineUser -Identity $TeamsResourceEmail | Grant-CsOnlineVoiceRoutingPolicy -PolicyName "CsOnlineVoiceRoutingPolicy-$TeamsDomain" |
||
# Wait 60s for settings to be applied |
# Wait 60s for settings to be applied |
||
Sleep -s 60 |
Sleep -s 60 |
||
# Verify Your setup |
# Verify Your setup |
||
Get-CsOnlineApplicationInstance -Identity $ |
Get-CsOnlineApplicationInstance -Identity $TeamsResourceEmail |
||
Get-CsOnlineUser -Identity $ |
Get-CsOnlineUser -Identity $TeamsResourceEmail | Select sipaddress,EnterpriseVoiceEnabled,OnPremLineURI,OnlineVoiceRoutingPolicy | Format-List |
||
# Logout |
# Logout |
||
Get-PSSession | Remove-PSSession |
Get-PSSession | Remove-PSSession |
Revision as of 10:08, 16 December 2020
Create and Manage Call Queues[edit | edit source]
- Problematic: You would like to create a Call Queue that will play some greetings and then ring on several phones in parallel / serial modes
- Solution : Follow procedure below
- Connect to https://admin.teams.microsoft.com/call-queues
- Follow documentation in https://docs.microsoft.com/en-us/microsoftteams/create-a-phone-system-call-queue
- Add a "Microsoft Teams" and "Microsoft 365 Phone System - Virtual User" license to your user
- Assign a number in the corresponding resource in next sections
Create and Manage Auto Attendants[edit | edit source]
- Problematic: You would like to create an auto Attendant that can answer your call, play accouncement, and route calls using Time Conditions (inclusing Holidays) or IVR system
- Solution : Follow procedure below
- Connect to https://admin.teams.microsoft.com/auto-attendants
- Follow documentation in https://docs.microsoft.com/en-us/microsoftteams/create-a-phone-system-auto-attendant
- Add a "Microsoft Teams" and "Microsoft 365 Phone System - Virtual User" license to your user
- Assign a number in the corresponding resource in next sections
Create Resource accounts[edit | edit source]
- Problematic: You would like to create a resource that will be linked to a Call Queue or Auto Attendent and assign it with a Phone Number
- Solution : Follow procedure below
- Connect to https://admin.teams.microsoft.com/company-wide-settings/resource-accounts
- Follow documentation in https://docs.microsoft.com/en-us/microsoftteams/manage-resource-accounts#create-a-resource-account-in-the-microsoft-teams-admin-center
Number Mapping : Assign numbers to Resource accounts[edit | edit source]
Assign Resource numbers using a VTX Powershell Script VTX_Connect_Teams_Assign_Resource_Numbers.ps1[edit | edit source]
Script VTX_Connect_Teams_Assign_Resource_Numbers.ps1 is not available yet, please use the powershell commands below |
Or Assign Resource numbers manually in Powershell Command Prompt[edit | edit source]
- Open a powershell prompt on your PC
- Copy paste command below one by one changing the values in bold with your own
# Set Variables $TeamsDomain = "123456.teams.ipvoip.ch" $TeamsResourceEmail = "resourceX@MSDOMAIN.onmicrosoft.com" $TeamsResourceNumber = "+41215661234" # Connect to Microsoft Teams management and assign number and profile to the user $Session = New-CsOnlineSession Import-PSSession $Session -AllowClobber # Assign a number to your resource Set-CsOnlineApplicationInstance -Identity $TeamsResourceEmail -OnpremPhoneNumber $TeamsResourceNumber # Assign a Voice Routing Policy to your resource to allow it to call out towards external numbers Get-CsOnlineUser -Identity $TeamsResourceEmail | Grant-CsOnlineVoiceRoutingPolicy -PolicyName "CsOnlineVoiceRoutingPolicy-$TeamsDomain" # Wait 60s for settings to be applied Sleep -s 60 # Verify Your setup Get-CsOnlineApplicationInstance -Identity $TeamsResourceEmail Get-CsOnlineUser -Identity $TeamsResourceEmail | Select sipaddress,EnterpriseVoiceEnabled,OnPremLineURI,OnlineVoiceRoutingPolicy | Format-List # Logout Get-PSSession | Remove-PSSession