VoIP:VTX Teams Connect: Difference between revisions

From VTX Public Wiki

(Update documentation)
Line 53: Line 53:
#'''(Microsoft Visual Studio C++)''': Install '''Microsoft Visual Studio C++ 2019 x64''' using https://support.microsoft.com/fr-ch/help/2977003/the-latest-supported-visual-c-downloads
#'''(Microsoft Visual Studio C++)''': Install '''Microsoft Visual Studio C++ 2019 x64''' using https://support.microsoft.com/fr-ch/help/2977003/the-latest-supported-visual-c-downloads
#'''(SkypeOnlineConnector Powershell Module)'<nowiki/>'' Install ''Windows Powershell Skype for Business Online module'''
#'''(SkypeOnlineConnector Powershell Module)'<nowiki/>'' Install ''Windows Powershell Skype for Business Online module'''
##Follow https://docs.microsoft.com/en-us/SkypeForBusiness/set-up-your-computer-for-windows-powershell/set-up-your-computer-for-windows-powershell
## Follow https://docs.microsoft.com/en-us/SkypeForBusiness/set-up-your-computer-for-windows-powershell/set-up-your-computer-for-windows-powershell
##Install Windows Powershell module '''Skype for Business Online module''': https://www.microsoft.com/en-us/download/details.aspx?id=39366
## Install Windows Powershell module '''Skype for Business Online module''': https://www.microsoft.com/en-us/download/details.aspx?id=39366
#(optional) Allow Powershell Execution on your PC to allow to execute '''.ps1''' powershell script provided from Kiosk


''Command to use if you wish to be able to execute '''.ps1''' Powershell scripts that will be available from VTX Kiosk''
Run this command in Powershell as Admin, cf https://docs.microsoft.com/fr-fr/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-6
<source lang="poweshell">
PS C:\WINDOWS\system32> Get-ExecutionPolicy
Restricted
PS C:\WINDOWS\system32> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose you to the security risks described in the about_Execution_Policies help topic at https:/go.microsoft.com/fwlink/?LinkID=135170.
Do you want to change the execution policy?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y

PS C:\WINDOWS\system32> Get-ExecutionPolicy
RemoteSigned
</source>



''Import SkypeOnlineConnector Powershell module''
''Import SkypeOnlineConnector Powershell module''
Line 94: Line 75:




='''VTX Teams Connect''' Kiosk Management=
=VTX Teams Connect Kiosk Management=


==Link your <SERVICE_NUMBER>.teams.ipvoip.ch Domain between Microsoft and VTX Telephony platform==
==Link your <SERVICE_NUMBER>.teams.ipvoip.ch Domain between Microsoft and VTX Telephony platform==
Line 109: Line 90:


{{Notice|1=You will only need to do this once at service setup, then it is not needed anymore}}
{{Notice|1=You will only need to do this once at service setup, then it is not needed anymore}}
{{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}}

Now you will need to setup a routing plan. You can use one of the following options to do it
* Using a Powershell Script that will ask you questions
* Manually in Powershell
* From Kiosk directly ( NOT AVAILABLE YET )

=== Create Voice Routing using a VTX Powershell Script VTX_Connect_Teams_Create_Routing_Rules.ps1 ===

# Download https://wiki.vtx.ch/media/VTX_Connect_Teams_Create_Routing_Rules.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 Connect Teams Domain : ex: 123456.teams.ipvoip.ch
## Your MS Teams Credentials for : teamsadmin@123456.teams.ipvoip.ch


=== Or Create Voice Routing in Powershell Command Prompt ===

{{Notice|1=If you prefer a manual setup, perform the following actions}}

# Open a powershell prompt on your PC
# Copy paste command below one by one changing the values in bold with your own



# Connect to Microsoft Teams management and create all Voice Routing
$Session = New-CsOnlineSession -Credential (Get-Credential)
Import-PSSession $Session -AllowClobber
Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="CsOnlinePstnUsage-'''623476.teams.ipvoip.ch'''"}
New-CsOnlineVoiceRoute -Identity "CsOnlineVoiceRoute-'''623476.teams.ipvoip.ch'''" -Priority 0 -NumberPattern '^\+\d+' -OnlinePstnGatewayList '''623476.teams.ipvoip.ch''' -OnlinePstnUsages "CsOnlinePstnUsage-'''623476.teams.ipvoip.ch'''"
New-CsOnlineVoiceRoutingPolicy -Identity "CsOnlineVoiceRoutingPolicy-'''623476.teams.ipvoip.ch'''" -OnlinePstnUsages "CsOnlinePstnUsage-'''623476.teams.ipvoip.ch'''"
Set-CsCallingLineIdentity -Identity Global -EnableUserOverride $True
# Verify all setup
Get-CsOnlinePstnUsage
Get-CsOnlineVoiceRoute
Get-CsOnlineVoiceRoutingPolicy
Get-CsCallingLineIdentity
# Logout
Get-PSSession | Remove-PSSession




