你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

将 Azure 通信网关连接到 Operator Connect 或 Teams Phone Mobile

部署 Azure 通信网关并将其连接到核心网络后,需要将其连接到 Microsoft Phone System。 还需要加入 Operator Connect 或 Teams Phone Mobile 移动环境。

本文介绍如何为 Operator Connect 和 Teams Phone Mobile 设置 Azure 通信网关。 完成本文中的步骤后,可以使用 Operator Connect、Teams Phone Mobile 和 Azure 通信网关为实时流量做好准备

提示

本文假定来自 Microsoft 的 Azure 通信网关加入团队还会将你加入 Operator Connect 和/或 Teams Phone Mobile。 如果为 Operator Connect 或 Teams Phone Mobile 选择了不同的加入合作伙伴,则需要请他们安排对 Operator Connect 和/或 Teams Phone Mobile 环境的更改。

先决条件

你必须部署 Azure 通信网关

你必须有权访问具有 Microsoft Entra 全局管理员角色的用户帐户。

必须分配“服务验证”测试编号。 这些号码由 Operator Connect 和 Teams Phone Mobile 计划用于持续通话测试。 每个服务的生产部署需要六个编号。 每个服务的实验室部署需要三个编号。

  • 如果你选择了在部署 Azure 通信网关时设置的服务,则你已为该服务分配了号码。
  • 否则,请现在选择电话号码(采用 E.164 格式并包含国家/地区代码)和名称以标识它们。 建议使用 OC1 和 OC2(适用于 Operator Connect)以及 TPM1 和 TPM2(适用于 Teams Phone Mobile)格式的名称。

你还必须为每个服务分配至少一个测试号码才能进行集成测试。

如果要设置 Teams Phone Mobile,并且你在部署 Azure 通信网关时未选择它,请选择:

  • Teams Phone Mobile 中使用的号码,用于从本机拨号程序访问 Voicemail Interactive Voice Response (IVR)。

  • 将 Teams Phone Mobile 通话路由到 Microsoft Phone System 的方法。 从下列项中进行选择:

    • 集成 MCP(Azure 通信网关中的 MCP)。
    • 本地 MCP。
    • 路由通话的另一种方法。

启用 Operator Connect 或 Teams Phone Mobile 支持

注意

如果在部署 Azure 通信网关时选择了 Operator Connect 或 Teams Phone Mobile,请跳过此步骤,然后转到将 Project Synergy 应用程序添加到你的 Azure 租户

  1. 登录 Azure 门户
  2. 在页面顶部的搜索栏中,搜索你的通信网关资源并选择它。
  3. 在侧菜单栏中的“通信服务”下 ,根据需求选择“Operator Connect”或“Teams Phone Mobile”以打开对应服务的页面。
  4. 选择“Operator Connect 设置”或“Teams Phone Mobile 设置”。
  5. 填写字段,然后选择“查看 + 创建”和“创建”。
  6. 选择资源的“概述”页。
  7. 选择“添加测试线路”,然后添加你在“先决条件”中选择的服务验证线路。 将“测试用途”设置为“自动”。

    重要

    不要添加用于集成测试的号码。 当你执行集成测试并为实时流量作准备时,你将配置用于集成测试的号码。

  8. 等待资源更新。 资源准备就绪后,资源概述中的“预配状态”字段将更改为“完成”。建议定期检查“预配状态”字段是否为“完成”。此步骤最长可能需要两周的时间。

将 Project Synergy 应用程序添加到你的 Azure 租户

在开始此步骤之前,请检查资源的“预配状态”字段是否为“完成”。

注意

此步骤和下一步(将管理员用户分配到 Project Synergy 应用程序)会将你设置为 Teams Phone Mobile (TPM) 和 Operator Connect (OC) 环境中的运营商。 如果已完成加入过程,请转到查找你的 Azure 通信网关资源的应用程序 ID

Operator Connect 和 Teams Phone Mobile 计划要求你的 Microsoft Entra 租户包含名为 Project Synergy 的 Microsoft 应用程序。 Operator Connect 和 Teams Phone Mobile 通过 Project Synergy 应用程序从你的 Microsoft Entra 租户继承权限和标识。 Project Synergy 应用程序还允许配置 Operator Connect 或 Teams Phone Mobile,并将用户和组分配到特定角色。

添加 Project Synergy 应用程序:

  1. 检查 Microsoft Entra ID (AzureAD) 模块是否已安装在 PowerShell 中。 如有必要,请安装它。
    1. 打开 PowerShell。
    2. 运行以下命令并检查输出中是否显示 AzureAD
      Get-Module -ListAvailable
      
    3. 如果 AzureAD 未显示在输出中,请安装该模块。
      1. 关闭当前的 PowerShell 窗口。
      2. 以管理员身份打开 PowerShell。
      3. 运行以下命令。
        Install-Module AzureAD
        
      4. 关闭 PowerShell 管理员窗口。
  2. 以 Microsoft Entra 全局管理员身份登录到 Azure 门户
  3. 选择“Microsoft Entra ID”。
  4. 选择“属性”。
  5. 向下滚动到“租户 ID”字段。 你的租户 ID 位于框中。 记下你的租户 ID。
  6. 打开 PowerShell。
  7. 运行以下 cmdlet,将 <TenantID> 替换为你在步骤 5 中记下的租户 ID。
    Connect-AzureAD -TenantId "<TenantID>"
    New-AzureADServicePrincipal -AppId eb63d611-525e-4a31-abd7-0cb33f679599 -DisplayName "Operator Connect"
    

