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 52: Line 52:
==== Assign Resource numbers using a VTX Powershell Script VTX_Connect_Teams_Assign_Resource_Numbers.ps1 ====
==== Assign Resource numbers using a VTX Powershell Script VTX_Connect_Teams_Assign_Resource_Numbers.ps1 ====



{{Warning|1=Script '''VTX_Connect_Teams_Assign_Resource_Numbers.ps1''' is not available yet, please use the powershell commands below}}
{{Warning|1=By default for security reason, it is not allowed to execute a powershell script downloaded on the internet, that is why you will need to open them with Wordpad to check what it does, save it and execute it afterwards}}

# Download https://wiki.vtx.ch/media/VTX_Connect_Teams_Assign_Resource_Numbers.ps1 on your computer ( Right Click on the link / Download )
# Open it with Wordpad and use Ctrl-s to save it again ( to inform the system that it is local script )
# Execute it on your PC : It will ask you for these parameters and create the routing
## VTX Teams Domain : ex: 123456.teams.ipvoip.ch
## Your MS Admin Credentials for : ex: admin@MSDOMAIN.onmicrosoft.com
## The MS Team resource email : ex: callqueueX@MSDOMAIN.onmicrosoft.com or autoattendantX@MSDOMAIN.onmicrosoft.com
## The Telephone number you wish to set : ex: +41225661234


''Here is a list of screenshots to see how the script works''
<table>
<tr><td>
[[Image:Teams-Resource-Number-Assignment-01.png|thumb|600px|left|Teams Assignment - 1st Warning - Is routing OK ?]]
</td><td>
[[Image:Teams-Resource-Number-Assignment-02.png|thumb|600px|left|Teams Assignment - Enter the Teams Domain Provided by VTX]]
</td></tr>
<tr><td>
[[Image:Teams-Resource-Number-Assignment-03.png|thumb|600px|left|Teams Assignment - Enter Teams Admin email]]
</td><td>
[[Image:Teams-Resource-Number-Assignment-04.png|thumb|600px|left|Teams Assignment - Enter Teams User Email]]
</td></tr>
<tr><td>
[[Image:Teams-Resource-Number-Assignment-05.png|thumb|600px|left|Teams Assignment - Enter Teams User Phone Number]]
</td><td>
</td></tr>
<tr><td>
[[Image:Teams-Resource-Number-Assignment-06.png|thumb|600px|left|Teams Assignment - Setup another user ?]]
</td><td>
[[Image:Teams-Resource-Number-Assignment-07.png|thumb|600px|left|Teams Assignment - List all user setup ?]]
</td></tr>
<tr><td>
[[Image:Teams-Resource-Number-Assignment-08.png|thumb|600px|left|Teams Assignment - 1st Warning - Is routing OK ?]]
</td><td>
</td></tr>
</table>


==== Or Assign Resource numbers manually in Powershell Command Prompt ====
==== Or Assign Resource numbers manually in Powershell Command Prompt ====

Revision as of 10:51, 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
  1. Connect to https://admin.teams.microsoft.com/call-queues
  2. Follow documentation in https://docs.microsoft.com/en-us/microsoftteams/create-a-phone-system-call-queue
  3. Add a "Microsoft Teams" and "Microsoft 365 Phone System - Virtual User" license to your user
  4. Assign a number in the corresponding resource in next sections
Microsoft Teams Admin - Create a Call Queue

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
  1. Connect to https://admin.teams.microsoft.com/auto-attendants
  2. Follow documentation in https://docs.microsoft.com/en-us/microsoftteams/create-a-phone-system-auto-attendant
  3. Add a "Microsoft Teams" and "Microsoft 365 Phone System - Virtual User" license to your user
  4. Assign a number in the corresponding resource in next sections
Microsoft Teams Admin - Create an auto attendant


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
  1. Connect to https://admin.teams.microsoft.com/company-wide-settings/resource-accounts
  2. Follow documentation in https://docs.microsoft.com/en-us/microsoftteams/manage-resource-accounts#create-a-resource-account-in-the-microsoft-teams-admin-center


Microsoft Teams Admin - Create Resources
Microsoft Teams Admin - Assign Licenses

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]

  1. Download https://wiki.vtx.ch/media/VTX_Connect_Teams_Assign_Resource_Numbers.ps1 on your computer ( Right Click on the link / Download )
  2. Open it with Wordpad and use Ctrl-s to save it again ( to inform the system that it is local script )
  3. Execute it on your PC : It will ask you for these parameters and create the routing
    1. VTX Teams Domain : ex: 123456.teams.ipvoip.ch
    2. Your MS Admin Credentials for : ex: admin@MSDOMAIN.onmicrosoft.com
    3. The MS Team resource email : ex: callqueueX@MSDOMAIN.onmicrosoft.com or autoattendantX@MSDOMAIN.onmicrosoft.com
    4. The Telephone number you wish to set : ex: +41225661234


Here is a list of screenshots to see how the script works

Teams Assignment - 1st Warning - Is routing OK ?
Teams Assignment - Enter the Teams Domain Provided by VTX
Teams Assignment - Enter Teams Admin email
Teams Assignment - Enter Teams User Email
Teams Assignment - Enter Teams User Phone Number
Teams Assignment - Setup another user ?
Teams Assignment - List all user setup ?
Teams Assignment - 1st Warning - Is routing OK ?

Or Assign Resource numbers manually in Powershell Command Prompt[edit | edit source]

  1. Open a powershell prompt on your PC
  2. 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