Microsoft Teams setup for Pexip CVI

This article explains how to make your environment ready for using Pexip's Cloud Video Interop (CVI) Service for Microsoft Teams. (For information on how to integrate Microsoft Teams with Pexip Infinity, please go here.)

It covers the standard steps for configuring your environment, and the optional additional steps to enable SIP Guest Join.

Configuring your environment

If you are a new customer on the service and/or you have not already configured your DNS SRV records for the custom domain to use, this must be done. Please see Domain hosting DNS SRV records for instructions.

To configure your environment:

To manage this configuration, you must have the Global administrator role in your Office 365 tenant.

  1. After requesting access to the service, you will receive an email asking you to authorize the Pexip CVI application. Click the link Initiate consent for your Tenant link.

  2. This opens a web page where you again need to click on Initiate consent for your Tenant.

  3. Follow the instructions to log in with your O365 account and then click Accept when prompted.

    1. Sign in.

    2. Accept the request.

  4. A confirmation page verifies that the consent was successfully provided. On this page, you'll also find a PowerShell script and further instructions. Copy and run the script as described on the page.

    The instructions contained on this page to complete the setup are repeated here for your convenience.

    1. Start a PowerShell session as Administrator and run the following commands:

      Uninstall-Module MicrosoftTeams -AllVersions -Force

      Install-Module MicrosoftTeams -MinimumVersion "2.0.0" -AllowClobber

      (These commands ensure the appropriate MicrosoftTeams module is installed, and that it replaces any existing SkypeOnlineConnector module that may already be installed.)

    2. Run the following commands to sign in to your Teams tenant:

      • In all standard deployments run:

        Import-Module MicrosoftTeams

        Connect-MicrosoftTeams

      • If this is a GCC High / Azure US Government Cloud deployment then use these commands instead:

        Import-Module MicrosoftTeams

        Connect-MicrosoftTeams -TeamsEnvironmentName TeamsGCCH

    3. Create a new video interop service provider with your App ID set as trusted.

      Use the New-CsVideoInteropServiceProvider command as contained in your email as it includes your personalized information.

      To run the command, you need the Global administrator role.

    4. Grant interop for all users or specific individuals.

      During normal rollout we recommend granting access for everyone in the organization (all users in the tenant):

      Grant-CsTeamsVideoInteropServicePolicy -PolicyName PexipServiceProviderEnabled -Global

      During trials you may want to only grant access to selected individuals in your company, for example:

      Grant-CsTeamsVideoInteropServicePolicy -PolicyName PexipServiceProviderEnabled -Identity "youradmin@pexample.com"

  5. After this, the settings need to propagate and you will receive a final email from us when the service is ready:

  6. You can verify that your domain has been correctly set up here: dns.pexip.com.

Please note:

  • It may take several hours before the new meeting template is displayed.
  • Outlook users: the first time you invite, you may see that the meeting invite does not contain any new information. This is due to Outlook caching the previous meeting information. You therefore need to make two invitations for the new information to appear.

That's it!

Using SIP Guest Join

Pexip's standard Microsoft Teams interoperability solution allows your own video conferencing endpoints (and your guests) to join Microsoft Teams meetings that you are hosting. The "SIP Guest Join" feature lets you join Microsoft Teams meetings with your own video conferencing endpoints where that meeting is being hosted by an external third-party organization who has not enabled Pexip interoperability themselves.

Note that this is a guest join experience, therefore someone has to be in the Microsoft Teams meeting to admit you from the lobby.

Scope and limitations

This is a Teams commercial focused capability, thus all Teams meetings for Work or School i.e. used by enterprises and most governments in the commercial cloud are supported.

Note that the following are not supported:

  • Teams meetings with "teams.live.com" (part of Teams for Home or Small Business)
  • Teams meetings with "gov.teams.microsoft.us" (part of the Microsoft Government cloud)

Prerequisites

As a prerequisite to enabling Guest Join you must:

  • Enable One-Touch Join — either using One-Touch Join for Pexip Service (controlled via Pexip Control Center) or via a self-hosted Pexip Infinity platform that is dedicated to managing OTJ. See About One-Touch Join for more information.
  • Register your endpoints to the Pexip Service or have the Trusted Devices add-on (this is included in the ERC Premium license bundle).

Enabling guest join

