將您的會話邊界控制器(SBC)連線至直接路由Connect your Session Border Controller (SBC) to Direct Routing

本文說明如何設定會話邊界控制器(SBC),並將它連線至 [電話系統直接路由]。This article describes how to configure a Session Border Controller (SBC) and connect it to Phone System Direct Routing. 以下是設定直接路由的步驟1:This is step 1 of the following steps to configure Direct Routing:

如需設定直接路由所需的所有步驟的詳細資訊,請參閱設定直接路由For information on all the steps required to set up Direct Routing, see Configure Direct Routing.

您可以使用Microsoft 團隊系統管理中心POWERSHELL來設定 SBC,並將其連線至直接路由。You can use the Microsoft Teams admin center or PowerShell to configure and connect an SBC to Direct Routing.

使用 Microsoft Teams 系統管理中心Using the Microsoft Teams admin center

  1. 在左側導覽中,移至 [語音 > 直式路由],然後按一下 [ SBCs ] 索引標籤。In the left navigation, go to Voice > Direct Routing, and then click the SBCs tab.

  2. 按一下 [新增]。Click Add.

  3. 輸入 SBC 的 FQDN。Enter a FQDN for the SBC.

    確認 FQDN 的功能變數名稱部分符合您在租使用者註冊的網域,並請記住, *.onmicrosoft.com SBC FQDN 功能變數名稱不支援該功能變數名稱。Make sure the domain name portion of the FQDN matches a domain that's registered in your tenant and keep in mind that the *.onmicrosoft.com domain name isn't supported for the SBC FQDN domain name. 例如,如果您有兩個功能變數名稱, contoso.comcontoso.onmicrosoft.com 使用的 sbc.contoso.com 是 SBC 名稱。For example, if you have two domain names, contoso.com and contoso.onmicrosoft.com, use sbc.contoso.com as the SBC name.

  4. 根據貴組織的需求,為 SBC 設定下列設定。Configure the following settings for the SBC, based on your organization's needs. 如需這些設定的詳細資料,請參閱SBC 設定For details on each of these settings, see SBC settings.

    Microsoft 團隊系統管理中心 [新增 SBC] 頁面的螢幕擷取畫面

  5. 完成後,按一下 [儲存]****。When you're done, click Save.

使用 PowerShellUsing PowerShell

若要將您的 SBC 連線至直接路由,您必須:To connect your SBC to Direct Routing, you'll need to:

  1. 使用 PowerShell 連線到商務用 Skype OnlineConnect to Skype for Business Online by using PowerShell.
  2. 將 SBC 連接至租使用者。Connect the SBC to the tenant.
  3. 確認 SBC連線。Verify the SBC connection.

使用 PowerShell 連線到商務用 Skype OnlineConnect to Skype for Business Online by using PowerShell

您可以使用連接至租使用者的 PowerShell 會話,將 SBC 與直接路由介面配對。You can use a PowerShell session connected to the tenant to pair the SBC to the Direct Routing interface. 若要開啟 PowerShell 會話,請依照設定您的 Windows PowerShell 電腦中所述的步驟進行。To open a PowerShell session, follow the steps outlined in Set up your computer for Windows PowerShell.

建立遠端 PowerShell 會話之後,請確認您可以看到管理 SBC 的命令。After you establish a remote PowerShell session, verify that you can see the commands to manage the SBC. 若要驗證命令,請在 PowerShell 會話中輸入或複製並貼上下列命令,然後按 Enter:To verify the commands, type or copy and paste the following command in the PowerShell session, and then press Enter:

Get-Command *onlinePSTNGateway*

這個命令會傳回這裡顯示的四個函數,讓您管理 SBC。The command returns the four functions shown here that will let you manage the SBC.

CommandType    Name                       Version    Source 
-----------    ----                       -------    ------ 
Function       Get-CsOnlinePSTNGateway    1.0        tmp_v5fiu1no.wxt 
Function       New-CsOnlinePSTNGateway    1.0        tmp_v5fiu1no.wxt 
Function       Remove-CsOnlinePSTNGateway 1.0        tmp_v5fiu1no.wxt 
Function       Set-CsOnlinePSTNGateway    1.0        tmp_v5fiu1no.wxt

將 SBC 連接至租使用者Connect the SBC to the tenant

使用CsOnlinePSTNGateway CMDLET 將 SBC 連接至租使用者。Use the New-CsOnlinePSTNGateway cmdlet to connect the SBC to the tenant. 在 PowerShell 會話中,輸入下列內容,然後按 Enter:In a PowerShell session, type the following, and then press Enter:

New-CsOnlinePSTNGateway -Fqdn <SBC FQDN> -SipSignalingPort <SBC SIP Port> -MaxConcurrentSessions <Max Concurrent Sessions the SBC can handle> -Enabled $true

注意

  1. 我們建議您在 SBC 中使用可在 SBC 檔中找到的資訊來設定最大通話限制。We recommend that you set a maximum call limit in the SBC using information that can be found in the SBC documentation. 如果 SBC 是容量等級,則限制會觸發通知。The limit will trigger a notification if the SBC is at the capacity level.
  2. 您只能在 SBC 的網域部分與您在租使用者中註冊的其中一個網域(onmicrosoft.com 除外)進行連接。 *You can only connect the SBC if the domain portion of its FQDN matches one of the domains registered in your tenant, except *.onmicrosoft.com. *SBC FQDN 名稱不支援使用 onmicrosoft.com 功能變數名稱。Using *.onmicrosoft.com domain names is not supported for the SBC FQDN name. 例如,如果您有兩個功能變數名稱、 contosocontosoonmicrosoft.com,就可以使用 sbc 來取得 sbc 名稱。For example, if you have two domain names, contoso.com and contoso.onmicrosoft.com, you can use sbc.contoso.con for the SBC name. 如果您嘗試使用名稱(例如 SBC)來連接 SBC,則系統不會讓您,因為該域不是由這個租使用者所擁有。If you try to connect the SBC with a name such as sbc.contoso.abc, the system won't let you, as the domain is not owned by this tenant.
    除了在您的租使用者中註冊的網域之外,您還必須擁有擁有該網域的使用者以及指派的 E3 或 E5 授權。In addition to the domain registered in your tenant, it's important that there's a user with that domain and an assigned E3 or E5 license. 如果不是,您會收到下列錯誤:If not, you'll receive the following error:
    Can not use the "sbc.contoso.com" domain as it was not configured for this tenant.Can not use the "sbc.contoso.com" domain as it was not configured for this tenant.

以下是一個範例:Here's an example:

New-CsOnlinePSTNGateway -Identity sbc.contoso.com -Enabled $true -SipSignalingPort 5067 -MaxConcurrentSessions 100 

返回:Which returns:

Identity              : sbc.contoso.com 
Fqdn                  : sbc.contoso.com 
SipSignalingPort     : 5067 
FailoverTimeSeconds   : 10 
ForwardCallHistory    : False 
ForwardPai            : False 
SendSipOptions        : True 
MaxConcurrentSessions : 100 
Enabled               : True   

注意

這個範例只會顯示所需的最低參數。This example shows only the minimum required parameters. 您可以在連線過程中,使用CsOnlinePSTNGateway Cmdlet 來設定其他參數。There are additional parameters that you can set with the New-CsOnlinePSTNGateway cmdlet during the connection process. 若要深入瞭解,請參閱SBC 設定To learn more, see SBC settings.

驗證 SBC 連接Verify the SBC connection

若要驗證連接:To verify the connection:

檢查 SBC 是否在成對的 SBCs 清單中Check whether the SBC is on the list of paired SBCs

在您連接 SBC 之後,請使用CsOnlinePSTNGateway Cmdlet,確認 SBC 出現在成對的 SBCs 清單中。After you connect the SBC, use the Get-CsOnlinePSTNGateway cmdlet to verify that the SBC is present in the list of paired SBCs. 在遠端 PowerShell 會話中輸入以下內容,然後按 Enter:Type the following in a remote PowerShell session, and then press Enter:

Get-CsOnlinePSTNGateway -Identity sbc.contoso.com  

成對閘道應該會出現在清單中,如下列範例所示,且Enabled參數應該顯示True值。The paired gateway should appear in the list as shown in the example below, and the Enabled parameter should display a value of True.

返回:Which returns:

Identity              : sbc.contoso.com  
Fqdn                  : sbc.contoso.com
SipSignalingPort     : 5067
CodecPriority         : SILKWB,SILKNB,PCMU,PCMA
ExcludedCodecs        :  
FailoverTimeSeconds   : 10
ForwardCallHistory    : False
ForwardPai            : False
SendSipOptions        : True
MaxConcurrentSessions : 100
Enabled               : True

驗證 SIP 選項Validate SIP options

若要使用外寄 SIP 選項驗證配對,請使用 SBC 管理介面,並確認 SBC 是否收到其外寄選項訊息的 200 OK 回應。To validate the pairing using outgoing SIP options, use the SBC management interface and confirm that the SBC receives 200 OK responses to its outgoing OPTIONS messages.

