Share via


Azure 通訊閘道布建 API

適用於電信業者的 Azure 通訊閘道佈建 API 可讓您布建客戶的詳細數據,以及指派給客戶的號碼到 Azure 通訊閘道 (ACG) 。 布建 API 也支援一些後端通訊服務的流程布建。

布建客戶和號碼是布建 API 或瀏覽器型號碼管理入口網站 (的必要) ,除了 Operator Connect 和 Teams 電話 Mobile 以外。 對於操作員連線和 Teams 電話 行動裝置版,使用布建 API 和/或號碼管理入口網站是選擇性的,您可以改為直接與操作員連線 API 整合。

開始使用

Prerequisites

  • 已部署 Azure 通訊閘道應用程式的租使用者。
  • Azure 通訊閘道的完整功能變數名稱 (FQDN) ,會顯示在 Azure 入口網站 中資源的 [概觀] 頁面上。 API 可在 的 provapi.<base-domain>埠 443 上使用。
  • IP 位址允許存取 API 的電腦,如部署 Azure 通訊閘道的一部分,在允許清單中設定。

驗證與授權

布建 API 會使用 OAuth 2.0 來控制資源的存取。 用戶端應用程式必須取得有效的驗證持有人令牌,才能存取布建 API。 持有人令牌表示應用程式已獲授權一或多個範圍, (角色) 布建 API。 我們建議使用 客戶端認證流程 (針對伺服器端進程) 所設計。

下列範圍適用於布建 API:

  • ProvisioningAPI.Admin:能夠在整個 API 中叫用任何作業。
  • ProvisioningAPI.Read:能夠在 API 上叫用任何讀取 (GET) 作業。
  • ProvisioningAPI.Write:能夠在 API 上叫用任何寫入 (PUT、PATCH) 作業。
  • ProvisioningAPI.Delete:能夠在 API 上叫用任何刪除 (DELETE) 作業。

若要設定客戶端認證流程:

  1. 請確定您的應用程式可以支援客戶端認證流程。
    • 當您的應用程式要求布建 API 的令牌時,它必須使用下列欄位。

      參數 條件 描述
      tenant required 目錄租使用者,包含 Azure 通訊閘道,格式為 guid 或功能變數名稱。
      scope required Azure 通訊閘道資源標識碼的授權範圍。 針對此處所述的客戶端認證流程,範圍應該是 https://func-voiceservice-rp-prod-eastuseuap.azurewebsites.net/.default
      client_id 必要 應用程式 (指派給應用程式的用戶端) 識別碼。
    • roles 接收令牌中的宣告會指定用戶端應用程式有權存取的角色 (範圍) 。

    • Azure 通訊閘道布建平臺的要求必須具有 Authorization 具有此持有人令牌的標頭。

    • 如需使用令牌的範例,請參閱 客戶端認證流程檔

  2. 使用 Azure 入口網站,在與 Azure 通訊閘道部署相同的租用戶中註冊應用程式。 請參閱快速入門:在 Microsoft 身分識別平台 中註冊應用程式 - Microsoft Entra |Microsoft Learn
  3. 將自己指派為應用程式註冊的擁有者。 請參閱 指派應用程式擁有者
  4. 使用布建 API 的範圍來註冊應用程式,以設定應用程式註冊所建立的應用程式註冊,如先前所述。
  5. 身為租用戶的系統管理員,允許應用程式使用您指派的應用程式角色。 請參閱 授與管理員同意

布建 API 會針對安全性憑證使用標準 Microsoft 信任鏈結。

重要概念

布建平臺有三個主要資源,操作員可以管理:帳戶、數字和資訊要求。

  • 帳戶 資源是操作員客戶的描述,通常是 (企業) ,以及服務布建的每個客戶設定。
  • 編號 資源屬於帳戶。 他們會描述數位、服務 (例如,Microsoft Teams 直接路由) 數位所使用的數位,以及任何額外的個別數目設定。
  • 資訊 (RFI) 資源的要求 ,是對於透過特定後端服務從操作員接收服務感興趣之操作員的潛在客戶描述。 目前僅提供從操作員連線產生的 RFI,並 Teams 電話 行動裝置同意。