# Open https://wiki.vtx.ch/media/VTX_Connect_Teams_Create_Routing_Rules.ps1 to see what it does
# Download it ( Right Click on the link / Download )
# Execute it on your PC, it will help you create all needed routing rules


==Number Mapping : Assign numbers to Microsoft accounts==
==Number Mapping : Assign numbers to Microsoft accounts==


Now you will need to assign a number and a routing plan to each user with a "Microsoft 365 Phone System" license. You can use one of the following options to do it
{{Notice|1=Soon you will be able to manage and download this file directly from the Kiosk}}
* Using a Powershell Script that will ask you questions
* Manually in Powershell
* From Kiosk directly ( NOT AVAILABLE YET )


=== Assign numbers using a VTX Powershell Script VTX_Connect_Teams_Assign_Numbers.ps1 ===

{{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_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 Connect Teams Domain : ex: 123456.teams.ipvoip.ch
## Your MS Teams Credentials for : ex: teamsadmin@123456.teams.ipvoip.ch
## The MS Team user email : ex: first.last@company.onmmicrosoft.com
## The Telephone number you wish to set : ex: +41225661234


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

{{Notice|1=If you prefer a manual setup, perform the following actions}}


# Open a powershell prompt on your PC
# Copy paste command below one by one changing the values in bold with your own


#Copy paste the text below and create a VTX_Microsoft_Teams_assign_numbers.ps1 file
#Replace the needed variables in bold
##123456.teams.ipvoip.ch : Replace it with the domain provided to you by VTX in https://kiosk.vtx.ch/VoIP/ManageTeams.aspx
##first.last@MSDOMAIN.onmicrosoft.com : Replace it with the Microsoft account to which you wish to assign a number
##'tel:+41215661234' : Replace it with the number you wish to assign to your account ( it needs to be a number from your VTX Teams Connect account )




# Connect to Microsoft Teams management
# Connect to Microsoft Teams management
$Session = New-CsOnlineSession -UserName teamsadmin@'''123456.teams.ipvoip.ch'''
$Session = New-CsOnlineSession -Credential (Get-Credential)
Import-PSSession $Session -AllowClobber
Import-PSSession $Session -AllowClobber
# Assign a number to your user and the Call Routing
# Assign a number to your user and the Call Routing
Get-CsOnlineUser -Identity '''first.last@MSDOMAIN.onmicrosoft.com''' | Set-CsUser -EnterpriseVoiceEnabled $true -OnPremLineURI 'tel:'''+41215661234''''
Get-CsOnlineUser -Identity '''first.last@MSDOMAIN.onmicrosoft.com''' | Set-CsUser -EnterpriseVoiceEnabled $true -OnPremLineURI 'tel:'''+41215661234''''
Get-CsOnlineUser -Identity '''first.last@MSDOMAIN.onmicrosoft.com''' | Grant-CsOnlineVoiceRoutingPolicy -PolicyName 'CsOnlineVoiceRoutingPolicy-'''123456.teams.ipvoip.ch''''
Get-CsOnlineUser -Identity '''first.last@MSDOMAIN.onmicrosoft.com''' | Grant-CsOnlineVoiceRoutingPolicy -PolicyName 'CsOnlineVoiceRoutingPolicy-'''123456.teams.ipvoip.ch''''
# Verify your setup
Get-CsOnlineUser -Identity '''first.last@MSDOMAIN.onmicrosoft.com''' | Select EnterpriseVoiceEnabled,OnPremLineURI,OnlineVoiceRoutingPolicy,RegistrarPool | Format-List
# List all users with EnterPrise Voice Enabled
Get-CsOnlineUser ` -Filter {(enterprisevoiceenabled -eq $true) -and(HostingProvider -eq "sipfed.online.lync.com")} ` | Select sipaddress,HostedVoicemailPolicy,OnlineVoiceRoutingPolicy,lineuri,OnPremLineURI,RegistrarPool | Format-List
# Logout
# Logout
Get-PSSession | Remove-PSSession
Get-PSSession | Remove-PSSession

Revision as of 14:39, 23 April 2020

With VTX Teams Connect, use Microsoft Teams as your main Telephony Solution

VTX Teams Connect 01.png

Requirements[edit | edit source]

You will find below all the needed requirements to use VTX Teams Connect Service

  • A VTX Teams Connect service
  • A Microsoft 365 domain and accounts with the needed Microsoft licenses ( Microsoft Teams + Microsoft 365 Phone System )
  • A Microsoft Windows PC/Server with Powershell app and the needed modules to assign numbers to users ( we are working on an integration in the Kiosk too )

VTX Teams Connect[edit | edit source]

VTX Teams Connect service allows a smooth and easy integration between Microsoft 365 Teams services and the telephony world ( PSTN ) allowing you to use Microsoft service to pass and receive calls using Desktop (PC/macOS) or Mobile Teams application (Android/iOS) or dedicated Teams Desktop Phones. We are using redundant Microsoft validated SBC (Session Border Controller) from Audiocodes to integrate Microsoft Cloud with VTX Telephony platform, and we did automatize the integration to allow flexibility for our partners and customers. As a consequence, no telephony trunk setup is needed on your side.

  1. Please order a VTX Teams Connect service contacting your Sales contact or order it from your Kiosk interface ( including the number of channels and numbers you will need )
  2. You will have a VTX Kiosk interface account from which you will be able to manage and setup your service


A Microsoft 365 domain and accounts[edit | edit source]

  • A Microsoft 365 domain and account
    • That will include a Microsoft domain for your enterprise like enterprise.onmicrosoft.com ( or your own enterprise internet name if by example you migrated your emails to Microsoft )
    • A Microsoft 365 Admin account that will be able to buy and affect licenses to your users
  • A Microsoft 365 Domain provided by VTX to you like <servicenumber>.teams.ipvoip.ch ( ex: 123456.teams.ipvoip.ch )
    • To integrate this domain on your account, you can enable it from your Kiosk Interface, FIXME, add link
    • This domain will be used by "VTX Team Connect" service to bridge Microsoft Teams Cloud with VTX VoIP platform using
  • A Microsoft 365 user account teamsadmin@<servicenumber>.teams.ipvoip.ch (using the "VTX Teams Connect" domain provided) with the following Admin Right. It will be used to setup phone numbers on the account using Powershell ( unless VTX can do it for you from the Kiosk )
      • A Microsoft 365 Phone System license ( Temporarily license each time you wish to affect numbers to users )
      • The Microsoft Teams App ( FIXME: Double check if it is till needed )
      • Skype For Business Admin Admin right
      • Teams admin Admin right
      • Teams communication Admin Admin right
      • Teams communication support engineer Admin right
      • Teams communication support specialist Admin right
  • For all your users wishing to have a telephone number
    • A "Microsoft Teams" license ( "Microsoft Teams Commercial Cloud" or Microsoft Teams license included in the E1 or E3 or E5 license )
    • A "Microsoft 365 Phone System" License for any users that will get a phone number


Microsoft Windows PC/Server with Powershell[edit | edit source]

  1. (Powershell) : Install Powershell your PC https://docs.microsoft.com/en-us/powershell/scripting/install/installing-windows-powershell?view=powershell-7
  2. (Microsoft Visual Studio C++): Install Microsoft Visual Studio C++ 2019 x64 using https://support.microsoft.com/fr-ch/help/2977003/the-latest-supported-visual-c-downloads
  3. (SkypeOnlineConnector Powershell Module)' Install Windows Powershell Skype for Business Online module
    1. Follow https://docs.microsoft.com/en-us/SkypeForBusiness/set-up-your-computer-for-windows-powershell/set-up-your-computer-for-windows-powershell
    2. Install Windows Powershell module Skype for Business Online module: https://www.microsoft.com/en-us/download/details.aspx?id=39366

Import SkypeOnlineConnector Powershell module

 PS C:\WINDOWS\system32> Import-Module SkypeOnlineConnector
 PS C:\WINDOWS\system32>


Microsoft Teams Management[edit | edit source]

Connect to Microsoft 365 Admin Portal[edit | edit source]


VTX Teams Connect Kiosk Management[edit | edit source]

Link your <SERVICE_NUMBER>.teams.ipvoip.ch Domain between Microsoft and VTX Telephony platform[edit | edit source]

  1. Connect to https://kiosk.vtx.ch/VoIP/ManageTeams.aspx and follow the helper. You will declare the domain provided by VTX and link it to your Microsoft account
VTX Teams Connect - Kiosk Management

Voice Routing : Download and execute the ps1 voice routing[edit | edit source]

Now you will need to setup a routing plan. You can use one of the following options to do it

  • Using a Powershell Script that will ask you questions
  • Manually in Powershell
  • From Kiosk directly ( NOT AVAILABLE YET )

Create Voice Routing using a VTX Powershell Script VTX_Connect_Teams_Create_Routing_Rules.ps1[edit | edit source]

  1. Download https://wiki.vtx.ch/media/VTX_Connect_Teams_Create_Routing_Rules.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 Connect Teams Domain : ex: 123456.teams.ipvoip.ch
    2. Your MS Teams Credentials for : teamsadmin@123456.teams.ipvoip.ch


Or Create Voice Routing 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


# Connect to Microsoft Teams management and create all Voice Routing
$Session = New-CsOnlineSession -Credential (Get-Credential)
Import-PSSession $Session -AllowClobber
Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="CsOnlinePstnUsage-623476.teams.ipvoip.ch"}
New-CsOnlineVoiceRoute -Identity "CsOnlineVoiceRoute-623476.teams.ipvoip.ch" -Priority 0 -NumberPattern '^\+\d+' -OnlinePstnGatewayList 623476.teams.ipvoip.ch -OnlinePstnUsages "CsOnlinePstnUsage-623476.teams.ipvoip.ch"
New-CsOnlineVoiceRoutingPolicy -Identity "CsOnlineVoiceRoutingPolicy-623476.teams.ipvoip.ch" -OnlinePstnUsages "CsOnlinePstnUsage-623476.teams.ipvoip.ch"
Set-CsCallingLineIdentity -Identity Global -EnableUserOverride $True

# Verify all setup 
Get-CsOnlinePstnUsage
Get-CsOnlineVoiceRoute
Get-CsOnlineVoiceRoutingPolicy
Get-CsCallingLineIdentity

# Logout
Get-PSSession | Remove-PSSession


Number Mapping : Assign numbers to Microsoft accounts[edit | edit source]

Now you will need to assign a number and a routing plan to each user with a "Microsoft 365 Phone System" license. You can use one of the following options to do it

  • Using a Powershell Script that will ask you questions
  • Manually in Powershell
  • From Kiosk directly ( NOT AVAILABLE YET )


Assign numbers using a VTX Powershell Script VTX_Connect_Teams_Assign_Numbers.ps1[edit | edit source]

  1. Download https://wiki.vtx.ch/media/VTX_Connect_Teams_Assign_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 Connect Teams Domain : ex: 123456.teams.ipvoip.ch
    2. Your MS Teams Credentials for : ex: teamsadmin@123456.teams.ipvoip.ch
    3. The MS Team user email : ex: first.last@company.onmmicrosoft.com
    4. The Telephone number you wish to set : ex: +41225661234


Or Assign 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


# Connect to Microsoft Teams management
$Session = New-CsOnlineSession -Credential (Get-Credential)
Import-PSSession $Session -AllowClobber
# Assign a number to your user and the Call Routing
Get-CsOnlineUser -Identity first.last@MSDOMAIN.onmicrosoft.com | Set-CsUser -EnterpriseVoiceEnabled $true -OnPremLineURI 'tel:+41215661234'
Get-CsOnlineUser -Identity first.last@MSDOMAIN.onmicrosoft.com | Grant-CsOnlineVoiceRoutingPolicy -PolicyName 'CsOnlineVoiceRoutingPolicy-123456.teams.ipvoip.ch'
# Verify your setup 
Get-CsOnlineUser -Identity first.last@MSDOMAIN.onmicrosoft.com | Select EnterpriseVoiceEnabled,OnPremLineURI,OnlineVoiceRoutingPolicy,RegistrarPool | Format-List
# List all users with EnterPrise Voice Enabled
Get-CsOnlineUser ` -Filter {(enterprisevoiceenabled -eq $true) -and(HostingProvider -eq "sipfed.online.lync.com")} ` | Select sipaddress,HostedVoicemailPolicy,OnlineVoiceRoutingPolicy,lineuri,OnPremLineURI,RegistrarPool | Format-List
# Logout
Get-PSSession | Remove-PSSession