當直接路由查看內送的選項時,它會開始將傳出的 SIP 選項訊息傳送到 [傳入選項] 訊息中的 [連絡人頭] 欄位中設定的 SBC FQDN。When Direct Routing sees incoming OPTIONS, it will start sending outgoing SIP Options messages to the SBC FQDN configured in the Contact header field in the incoming OPTIONS message.

若要使用傳入的 SIP 選項驗證配對,請使用 SBC 管理介面,並查看 SBC 會傳送回復給來自直接路由的選項訊息,且其傳送的回應代碼為 200 OK。To validate the pairing using incoming SIP options, use the SBC management interface and see that the SBC sends a reply to the OPTIONS messages coming in from Direct Routing and that the response code it sends is 200 OK.

SBC 設定SBC settings

下表列出您可以在 Microsoft 團隊系統管理中心和使用CsOnlinePSTNGateway Cmdlet 設定的 SBC 選項。This table lists the options that you can set for the SBC in the Microsoft Teams admin center and by using the New-CsOnlinePSTNGateway cmdlet.

必填?Required? Microsoft 團隊系統管理中心設定Microsoft Teams admin center setting PowerShell 參數PowerShell parameter 描述Description 設置Default 可能值Possible values 類型與限制Type and restrictions
Yes 為 SBC 新增 FQDNAdd an FQDN for the SBC FQDN None FQDN 名稱,限制63字元FQDN name, limit 63 characters 字串,請參閱適用于電腦、網域、網站和組織單位之 Active Directory 中的命名約定的允許和禁止字元清單String, see the list of allowed and disallowed characters on Naming conventions in Active Directory for computers, domains, sites, and OUs
No Enabled Enabled 用來針對撥出通話開啟 SBC。Use to turn on the SBC for outbound calls. 您可以使用此程式在服務更新期間或在維護期間,暫時將 SBC 從服務中移除。You can use this to temporarily remove the SBC from service while it's being updated or during maintenance. 虛假False 滿足True
虛假False
BooleanBoolean
Yes SIP 信號埠SIP signaling port SipSignalingPortSipSignalingPort 這是用來透過傳輸層(TLS)通訊協定與直接路由進行通訊的偵聽埠。This is the listening port that's used to communicate with Direct Routing by using the Transport Layer (TLS) protocol. None 任何埠Any port 0到655350 to 65535
No 傳送 SIP 選項Send SIP options SendSIPOptionsSendSIPOptions 定義 SBC 是否會傳送 SIP 選項訊息。Defines whether the SBC will send SIP options messages. 我們強烈建議您開啟此設定。We highly recommend that you turn on this setting. 當此設定為 [關閉] 時,系統會將 SBC 排除在監視及報警系統中。When this setting is off, the SBC is excluded from the Monitoring and Alert system. 滿足True 滿足True
虛假False
BooleanBoolean
No 轉接通話記錄Forward call history ForwardCallHistoryForwardCallHistory 指出通話記錄資訊是否是透過主幹來轉寄。Indicates whether call history information is forwarded through the trunk. 當您開啟此程式時,Microsoft 365 或 Office 365 proxy 會傳送歷程記錄資訊,並依標頭所參照。When you turn this on, the Microsoft 365 or Office 365 proxy sends a History-info and Referred-by header. 虛假False 滿足True
虛假False
BooleanBoolean
No 轉寄 P-已斷言身分識別(PAI)標頭Forward P-Asserted-identity (PAI) header ForwardPAIForwardPAI 指示 PAI 標頭是否與通話一起轉寄。Indicates whether the PAI header is forwarded along with the call. PAI 標頭可用於驗證來電者的身分識別。The PAI header provides a way to verify the identity of the caller. 如果此設定為 [開啟],則也會傳送隱私權: ID 標頭。If this setting is on, the Privacy:ID header is also sent. 虛假False 滿足True
虛假False
BooleanBoolean
No 並行通話容量Concurrent call capacity MaxConcurrentSessionsMaxConcurrentSessions 當您設定值時,當併發會話數量為90% 或高於此值時,警示系統會通知您。When you set a value, the alerting system will notify you when the number of concurrent sessions is 90 percent or higher than this value. 如果您沒有設定值,就不會產生警示。If you don't set a value, alerts aren't generated. 不過,監視系統會每隔24小時報告併發會話數目。However, the monitoring system will report the number of concurrent sessions every 24 hours. Null Null
1到1000001 to 100,000
No 容錯移轉回應代碼Failover response codes FailoverResponseCodesFailoverResponseCodes
如果直接路由收到任何用於回應傳出邀請的4xx 或 6xx SIP 錯誤碼,則預設會視為已完成通話。If Direct Routing receives any 4xx or 6xx SIP error code in response to an outgoing Invite, the call is considered completed by default. [外寄] 表示從團隊用戶端撥打電話至 PSTN 與流量流程:團隊用戶端-> 直接路由-> SBC > 電話網絡)。Outgoing means a call from a Teams client to the PSTN with traffic flow: Teams client -> Direct Routing -> SBC -> telephony network). 當您指定容錯移轉回應程式碼時,會強制進行直接路由來嘗試另一個 SBC (如果使用者的語音路由原則中存在另一個 SBC),而當 SBC 由於網路或其他問題而無法撥打電話時,會收到指定的程式碼。When you specify a failover response code, this forces Direct Routing to try another SBC (if another SBC exists in the voice routing policy of the user) when it receives the specified codes if the SBC can't make a call because of network or other issues. 若要深入瞭解,請參閱從會話邊界控制器(SBC)收到的特定 SIP 代碼的容錯移轉To learn more, see Failover of specific SIP codes received from the Session Border Controller (SBC). 408、503、504408, 503, 504 IntInt
No 容錯移轉時間(秒)Failover times (seconds) FailoverTimeSecondsFailoverTimeSeconds 當您設定值時,在您設定的時間內,閘道未接聽的出站通話會傳送到下一個可用的幹線。When you set a value, outbound calls that aren't answered by the gateway within the time that you set are routed to the next available trunk. 如果沒有其他 trunks,就會自動中斷通話。If there are no additional trunks, the call is automatically dropped. 預設值為10秒。The default value is 10 seconds. 在有緩慢網路和閘道回應的組織中,這可能會導致不必要地放棄呼叫。In an organization with slow networks and gateway responses, this could potentially result in calls being dropped unnecessarily. 10 電話Number IntInt
No 媒體流量的喜好國家或地區Preferred country or region for media traffic MediaRelayRoutingLocationOverrideMediaRelayRoutingLocationOverride 用來手動設定媒體流量的喜好國家或地區。Use to manually set your preferred country or region for media traffic. 我們建議您只有在通話記錄清楚指出媒體路徑的資料中心的預設指派無法使用最接近 SBC 資料中心的路徑時,才能設定此選項。We recommend that you set this only if the call logs clearly indicate that the default assignment of the datacenter for the media path doesn't use the path closest to the SBC datacenter. 根據預設,直接路由會根據 SBC 的公用 IP 位址來指派資料中心,並總是選取最接近 SBC 資料中心的路徑。By default, Direct Routing assigns a datacenter based on the public IP address of the SBC, and always selects the path closest to the SBC datacenter. 不過,在某些情況下,預設路徑可能不是最佳路徑。However, in some cases, the default path might not be the optimal path. 此參數可讓您手動設定媒體流量的喜好區域。This parameter allows you to manually set the preferred region for media traffic. None ISO 格式的國家/地區代碼Country codes in ISO format
No SBC 支援 PIDF/LO 以進行緊急通話SBC supports PIDF/LO for emergency calls PidfloSupportedPidfloSupported 指定 SBC 是否支援緊急呼叫的「目前狀態資訊資料格式位置」物件(PIDF/LO)。Specify whether the SBC supports Presence Information Data Format Location Object (PIDF/LO) for emergency calls.
No 嘗試尋找使用者時撥打電話Ring phone while trying to find the user GenerateRingingWhileLocatingUserGenerateRingingWhileLocatingUser 設定是否要在來電者中播放音訊信號,以指出團隊正在進行通話的過程。Set whether an audio signal is played to the caller to indicate that Teams is in the process of establishing the call. 此設定僅適用于非媒體旁路模式中的直接路由。This setting only applies to Direct Routing in non-media bypass mode. 有時,從 PSTN 到團隊用戶端的撥入呼叫可能需要比預期更長的時間才能建立。Sometimes inbound calls from the PSTN to Teams clients can take longer than expected to be established. 在這種情況下,來電者可能不會聽到任何問題,小組用戶端就不會響鈴,而且通話可能會被某些電訊提供者取消。When this happens, the caller might not hear anything, the Teams client doesn't ring, and the call might be canceled by some telecommunications providers. 此設定可協助避免在這些案例中可能會發生的意外 silences。This setting helps to avoid unexpected silences that can occur in these scenarios. 滿足True 滿足True
虛假False
BooleanBoolean
No - MediaBypassMediaBypass 這個設定指出 SBC 是否支援媒體旁路,以及您是否要將它用於此 SBC。This setting indicates whether the SBC supports media bypass and whether you want to use it for this SBC. None 滿足True
虛假False
BooleanBoolean

另請參閱See also

規劃直接路由Plan Direct Routing

設定直接路由Configure Direct Routing

Teams PowerShell 概觀Teams PowerShell overview