例如,若要將 Microsoft Teams 直接路由服務提供給客戶 Contoso,請使用 Contoso 的布建 API 建立帳戶資源。 此帳戶包含直接路由 (組態,例如子域和對應的令牌,需要設定 Microsoft Teams 可用來驗證客戶的組態) 的 DNS 記錄。 然後,您必須將號碼資源新增至帳戶,並啟用直接路由的每個號碼。

提示

您必須在帳戶內的帳戶和號碼上啟用服務。

使用後端服務同步布建後端服務

Azure 通訊閘道必須有其提供服務號碼的相關信息,才能正確連線呼叫。 建議您使用 Azure 通訊閘道佈建 API,以提供此資訊給 Azure 通訊閘道,但您也可以使用數位管理入口網站。 大部分的後端服務也需要布建,其中包含要使用的數字和帳戶的相關信息。 這項需求通常表示需要多個 IT 整合專案才能啟用新的服務。 Azure 通訊閘道布建平臺已預先整合一些後端服務來為您布建,以減少IT整合需求。 您可以啟用相關服務的 後端服務同步 處理,以使用此函式。 這也表示任何 AZURE 通訊閘道佈建平臺的 IT 整合都可供其他後端服務重複使用。

例如,Operator Connect 會要求透過 Operator Connect API 上傳所有數位。 如果已啟用操作員連線的後端服務同步處理,則任何布建到 Azure 通訊閘道並針對 Operator Connect 啟用的數位,都會自動布建到 Operator Connect 中,這表示您不需要與操作員連線 API 整合。

對於某些服務,透過 Azure 通訊閘道佈建平台進行布建是選擇性的,其中 Azure 通訊網關可以直接從後端取得資訊。 不過,無法取得某些功能,例如針對計費目的新增客戶 SIP 標頭。 對於不支援後端服務同步處理的任何服務,可能需要直接對後端服務進行其他IT整合。 下表說明布建支援的狀態:

後端服務 透過 ACG 佈建平臺布建的需求 支援的後端服務布建
直接路由 強制性
放大 強制性
Azure 電信業者來電保護 強制性
操作員連線 選擇性
Teams 電話Mobile 選擇性

同步至後端服務是異步的,這表示在布建後端服務之前,您的布建要求可能會成功。 此狀態會使用 serviceProvisioningStatus 設定為 pending的欄位,在 API 回應中表示。 建議您查詢 物件,以檢查其布建狀態,直到此欄位設定為 success為止。 布建後端系統的任何錯誤都可直接在回應中提供。

範例

下列範例顯示管理 RFI、帳戶和號碼的範例要求。

Create 代表客戶的帳戶

使用端點上的 accounts/<accountName> PUT 來為客戶 Contoso 建立名為 contoso 的帳戶,並設定帳戶的一或多個通訊服務。 使用 If-None-Match 標頭來確認具有此名稱的帳戶資源不存在。

在下例中︰

  • 已設定直接路由。
  • (預設) 啟用來電者標識符檢測。
  • 客戶的子域為 contoso
  • 設定 DNS 記錄所需的客戶提供的 DNS TXT 值位於 region1Tokenregion2Token 欄位中。

要求:

PUT /accounts/contoso?api-version=2024-02-29 HTTP/1.1
{
  "name": "contoso",
  "serviceDetails": {
    "teamsDirectRouting": {
      "syncEnabled": true,
      "enabled": true,
      "configuration": {
        "callScreening": true,
        "subdomain": "contoso",
        "subdomainTokens": {
          "region1Token": "region1TokenValue",
          "region2Token": "region2TokenValue"
        }
      }
    }
  }
}

回應:

{
  "serviceProvisioningStatus": "synced",
  "serviceProvisioningErrors": null,
  "name": "contoso",
  "serviceDetails": {
    "teamsDirectRouting": {
      "syncEnabled": true,
      "enabled": true,
      "numberCount": 0,
      "configuration": {
        "callScreening": true,
        "subdomain": "contoso",
        "subdomainTokens": {
          "region1Token": "region1TokenValue",
          "region2Token": "region2TokenValue"
        }
      },
      "subdomainStatus": "provisioned"
    },
  }
}

在下列範例中,我們會建立僅與 Teams 操作員連線搭配使用的帳戶,並啟用後端同步,讓此帳戶的相關信息 (,例如上傳) 的任何號碼也會布建到 Teams 中:

要求:

PUT /accounts/contoso?api-version=2024-02-29 HTTP/1.1
{
  "name": "contoso",
  "serviceDetails": {
    "teamsTenantId": "tenantIdString",
    "teamsOperatorConnect": {
      "syncEnabled": true,
      "enabled": true
    },
  }
}

回應:

{
  "serviceProvisioningStatus": "pending",
  "serviceProvisioningErrors": null,
  "name": "contoso",
  "serviceDetails": {
    "teamsTenantId": "tenantIdString",
    "teamsOperatorConnect": {
      "syncEnabled": true,
      "enabled": true,
      "numberCount": 0
    }
  }
}

檢視帳戶的詳細數據

