Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

English

Please follow the instructions below for the initial integration of Microsoft Teams into our telephone system. If you have any questions or comments, you can contact us via support@wwcom.ch or +41 41 541 41 41.

Note

Requirements for the integration of Microsoft Teams

  • Microsoft 365 E5 licence or
  • Microsoft 365 E3, with "Phone System" licence or
  • Microsoft 365 Business Standard, with "Business Voice" licence
  • Compatible from wwcommunicator Version KVM302

Step 1

First, you have to define a Teams domain, usually as a subdomain of the main domain (e.g. teams.wwcom.ch).

You then have to activate/verify the domain at Microsoft. This can be done with the following steps:

  1. Log on to https://admin.microsoft.com/AdminPortal/Home#/Domains and enter the FQDN there. Make a note of the TXT name / TXT value.
  2. Enter "TXT name" / "TXT value" on the DNS server of the corresponding domain
  3. Again, log on to https://admin.microsoft.com/AdminPortal/Home#/Domains and click on "Verify"


Step 2

Please enter the following DNS entries for the corresponding domain:

Step 3

Activate Skype for Business online service:

  1. At https://admin.microsoft.com/AdminPortal/Home#/Domains select "Skype for Business" and click on "Next"
  2. Then click on "Update DNS settings" and click on “Verify"
  3. After that, "Healthy" should appear in the overview for your corresponding subdomain
     

Step 4

Please assign the correct Microsoft licences to all users.

Note
titleMS licences
  • Enterprise licences require either an E5 license (no additional licence required) or an E3 licence with Phone System add-on (and, if conferencing is required, Audio Conferencing add-on)
  • For Microsoft 365 Business licences, the Business Voice licence is also required per use

Seitenumbruch

Step 5

In wwcommunicator under "PBX settings", activate the option "Teams compatibility mode". Also make sure that "Allow TLS" and "Allow SRTP" have been enabled. In addition, the domain must be set the same as the Teams domain. The hostname can be chosen freely (e.g. pbx as hostname and examplecompany.ch as the domain, resulting in the FQDN pbx.examplecompany.ch for the PBX). After that, it is preferable to activate "Use Let's Encrypt certificate".

  

  1. Create an A record on the DNS server that points to the IP of the PBX
  2. Restart the PBX
  3. It may take a while until the switchboard is reachable under the new FQDN (depending on the TTL settings on the DNS)
  4. Create all users on the PBX. Important: the username must be identical to the Microsoft 365 username (without @domain). Example: if the Microsoft 365 user is hans.example@examplecompany.ch, the user on the PBX must be named hans.example.
  5. For each Teams user, the option "Microsoft Teams user" must be activated after creation and the telephone number with which the user will be linked in the Teams environment must be entered under "MS Teams telephone number"

Seitenumbruch

Step 6

