Skip to content

Commit f05af72

Browse files
authored
Merge pull request #235078 from ShawnJackson/communication-services-telephony
[AQ] edit pass: Articles about configuring voice routing and validating a domain
2 parents 978d581 + a9f00a1 commit f05af72

File tree

7 files changed

+206
-235
lines changed

7 files changed

+206
-235
lines changed
Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Azure Communication Services direct routing domain validation
3-
description: A how-to page about domain validation for direct routing.
3+
description: Learn how to validate a domain for direct routing.
44
services: azure-communication-services
55
author: boris-bazilevskiy
66

@@ -12,54 +12,49 @@ ms.custom: include file
1212
ms.author: nikuklic
1313
---
1414

15-
# Domain validation
15+
# Validate a domain for direct routing
1616

17-
This page describes the process of domain name ownership validation. Fully Qualified Domain Name (FQDN) consists of two parts: host name and domain name. For example, if your session border controller (SBC) name is `sbc1.contoso.com`, then `sbc1` would be a host name, while `contoso.com` would be a domain name. If there's an SBC with FQDN of `acs.sbc1.testing.contoso.com`, `acs` would be a host name, and `sbc1.testing.contoso.com` would be a domain name. To use direct routing, you need to validate that you own a domain part of your FQDN.
17+
This article describes the process of validating domain name ownership by using the Azure portal.
1818

19-
Azure Communication Services direct routing configuration consists of the following steps:
19+
A fully qualified domain name (FQDN) consists of two parts: host name and domain name. For example, if your session border controller (SBC) name is `sbc1.contoso.com`, then `sbc1` is the host name and `contoso.com` is the domain name. If an SBC has an FQDN of `acs.sbc1.testing.contoso.com`, then `acs` is the host name and `sbc1.testing.contoso.com` is the domain name.
2020

21-
- Verify domain ownership for your SBC FQDN
22-
- Configure SBC FQDN and port number
23-
- Create voice routing rules
21+
To use direct routing in Azure Communication Services, you need to validate that you own the domain part of your SBC FQDN. After that, you can configure the SBC FQDN and port number and then create voice routing rules.
2422

25-
## Domain ownership validation
23+
When you're verifying the domain name portion of the SBC FQDN, keep in mind that the `*.onmicrosoft.com` and `*.azure.com` domain names aren't supported. For example, if you have two domain names, `contoso.com` and `contoso.onmicrosoft.com`, use `sbc.contoso.com` as the SBC name.
2624

27-
Make sure to add and verify domain name portion of the FQDN and keep in mind that the `*.onmicrosoft.com` and `*.azure.com` domain names aren't supported for the SBC FQDN domain name. For example, if you have two domain names, `contoso.com` and `contoso.onmicrosoft.com`, use `sbc.contoso.com` as the SBC name. If using a subdomain, make sure this subdomain is also added and verified. For example, if you want to use `sbc.acs.contoso.com`, then `acs.contoso.com` needs to be registered.
25+
If you're using a subdomain, make sure that this subdomain is also added and verified. For example, if you want to use `sbc.acs.contoso.com`, you need to register `acs.contoso.com`.
2826

29-
### Domain verification using Azure portal
27+
## Add a new domain name
3028

31-
#### Add new domain name
32-
33-
1. Open Azure portal and navigate to your [Communication Service resource](../../quickstarts/create-communication-resource.md).
34-
1. In the left navigation pane, select Direct routing under Voice Calling - PSTN.
35-
1. Select Connect domain from the Domains tab.
36-
1. Enter the domain part of SBC’s fully qualified domain name.
29+
1. Open the Azure portal and go to your [Communication Services resource](../../quickstarts/create-communication-resource.md).
30+
1. On the left pane, under **Voice Calling - PSTN**, select **Direct routing**.
31+
1. On the **Domains** tab, select **Connect domain**.
32+
1. Enter the domain part of the SBC FQDN.
3733
1. Reenter the domain name.
38-
1. Select Confirm and then select Add.
34+
1. Select **Confirm**, and then select **Add**.
3935