使用端點上的 accounts/<accountName> GET 來取得帳戶的詳細數據。 回應包含下列欄位:

  • 如果欄位未設定) ,則所有先前設定 (或預設值。
  • ACG 上每個可用服務的訂閱者計數。
  • 如果已啟用,則為後端服務布建的狀態。
  • subdomainStatus,表示 DNS 記錄布建的狀態,只與直接路由相關。
  • ETag標頭,表示帳戶的目前狀態。 您可以在後續更新要求上使用標頭中的 If-Match 值,以確保不會覆寫其他 API 使用者所做的變更。

要求:

GET /accounts/contoso?api-version=2024-02-29 HTTP/1.1

回應:

ETag: 12345
{
  "serviceProvisioningStatus": "synced",
  "serviceProvisioningErrors": null,
  "name": "contoso",
  "serviceDetails": {
    "teamsTenantId": "tenantIdString",
    "teamsOperatorConnect": {
      "syncEnabled": true,
      "enabled": true,
      "numberCount": 0
    },
  }
}

如果帳戶已設定多個服務,則為對等的要求,如下所示:

要求:

GET /accounts/contoso?api-version=2024-02-29 HTTP/1.1

回應:

ETag: 12345
{
  "serviceProvisioningStatus": "synced",
  "serviceProvisioningErrors": null,
  "name": "contoso",
  "serviceDetails": {
    "teamsTenantId": "tenantIdString",
    "teamsOperatorConnect": {
      "syncEnabled": true,
      "enabled": true
    },
    "teamsDirectRouting": {
      "syncEnabled": true,
      "enabled": true,
      "numberCount": 0,
      "configuration": {
        "callScreening": true,
        "subdomain": "contoso",
        "subdomainTokens": {
          "region1Token": "region1",
          "region2Token": "region2"
        }
      },
      "subdomainStatus": "provisioned"
    },
  }
}

更新帳戶的組態

使用端點上的 accounts/<accountName> PUT 來更新帳戶的組態。 若要確保更新不會覆寫其他使用者所做的變更,請從帳戶的最新回應中新增具有 If-Match ETag 的標頭。

要求:

PUT /accounts/contoso?api-version=2024-02-29 HTTP/1.1
ETag: 12345
{
  "name": "contoso",
  "serviceDetails": {
    "teamsTenantId": "tenantIdString",
    "teamsOperatorConnect": {
      "syncEnabled": false,
      "enabled": true
    },
    "teamsDirectRouting": {
      "syncEnabled": true,
      "enabled": true,
      "numberCount": 0,
      "configuration": {
        "callScreening": true,
        "subdomain": "contoso",
        "subdomainTokens": {
          "region1Token": "region1",
          "region2Token": "region2"
        }
      },
      "subdomainStatus": "provisioned"
    },
  }
}

回應:

ETag: 56789
{
  "serviceProvisioningStatus": "pending",
  "serviceProvisioningErrors": null,
  "name": "contoso",
  "serviceDetails": {
    "teamsTenantId": "tenantIdString",
    "teamsOperatorConnect": {
      "syncEnabled": false,
      "enabled": true
    },
    "teamsDirectRouting": {
      "syncEnabled": true,
      "enabled": true,
      "numberCount": 0,
      "configuration": {
        "callScreening": true,
        "subdomain": "contoso",
        "subdomainTokens": {
          "region1Token": "region1",
          "region2Token": "region2"
        }
      },
      "subdomainStatus": "provisioned"
    },
  }
}

將一個數位新增至帳戶

使用端點上的 account/<accountName>/numbers/<telephoneNumber> PUT 將數位新增至帳戶、啟用一或多個通訊服務,並新增任何其他組態。 選擇的通訊服務也必須在帳戶上設定。 使用 If-None-Match 標頭來確認具有此數位的數位資源不存在。 所有數位都必須以 E.164 格式建立。

在下例中︰

  • 數位為 +123451。
  • 已啟用運算符聯機。
  • 系統會提供將數位上傳至 Operator Connect 所需的設定
  • customSipHeader 指定 Azure 通訊閘道應新增標頭,並將值 exampleHeaderContents 新增至傳送給操作員網路的訊息。 標頭的名稱會設定為部署 Azure 通訊閘道的一部分。
  • serviceProvisioningStatus回應中的欄位會顯示同步處理至後端服務的狀態。
PUT /accounts/contoso/numbers/+123451?api-version=2024-02-29 HTTP/1.1
{
  "telephoneNumber": "+123451",
  "accountName": "contoso",
  "serviceDetails": {
    "teamsOperatorConnect": {
      "enabled": true,
      "configuration": {
        "usage": "CallingUserAssignment",
        "choosableCapabilities": [
          "InboundCalling",
          "OutboundCalling"
        ],
        "civicAddressId": "civicAddressIdString",
        "allowTenantAddressUpdate": true,
      }
    },
  },
  "configuration": {
    "customSipHeader": "exampleHeaderContents"
  }
}

回應:

{
  "serviceProvisioningStatus": "pending",
  "serviceProvisioningErrors": null,
  "telephoneNumber": "+123451",
  "accountName": "contoso",
  "serviceDetails": {
    "teamsOperatorConnect": {
      "enabled": true,
      "assignmentStatus": "assigned",
      "configuration": {
        "usage": "CallingUserAssignment",
        "choosableCapabilities": [
          "InboundCalling",
          "OutboundCalling"
        ],
        "civicAddressId": "civicAddressIdString",
        "allowTenantAddressUpdate": true,
      }
    },
  },
  "configuration": {
    "customSipHeader": "exampleHeaderContents"
  }
}

在一段時間后檢查布建狀態

在布建動作之後使用 account/<accountName>/numbers/<telephoneNumber> GET 來檢查數字的狀態。 如果已成功佈建數位, serviceProvisioningStatus 欄位會從 pending 更新為 synced

要求:

GET /accounts/contoso/numbers/+123451?api-version=2024-02-29 HTTP/1.1

回應:

{
  "serviceProvisioningStatus": "synced",
  "serviceProvisioningErrors": null,
  "telephoneNumber": "+123451",
  "accountName": "contoso",
  "serviceDetails": {
    "teamsOperatorConnect": {
      "enabled": true,
      "assignmentStatus": "assigned",
      "configuration": {
        "usage": "CallingUserAssignment",
        "choosableCapabilities": [
          "InboundCalling",
          "OutboundCalling"
        ],
        "civicAddressId": "civicAddressIdString",
        "allowTenantAddressUpdate": true,
      }
    },
  },
  "configuration": {
    "customSipHeader": "exampleHeaderContents"
  }
}

後端服務布建中上傳數字時發生錯誤

在此範例中,上傳數位時的後端布建會達到錯誤,這會反映在回應上。 錯誤訊息會以透明方式從後端服務傳遞。

注意

一開始布建數位時,其狀態 pending 必須再次查詢,以確認成功/失敗。

原始要求,此要求遺漏欄位的值 usage

PUT /accounts/contoso/numbers/+123451?api-version=2024-02-29 HTTP/1.1
{
  "telephoneNumber": "+123451",
  "accountName": "contoso",
  "serviceDetails": {
    "teamsOperatorConnect": {
      "enabled": true,
      "configuration": {
        "usage": "",
        "choosableCapabilities": [
          "InboundCalling",
          "OutboundCalling"
        ],
        "civicAddressId": "civicAddressIdString",
        "allowTenantAddressUpdate": true,
      }
    },
  },
  "configuration": {
    "customSipHeader": "exampleHeaderContents"
  }
}

在一段時間後從 GET 查詢回應:

{  
  "serviceProvisioningStatus": "failed",
  "serviceProvisioningErrors": [
    {
      "code": "InvalidRequest",
      "message": "Invalid/missing required configuration attributes: Usage",
      "target": "oc",
    }
  ],
  "telephoneNumber": "+123451",
  "accountName": "contoso",
  "serviceDetails": {
    "teamsOperatorConnect": {
      "enabled": true,
      "assignmentStatus": "assigned",
      "configuration": {
        "usage": "",
        "choosableCapabilities": [
          "InboundCalling",
          "OutboundCalling"
        ],
        "civicAddressId": "civicAddressIdString",
        "allowTenantAddressUpdate": true,
      }
    },
  },
  "configuration": {
    "customSipHeader": "exampleHeaderContents"
  }

更新數位的組態

使用端點上的 account/<accountName>/numbers/<telephoneNumber> PUT 來更新數位的組態。 若要確保更新不會覆寫其他使用者所做的變更,請從數位的最新回應中新增具有ETag的 If-Match 標頭。

要求:

PUT /accounts/contoso/numbers/+123451?api-version=2024-02-29 HTTP/1.1
ETag: 123
{
  "telephoneNumber": "+123451",
  "accountName": "contoso",
  "serviceDetails": {
    "teamsOperatorConnect": {
      "enabled": true,
      "configuration": {
        "usage": "CallingUserAssignment",
        "choosableCapabilities": [
          "InboundCalling",
          "OutboundCalling",
          "Mobile"
        ],
        "civicAddressId": "civicAddressIdString",
        "allowTenantAddressUpdate": true,
      }
    },
  },
  "configuration": {
    "customSipHeader": "exampleHeaderContents"
  }
}

回應:

{
  "serviceProvisioningStatus": "pending",
  "serviceProvisioningErrors": null,
  "telephoneNumber": "+123451",
  "accountName": "contoso",
  "serviceDetails": {
    "teamsOperatorConnect": {
      "enabled": true,
      "assignmentStatus": "assigned",
      "configuration": {
        "usage": "CallingUserAssignment",
        "choosableCapabilities": [
          "InboundCalling",
          "OutboundCalling",
          "Mobile"
        ],
        "civicAddressId": "civicAddressIdString",
        "allowTenantAddressUpdate": true,
      }
    },
  },
  "configuration": {
    "customSipHeader": "exampleHeaderContents"
  }
}

列出資訊要求

使用端點上的 /teamsRequestsForInformation GET 來取得已由潛在客戶提交給您的 Teams 同意清單。

要求:

GET /teamsRequestsForInformation?api-version=2024-02-29 HTTP/1.1

回應:

{
  "value": [
    {
      "serviceProvisioningStatus": "synced",
      "serviceProvisioningErrors": null,
      "id": "contoso",
      "tenantId": "contosoTenantId",
      "accountName": "contoso",
      "productContext": "teams",
      "operatorId": "string",
      "status": "active",
      "consentedOn": "2024-05-07T11:15:10.519Z",
      "lastModifiedOn": "2024-05-07T11:15:10.519Z",
      "consentedCountries": [
        "string"
      ],
      "contacts": [
        {
          "fullName": "Example Name",
          "email": "example@contoso.com",
          "telephoneNumber": "+1234567890",
          "companyName": "contoso",
          "companySize": "size"
        }
      ],
      "customerRelationship": {
        "status": "example status",
        "lastModifiedOn": "2024-05-07T11:15:10.520Z",
        "comment": "example comment"
      }
    },
    {
      "serviceProvisioningStatus": "synced",
      "serviceProvisioningErrors": null,
      "id": "contoso2",
      "tenantId": "contosoTenantId2",
      "accountName": "contoso2",
      "productContext": "teams",
      "operatorId": "string",
      "status": "active",
      "consentedOn": "2024-05-07T11:15:10.519Z",
      "lastModifiedOn": "2024-05-07T11:15:10.519Z",
      "consentedCountries": [
        "string"
      ],
      "contacts": [
        {
          "fullName": "Example Name2",
          "email": "example@contoso2.com",
          "telephoneNumber": "+1234567891",
          "companyName": "contoso2",
          "companySize": "size"
        }
      ],
      "customerRelationship": {
        "status": "example status",
        "lastModifiedOn": "2024-05-07T11:15:10.520Z",
        "comment": "example comment"
      }
    },
    ... // more RFIs
  ],
  "nextLink": "string"
}

更新資訊要求

在端點上使用 /teamsRequestsForInformation/<tenantID> PATCH 來更新 RFI 的狀態,這會反映在後端服務中。 操作員連線和 Teams 電話 行動裝置可讓您向最終客戶指出要求的狀態,讓更新的狀態出現在客戶的 Teams 管理員 中心。

要求

PATCH /teamsRequestsForInformation/contosoTenantId
{
  "customerRelationship": {
    "status": "new status",
    "comment": "new comment"
  }
}

回應

{
    {
      "serviceProvisioningStatus": "pending",
      "serviceProvisioningErrors": null,
      "id": "contoso",
      "tenantId": "contosoTenantId",
      "accountName": "contoso",
      "productContext": "teams",
      "operatorId": "string",
      "status": "active",
      "consentedOn": "2024-05-07T11:15:10.519Z",
      "lastModifiedOn": "2024-05-07T11:15:10.519Z",
      "consentedCountries": [
        "string"
      ],
      "contacts": [
        {
          "fullName": "Example Name",
          "email": "example@contoso.com",
          "telephoneNumber": "+1234567890",
          "companyName": "contoso",
          "companySize": "size"
        }
      ],
      "customerRelationship": {
        "status": "new status",
        "lastModifiedOn": "2024-05-07T12:15:10.520Z",
        "comment": "new comment"
      }
    }
}

列出指派給帳戶的所有號碼

在端點上使用 /accounts/<accountName>/numbers GET 要求,以取得已針對該帳戶布建的數字清單。

要求:

GET /accounts/contoso/numbers?api-version=2024-02-29 HTTP/1.1

只有 Operator Connect 號碼的帳戶回應:

{
  "value": [
    {
      "serviceProvisioningStatus": "pending",
      "serviceProvisioningErrors": null,
      "telephoneNumber": "+123451",
      "accountName": "contoso",
      "serviceDetails": {
        "teamsOperatorConnect": {
          "enabled": true,
          "assignmentStatus": "assigned",
          "configuration": {
            "usage": "CallingUserAssignment",
            "choosableCapabilities": [
              "InboundCalling",
              "OutboundCalling",
              "Mobile"
            ],
            "civicAddressId": "civicAddressIdString",
            "allowTenantAddressUpdate": true,
          }
        },
      },
      "configuration": {
        "customSipHeader": "exampleHeaderContents"
      }
    },
    ... // more OC numbers
  ],
  nextLink: "string"
}

布建操作員連線和直接路由號碼的帳戶回應:

{
  "value": [
    {
      "serviceProvisioningStatus": "synced",
      "serviceProvisioningErrors": null,
      "telephoneNumber": "+123451",
      "accountName": "contoso",
      "serviceDetails": {
        "teamsOperatorConnect": {
          "enabled": true,
          "assignmentStatus": "assigned",
          "configuration": {
            "usage": "CallingUserAssignment",
            "choosableCapabilities": [
              "InboundCalling",
              "OutboundCalling",
              "Mobile"
            ],
            "civicAddressId": "civicAddressIdString",
            "allowTenantAddressUpdate": true,
          }
        },
      },
      "configuration": {
        "customSipHeader": "exampleHeaderContents"
      }
    },
    {
      "serviceProvisioningStatus": "synced",
      "serviceProvisioningErrors": null,
      "telephoneNumber": "+123452",
      "accountName": "contoso",
      "serviceDetails": {
        "teamsDirectRouting": {
          "enabled": true
        }
      },
      "configuration": {
        "customSipHeader": "exampleHeaderContents"
      }
    },
    ... // more DR and OC numbers
  ],
  nextLink: "string"
}

列出特定帳戶的所有緊急位置

在端點上使用 /accounts/<accountName>/teamsCivicAddresses GET 要求,以取得在該帳戶的 Teams 管理員 中心設定的 Civic Addresses 完整清單。 您可以在帳號內建立或更新數字時,使用此列表的母體擴展作為 locationid

要求:

GET /accounts/contoso/teamsCivicAddresses?api-version=2024-02-29 HTTP/1.1

回應:

{
  "value": [
    {
      "id": "string",
      "country": "string",
      "houseNumber": "string",
      "houseNumberSuffix": "string",
      "preDirectional": "string",
      "streetName": "string",
      "streetSuffix": "string",
      "postDirectional": "string",
      "stateOrProvince": "string",
      "countyOrDistrict": "string",
      "cityOrTown": "string",
      "cityOrTownAlias": "string",
      "postalOrZipCode": "string",
      "description": "string",
      "companyName": "string",
      "companyId": "string",
      "defaultLocationId": "string",
      "validationStatus": "notValidated",
      "tenantId": "string",
      "partnerId": "string",
      "locations": [
        {
          "id": "string",
          "civicAddressId": "string",
          "description": "string",
          "additionalInfo": "string",
          "isDefault": true,
          "elin": "string"
        }
      ],
      "latitude": "string",
      "longitude": "string"
    },
    ... // more locations
  ],
  "nextLink": "string"
}

從帳戶中移除數位

在端點上使用 /accounts/<accountName>/numbers/<telephoneNumber> DELETE 從租用戶釋放數位。 如果獲指派,然後從租用戶釋放號碼,這項作業將會取消指派用戶的數位。

要求:

DELETE /accounts/contoso/numbers/+123451?api-version=2024-02-29 HTTP/1.1

回應:

204 Status Code

疑難排解

  • Teams 直接路由不適用於帳戶上的數位。

    • 藉由在帳戶上傳送 GET 來檢查 DNS 令牌是否已驗證,確認其 serviceDetails.teamsDirectRouting 等於 subdomainStatusProvisioned
  • 我已將數字設定為使用直接路由/縮放,但似乎無法運作。

    • 確認帳戶已設定為使用直接路由/縮放,且號碼已啟用此特定功能。
  • 我已管理連絡 API,但在提出多個要求之後,我的連線就會開始逾時。

    • 布建 API 的速率限制 (為合理的每秒速率) 。 將要求空間縮小或使用批次端點,以避免速率有限。 速率限制最終逾時,您將能夠連線。

下一步

開始與 Azure 通訊閘道布建 API 整合。