将管理员用户分配到 Project Synergy 应用程序

设置 Azure 通信网关的用户需要在 Project Synergy 应用程序中具有管理员用户角色。 在 Azure 门户中为他们分配此角色。

  1. 在 Azure 门户中,转到Microsoft Entra ID,然后使用左侧菜单企业应用程序。 或者,可以在搜索栏中搜索“企业应用程序”;它属于“服务”子标题下
  2. 使用下拉菜单将“应用程序类型”筛选器设置为“所有应用程序”。
  3. 选择“应用”。
  4. 使用搜索栏搜索“Project Synergy”。 应用程序应会显示。
  5. 选择你的“Project Synergy”应用程序。
  6. 从左侧菜单中选择“用户和组”。
  7. 选择“添加用户/组”。
  8. 指定应设置 Azure 通信网关的用户,并为其授予“管理员”角色。

注意

请勿在租户中更改以下任何 Operator Connect 配置(无论是通过 Operator Connect 配置门户还是 Operator Connect API)。

  • 配置门户中带 CommsGwSuffix 的通话配置文件,或 Operator Connect API 中带 NameSuffix 通话配置文件
  • FQDN 以 .commsgw.azure.com 结尾的 Trunk

我们为你管理此配置。 编辑此配置可能会导致你的 Azure 通信网关服务出现问题。

查找你的 Azure 通信网关资源的应用程序 ID

每个 Azure 通信网关资源都会自动收到一个系统分配的托管标识,Azure 通信网关会使用该标识连接到 Operator Connect API。 你需要查找托管标识的应用程序 ID,以便在为 Azure 通信网关设置应用程序角色将 Azure 通信网关的应用程序 ID 添加到 Operator Connect中将 Azure 通信网关连接到 Operator Connect 或 API。

  1. 登录 Azure 门户
  2. 如果还不知道通信网关资源的名称,请搜索通信网关并记下资源名称。
  3. 搜索通信资源的名称。 你应会在“Microsoft Entra ID”子标题下看到具有该值的企业应用程序。 你可能需要选择“在 Microsoft Entra ID 中继续搜索”才能找到它。
  4. 选择企业应用程序。
  5. 检查名称是否与通信网关资源名称匹配。
  6. 记下“应用程序 ID”。

为 Azure 通信网关设置应用程序角色

Azure 通信网关包含需要代表你访问 Operator Connect API 的服务。 若要启用此访问权限,必须将特定应用程序角色授予 Project Synergy 企业应用程序下 Azure 通信网关的系统分配的托管标识。 你在将 Project Synergy 应用程序添加到你的 Azure 租户中创建了这个 Project Synergy 企业应用程序。

对于要用于 Operator Connect 或 Teams Phone Mobile 的每个 Azure 通信网关资源,必须执行此步骤一次。

重要

授予权限有两个部分:使用适当的角色(此步骤)为 Azure 通信网关配置系统分配的托管标识,然后将托管标识的应用程序 ID 添加到 Operator Connect 或 Teams Phone Mobile 环境。 稍后,在“将 Azure 通信网关的应用程序 ID 添加到 Operator Connect”中,你需要将应用程序 ID 添加到 Operator Connect 或 Teams Phone Mobile 环境。