Connect PBX and activate users

  1. Connect to the Skype for Business Server
    1. Open Powershell as administrator
    2. Create a Skype for Business session
    3. Import the Skype for Business module


      Code Block
      languagepowershell
      themeConfluence
      Import-Module SkypeOnlineConnector


      Note

      If an error occurs during this step, it could be that the "Skype for Business online connector module" is not pre-installed on your Windows system. You can find information about the installation in the official Microsoft manual.


    4. Create Credentials object (credentials of a Microsoft 365 admin are required)

      Code Block
      languagepowershell
      $userCredential = Get-Credential


    5. Create a session on the Skype for Business server

      Code Block
      languagepowershell
      $sfbSession = New-CsOnlineSession -Credential $userCredential
      Import-PSSession $sfbSession


  2. Create PSTN gateway
    1. Create gateway and connect direct routing service

      Code Block
      languagepowershell
      New-CsOnlinePSTNGateway -Fqdn MSTEAMS_URL -MaxConcurrentSessions 100 -Enabled $true -ForwardPai $true -ForwardCallHistory $true


      Note

      You will now be asked for the SipSignalingPort (PORT_VON_SBC). Enter 5061 here.


    2. The following command can be used to check the configuration:

      Code Block
      languagepowershell
      Get-CsOnlinePSTNGateway


  3. Set up voice routing and corresponding policy
    1. Create PSTN usage

      Code Block
      languagepowershell
      Set-CsOnlinePstnUsage -Identity Global -Usage @{Add="Unrestricted"}


    2. Create route, the value MSTEAMS_URL will be given to you

      Code Block
      languagepowershell
      New-CsOnlineVoiceRoute -Identity "Unrestricted" -OnlinePstnGatewayList MSTEAMS_URL -Priority 1 -OnlinePstnUsages "Unrestricted" -NumberPattern ".*"


    3. check the route

      Code Block
      languagepowershell
      Get-CsOnlineVoiceRoute


    4. Create a user routing policy

      Code Block
      languagepowershell
      New-CsOnlineVoiceRoutingPolicy "Unrestricted" -OnlinePstnUsages "Unrestricted"


    5. Check the user routing policy

      Code Block
      languagepowershell
      Get-CsOnlineVoiceRoutingPolicy


  4. Activate user

    Note

    Now, in order for a user to be activated and assigned a number, they must have already been created in the Microsoft 365 admin portal. For additional users, only the activation and assignment of the voice routing policy is necessary. The previous steps are no longer necessary.



    1. Activate user, assign telephone number and voicemail box

      Code Block
      languagepowershell
      Set-CsUser -Identity OFFICE365_USER -OnPremLineURI tel:TELEPHONENUMBER -EnterpriseVoiceEnabled $true -HostedVoiceMail $true


      Tip

      OFFICE365_USER = Username of the Microsoft 365 account (e.g max.muster@pbx.wwcom.ch
      TELEPHONE NUMBER = telephone number from the MS Teams - SIP trunk in international format (e.g. +41415414141)


    2. Assign the user routing policy

      Code Block
      languagepowershell
      Grant-CsOnlineVoiceRoutingPolicy -Identity OFFICE365_USER -PolicyName "Unrestricted"


      Tip

      OFFICE365_USER = username of the Microsoft 365 account (for example max.muster@pbx.wwcom.ch


Seitenumbruch

Step 7

Obtain MS Teams UUID per user

  1. New PowerShell session, connect to Azure Active Directory:

    Code Block
    languagepowershell
    Import-Module AzureAD
    Connect-AzureAD


  2. Obtain the ObjectId per user:

    Code Block
    languagepowershell
    Get-AzureADUser -ObjectId "user@domain"

    Output as follows:

    Code Block
    languagepowershell
    ObjectId DisplayName UserPrincipalName UserType
    -------- ----------- ----------------- --------
    abcabcab-abca-abca-abca-abcabcabcabc Hans Beispiel hans.beispiel@beispiel.ch Member


  3. Enter the ObjectId in the "MS Teams UUID" field on the PBX


Seitenumbruch

Step 8

Next step: Connect the PBX to Azure so that the Graph API can be accessed:

  1. Open the URL https://portal.azure.com/, Menu -> Azure Active Directory >App Registrations
  2. New registration, name: wwcomteamsbridge
  3. Only accounts in this organisation directory
  4. Redirect URI https://pbx.examplecompany.ch/oauth/
  5. Certificates & secrets: Generate client key and save the public key under "PBX Settings"->"Teams App Key", as well as copy the App ID and save it under"Teams App id"
  6. API permissions: User.Read, Presence.Read, Presence.ReadAll
  7. Then log the PBX on to the Microsoft environment to enable presence matching:
  8. Go to https://pbx.examplecompany.ch/oauth/
  9. Enter access data
  10. Confirm access rights

Step 9

Define MS Teams status mapping via wwcommunicator:

You can find more settings options for wwcommunicator in this wiki in the section "wwcommunicator".

...