4036
[![Screenshot of adding a custom domain.](./media/direct-routing-add-domain.png)](./media/direct-routing-add-domain.png#lightbox)
4137

42-
#### Verify domain ownership
38+
## Verify domain ownership
4339

44-
1. Select Verify next to new domain that is now visible in Domain’s list.
45-
1. Azure portal generates a value for a TXT record, you need to add that record to
40+
1. On the **Domains** tab, select **Verify** next to the new domain that you created.
41+
1. The Azure portal generates a value for a TXT record. Add that record to your domain's registrar or DNS hosting provider with the provided value.
4642

47-
[![Screenshot of verifying a custom domain.](./media/direct-routing-verify-domain-2.png)](./media/direct-routing-verify-domain-2.png#lightbox)
43+
[![Screenshot of verifying a custom domain.](./media/direct-routing-verify-domain-2.png)](./media/direct-routing-verify-domain-2.png#lightbox)
4844

49-
>[!Note]
50-
>It might take up to 30 minutes for new DNS record to propagate on the Internet
45+
It might take up to 30 minutes for a new DNS record to propagate on the internet.
5146

52-
3. Select Next. If everything is set up correctly, you should see Domain status changed to *Verified* next to the added domain.
47+
1. Select **Next**. If you set up everything correctly, **Domain status** should change to **Verified** next to the added domain.
5348

54-
[![Screenshot of a verified domain.](./media/direct-routing-domain-verified.png)](./media/direct-routing-domain-verified.png#lightbox)
49+
[![Screenshot of a verified domain.](./media/direct-routing-domain-verified.png)](./media/direct-routing-domain-verified.png#lightbox)
5550

56-
#### Remove domain from Azure Communication Services
51+
## Remove a domain from Azure Communication Services
5752

58-
If you want to remove a domain from your Azure Communication Services direct routing configuration, select the checkbox fir a corresponding domain name, and select *Remove*.
53+
If you want to remove a domain from your Azure Communication Services direct routing configuration, select the checkbox for a corresponding domain name, and then select **Remove**.
5954

6055
[![Screenshot of removing a custom domain.](./media/direct-routing-remove-domain.png)](./media/direct-routing-remove-domain.png#lightbox)
6156

62-
## Next steps:
57+
## Next steps
6358

6459
### Conceptual documentation
6560

@@ -70,4 +65,4 @@ If you want to remove a domain from your Azure Communication Services direct rou
7065
### Quickstarts
7166

7267
- [Outbound call to a phone number](../../quickstarts/telephony/pstn-call.md)
73-
- [Redirect inbound telephony calls with Call Automation](../../quickstarts/call-automation/redirect-inbound-telephony-calls.md)
68+
- [Redirect inbound telephony calls with Call Automation](../../quickstarts/call-automation/redirect-inbound-telephony-calls.md)
Lines changed: 31 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: include file
3-
description: A quickstart on how to use Number Management C# SDK to configure direct routing.
3+
description: Learn how to use the Number Management C# SDK to configure direct routing.
44
services: azure-communication-services
55
author: boris-bazilevskiy
66

@@ -16,24 +16,27 @@ ms.author: nikuklic
1616

1717
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
1818
- An active Communication Services resource and connection string. [Create a Communication Services resource](../../create-communication-resource.md).
19-
- The latest version [.NET Core client library](https://dotnet.microsoft.com/download/dotnet-core) for your operating system.
20-
- Fully Qualified Domain Name (FQDN) and port number of a Session Border Controller (SBC) in operational telephony system.
21-
- [Verified domain name](../../../how-tos/telephony/domain-validation.md) of the SBC FQDN.
19+
- The latest version of the [.NET Core client library](https://dotnet.microsoft.com/download/dotnet-core) for your operating system.
20+
- The fully qualified domain name (FQDN) and port number of a session border controller (SBC) in an operational telephony system.
21+
- The [verified domain name](../../../how-tos/telephony/domain-validation.md) of the SBC FQDN.
2222

2323
## Final code
2424

25-
Find the finalized code for this quickstart on [GitHub](https://github.com/Azure-Samples/communication-services-dotnet-quickstarts/tree/main/DirectRouting)
25+
Find the finalized code for this quickstart on [GitHub](https://github.com/Azure-Samples/communication-services-dotnet-quickstarts/tree/main/DirectRouting).
2626

27-
## Create a new C# application
27+
You can also find more usage examples for `SipRoutingClient` on [GitHub](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/communication/Azure.Communication.PhoneNumbers/README.md#siproutingclient).
2828

29-
In a console window (such as cmd, PowerShell, or Bash), use the `dotnet new` command to create a new console app.
29+
## Create a C# application
30+
31+
In a console window (such as Command Prompt, PowerShell, or Bash), use the `dotnet new` command to create a new console app:
3032

3133
```console
3234
dotnet new console -o DirectRoutingQuickstart
3335
```
3436

35-
This command creates a simple "Hello World" C# project with a single source file: **Program.cs**.
36-
Change your directory to the newly created app folder and use the dotnet build command to compile your application.
37+
This command creates a simple "Hello World" C# project with a single source file: *Program.cs*.
38+
39+
Change your directory to the newly created app folder, and use the `dotnet build` command to compile your application:
3740

3841
``` console
3942
cd DirectRoutingQuickstart
@@ -42,39 +45,35 @@ Change your directory to the newly created app folder and use the dotnet build c
4245

4346
## Install the package
4447

45-
While still in the application directory, install the Azure Communication PhoneNumbers client library for .NET package by using the dotnet add package command.
48+
While you're still in the application directory, install the Azure Communication PhoneNumbers client library for .NET by using the `dotnet add package` command:
4649

4750
``` console
4851
dotnet add package Azure.Communication.PhoneNumbers --version 1.1.0
4952
```
5053

51-
Add a using directive to the top of **Program.cs** to include the namespaces.
54+
Add a `using` directive to the top of *Program.cs* to include the namespaces:
5255

5356
``` csharp
5457
using Azure.Communication.PhoneNumbers.SipRouting;
5558
```
5659

5760
## Authenticate the client
5861

59-
Phone Number clients can be authenticated using [connection string from an Azure Communication Services resource](../../create-communication-resource.md#access-your-connection-strings-and-service-endpoints).
62+
Authenticate phone number clients by using a [connection string from an Azure Communication Services resource](../../create-communication-resource.md#access-your-connection-strings-and-service-endpoints):
6063

6164
``` csharp
62-
// Get a connection string to our Azure Communication Services resource.
65+
// Get a connection string to the Azure Communication Services resource.
6366
var connectionString = "<connection_string>";
6467
var client = new SipRoutingClient(connectionString);
6568
```
6669

67-
## Setup direct routing configuration
70+
## Set up a direct routing configuration
6871

69-
Direct routing configuration consists of:
72+
In the [prerequisites](#prerequisites), you verified domain ownership. The next steps are to create trunks (add SBCs) and create voice routes.
7073

71-
1. Domain ownership verification - see [prerequisites](#prerequisites)
72-
1. Creating trunks (adding SBCs)
73-
1. Creating voice routes
74+
### Create or update trunks
7475

75-
### Create or update Trunks
76-
77-
Azure Communication Services direct routing allows communication with registered SBCs only. To register an SBC you need its FQDN and port.
76+
Azure Communication Services direct routing allows communication with registered SBCs only. To register an SBC, you need its FQDN and port:
7877

7978
``` csharp
8079
// Register your SBCs by providing their fully qualified domain names and port numbers.
@@ -90,10 +89,11 @@ await client.SetTrunksAsync(new List<SipTrunk> { usTrunk, euTrunk });
9089

9190
### Create or update routes
9291

93-
> [!NOTE]
94-
> Order of routes does matter, as it determines priority of routes. The first route that matches the regex will be picked for a call.
92+
Provide routing rules for outbound calls. Each rule consists of two parts: a regex pattern that should match a dialed phone number, and the FQDN of a registered trunk where the call is routed.
93+
94+
The order of routes determines the priority of routes. The first route that matches the regex will be picked for a call.
9595

96-
For outbound calling routing rules should be provided. Each rule consists of two parts: regex pattern that should match dialed phone number and FQDN of a registered trunk where call is routed. In this example, we create one route for numbers that start with `+1` and a second route for numbers that start with just `+`
96+
In this example, you create one route for numbers that start with `+1` and a second route for numbers that start with just `+`:
9797

9898
``` csharp
9999
var usRoute = new SipTrunkRoute("UsRoute", "^\\+1(\\d{10})$", trunks: new List<string> { usSbcFqdn });
@@ -102,37 +102,31 @@ var defaultRoute = new SipTrunkRoute("DefaultRoute", "^\\+\\d+$", trunks: new Li
102102
await client.SetRoutesAsync(new List<SipTrunkRoute> { usRoute, defaultRoute });
103103
```
104104

105-
### Updating existing configuration
105+
## Update a direct routing configuration
106106

107-
Properties of specific Trunk can be updated by overwriting the record with the same FQDN. For example, you can set new SBC Port value.
107+
You can update the properties of a specific trunk by overwriting the record with the same FQDN. For example, you can set a new SBC port value:
108108

109109
``` csharp
110110
var usTrunk = new SipTrunk("sbc.us.contoso.com", 5063);
111111
await client.SetTrunkAsync(usTrunk);
112112
```
113113

114-
> [!IMPORTANT]
115-
>The same method is used to create and update routing rules. When updating routes, all routes should be sent in single update and routing configuration will be fully overwritten by the new one.
114+
You use the same method to create and update routing rules. When you update routes, send all of them in a single update. The new routing configuration fully overwrites the former one.
116115

117-
### Removing a direct routing configuration
116+
## Remove a direct routing configuration
118117

119-
You can't edit or remove single voice route. Entire voice routing configuration should be overwritten. Here's the example of an empty list that removes all the routes and trunks:
118+
You can't edit or remove a single voice route. You should overwrite the entire voice routing configuration. Here's an example of an empty list that removes all the routes and trunks:
120119

121120
``` csharp
122121
//delete all configured voice routes
123122
await client.SetRoutesAsync(new List<SipTrunkRoute>());
124123

125124
//delete all trunks
126125
await client.SetTrunksAsync(new List<SipTrunk>());
127-
```
126+
```
128127

129-
You can delete a single trunk (SBC), if it isn't used in any voice route. If SBC is listed in any voice route, that route should be deleted first.
128+
You can use the following example to delete a single trunk (SBC), if no voice routes are using it. If the SBC is listed in any voice route, delete that route first.
130129

131130
``` csharp
132131
await client.DeleteTrunkAsync("sbc.us.contoso.com");
133132
```
134-
135-
<!-- All direct routing configuration can be deleted by overriding routes and trunks configuration with a new configuration or an empty list. Same methods are used in "Create or Update Trunks" and "Create or Update Routes" sections. -->
136-
137-
> [!NOTE]
138-
> More usage examples for SipRoutingClient can be found [here](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/communication/Azure.Communication.PhoneNumbers/README.md#siproutingclient).

0 commit comments

Comments
 (0)