在包含 Project Synergy 应用程序的租户中执行以下步骤。

  1. 检查 Microsoft Graph (Microsoft.Graph) 模块是否已安装在 PowerShell 中。 如有必要,请安装它。
    1. 打开 PowerShell。
    2. 运行以下命令并检查输出中是否显示 Microsoft.Graph
      Get-Module -ListAvailable
      
    3. 如果 Microsoft.Graph 未显示在输出中,请安装该模块。
      1. 关闭当前的 PowerShell 窗口。
      2. 以管理员身份打开 PowerShell。
      3. 运行以下命令。
        Install-Module -Name Microsoft.Graph -Scope CurrentUser
        
      4. 关闭 PowerShell 管理员窗口。
  2. 以 Microsoft Entra 全局管理员身份登录到 Azure 门户
  3. 选择“Microsoft Entra ID”。
  4. 选择“属性”。
  5. 向下滚动到“租户 ID”字段。 你的租户 ID 位于框中。 记下你的租户 ID。
  6. 打开 PowerShell。
  7. 运行以下 cmdlet,将 <TenantID> 替换为你在步骤 5 中记下的租户 ID。
    Connect-MgGraph -Scopes "Application.Read.All", "AppRoleAssignment.ReadWrite.All" -TenantId "<TenantID>"
    
    如果提示你向 Microsoft Graph 命令行工具授予权限,请选择“接受”以授予权限
  8. 运行以下 cmdlet,将<CommunicationsGatewayName>替换为 Azure 通信网关资源的名称。
    $acgName = "<CommunicationsGatewayName>"
    
  9. 运行以下 PowerShell 命令。 这些命令会为 Azure 通信网关添加以下角色:TrunkManagement.ReadTrunkManagement.WritepartnerSettings.ReadNumberManagement.ReadNumberManagement.WriteData.ReadData.Write
    # Get the Service Principal ID for Project Synergy (Operator Connect)
    $projectSynergyApplicationId = "eb63d611-525e-4a31-abd7-0cb33f679599"
    $projectSynergyEnterpriseApplication = Get-MgServicePrincipal -Filter "AppId eq '$projectSynergyApplicationId'" # "Application.Read.All"
    
    # Required Operator Connect - Project Synergy Roles
    $trunkManagementRead = "72129ccd-8886-42db-a63c-2647b61635c1"
    $trunkManagementWrite = "e907ba07-8ad0-40be-8d72-c18a0b3c156b"
    $partnerSettingsRead = "d6b0de4a-aab5-4261-be1b-0e1800746fb2"
    $numberManagementRead = "130ecbe2-d1e6-4bbd-9a8d-9a7a909b876e"
    $numberManagementWrite = "752b4e79-4b85-4e33-a6ef-5949f0d7d553"
    $dataRead = "eb63d611-525e-4a31-abd7-0cb33f679599"
    $dataWrite = "98d32f93-eaa7-4657-b443-090c23e69f27"
    $requiredRoles = $trunkManagementRead, $trunkManagementWrite, $partnerSettingsRead, $numberManagementRead, $numberManagementWrite, $dataRead, $dataWrite
    
    # Locate the Azure Communications Gateway resource by name
    $acgServicePrincipal = Get-MgServicePrincipal -Filter ("displayName eq '$acgName'")
    
    # Assign the required roles to the managed identity of the Azure Communications Gateway resource
    $currentAssignments = Get-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $acgServicePrincipal.Id
    foreach ($appRoleId in $requiredRoles) {
        $assigned = $currentAssignments | Where-Object { $_.AppRoleId -eq $AppRoleId }
        if (-not $assigned) {
            $params = @{
                principalId = $acgServicePrincipal.Id
                resourceId = $projectSynergyEnterpriseApplication.Id
                appRoleId = $appRoleId
            }
            New-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $acgServicePrincipal.Id -BodyParameter $params
        }
    }
    
    # Check the assigned roles
    Get-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $acgServicePrincipal.Id
    
  10. 要结束当前会话,请断开与 Microsoft Graph 的连接。
    Disconnect-MgGraph
    

向加入团队提供附加信息

注意

需要执行此步骤才能将你设置为 Teams Phone Mobile (TPM) 和 Operator Connect (OC) 环境中的运营商。 如果你已加入 TPM 或 OC,请跳过此步骤。

在你的加入团队将你加入 Operator Connect 和/或 Teams Phone Mobile 环境之前,你需要向他们提供一些附加信息。

  1. 等待你的加入团队为你提供收集附加信息的表单。
  2. 填写表单并将其提供给加入团队。
  3. 等待加入团队确认加入过程已完成。

如果你还没有加入团队,请联系 azcog-enablement@microsoft.com,提供你的 Azure 订阅 ID 和联系人详细信息。

测试你的 Operator Connect 门户访问

重要

在测试 Operator Connect 门户访问之前,请等待你的加入团队确认加入过程已完成。

转到 Operator Connect 主页,检查你是否能够登录。

将 Azure 通信网关的应用程序 ID 添加到 Operator Connect

必须在 Operator Connect 或 Teams Phone Mobile 环境中启用 Azure 通信网关。 此过程需要使用两个应用程序 ID 配置环境:

若要添加应用程序 ID:

  1. 登录到 Operator Connect 门户
  2. 为你为托管标识找到的应用程序 ID 添加新的“应用程序 ID”。
  3. 为值 8502a0ec-c76d-412f-836c-398018e2312b 添加第二个“应用程序 ID”。

在 Microsoft Entra 中注册你的部署的域名

Microsoft Teams 只会向你确认拥有的域发送流量。 你的 Azure 通信网关部署会自动收到一个自动生成的完全限定的域名 (FQDN)。 你需要将此域名作为自定义域名添加到你的 Microsoft Entra 租户,与加入团队共享详细信息,然后验证域名。 此过程可确认你拥有该域。

  1. 导航到 Azure 通信网关资源的“概述”,然后选择“属性”。 查找名为“域”的字段。 此名称是你的部署的域名。
  2. 完成以下过程:将你的自定义域名添加到 Microsoft Entra ID
  3. 与加入团队共享你的 DNS TXT 记录信息。 等待加入团队确认 DNS TXT 记录已正确配置。
  4. 完成以下过程:验证你的自定义域名

下一步