If you are using One-Touch Join for Pexip Service (controlled via Pexip Control Center) then no additional configuration is required — you are automatically able to use the guest join feature.

Using a self-hosted Pexip Infinity platform for OTJ

If you are using a self-hosted Pexip Infinity platform for OTJ, then you need to add a suitable OTJ Meeting Processing Rule to handle invitations to Microsoft Teams meetings (see Adding One-Touch Join meeting processing rules for general details on how to do this).

  1. Add an OTJ Meeting Processing Rule (One-Touch Join > OTJ Meeting Processing rules):

    If you are using Pexip Infinity version 32:

    • You must add a new OTJ Meeting Processing Rule with a Meeting type of Microsoft Teams SIP Guest Join.

    If you are using Pexip Infinity version 31 or earlier:

    • You must add a new OTJ Meeting Processing Rule with a Meeting type of Custom.
    • Use the following script in the rule's Custom template field:

      Copy to clipboard
      {% set matches = pex_regex_search("https:\/\/teams\.microsoft\.com\/(?:l\/meetup-join|meet)\/([A-z0-9-\^\%_.]+)\/([0-9]+)\?context=([A-z0-9-\^\%.]+)", calendar_event.body) %}
      {% set context = "" %}
      {% set organizerId = "" %}
      {% set messageId = "" %}
      {% set tenantId = "" %}
      {% set threadID = "" %}

      {% if matches %}
      {% set context = pex_regex_search("%7b%22Tid%22%3a%22([a-z0-9-]+)%22%2c%22Oid%22%3a%22([a-z0-9-]+)%22%7d", matches[2]) %}
      {{(matches[0] ~ "," ~ matches[1]~ "," ~ context[1]) | pex_base32 ~ "." ~ context[0]}}@pex.ms
      {% else %}

      {% set matches = pex_regex_search("\"(https://teams.microsoft.com/meetingOptions.*?)\"+", calendar_event.body) %}
      {% set matches = matches[0] | replace("&","&") %}

      {% set threadID = pex_regex_search("threadId(?:=|%3D)([a-zA-Z0-9_@.]+)", calendar_event.body) %}
      {% set threadID = threadID[0] | replace("_",":", 1) %}

      {% set messageId = pex_regex_search("messageId(?:=|%3D)([a-zA-Z0-9_@.]+)", calendar_event.body) %}

      {% set organizerId = pex_regex_search("organizerId(?:=|%3D)([a-zA-Z0-9_@.-]+)", calendar_event.body) %}

      {% set tenantId = pex_regex_search("tenantId(?:=|%3D)([a-zA-Z0-9_@.-]+)", calendar_event.body) %}


      {% set threadID = pex_url_encode(('threadId', threadID)) %}

      {% set threadID = pex_regex_search("threadId=([a-zA-Z0-9_@.%-]+)", threadID) %}

      {% if threadID[0] and messageId[0] and organizerId[0] and tenantId[0] %}
      {{(threadID[0] ~ "," ~ messageId[0]~ "," ~ organizerId[0]) | pex_base32 ~ "." ~ tenantId[0]}}@pex.ms
      {% endif %}
      {% endif %}

      (This rule looks for https://teams.microsoft.com/<meetingcode> and converts it into a SIP URI that can be routed via the Pexip Service.)

    • Consider the priorities of your rules. If you use Teams interop for your own Microsoft Teams meetings then your rules for those meetings should have a higher priority (lower number).

  2. Save the rule. Your endpoints can now join externally-hosted Teams meetings.

Troubleshooting

This table provides guidance on troubleshooting issues with SIP Guest Join for Teams.

Symptom Possible cause Resolution

An external Microsoft Teams meeting has been scheduled but there is no Join button.

Your Microsoft Exchange environment uses a security application (such as Office 365 ATP, or Mimecast) to re-write URLs, meaning that One-Touch Join could not obtain the join URL. For more information, see Allowing forwarding of external invitations (for Exchange on-premises) or Allowing forwarding of external invitations (for O365).

Ensure that the security application's URL re-write rules include an exception for any URL starting with the domain https:\\teams.microsoft.com\

More information

These articles provide further details about the CVI interop service and explain how to invite and join a Teams meeting from a video system and Skype for Business:

If you need to remove Pexip's CVI service, see Removing Microsoft Teams CVI.