You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Azure Communication Services direct routing domain validation
3
-
description: A how-to page about domain validation for direct routing.
3
+
description: Learn howto validate a domain for direct routing.
4
4
services: azure-communication-services
5
5
author: boris-bazilevskiy
6
6
@@ -12,54 +12,49 @@ ms.custom: include file
12
12
ms.author: nikuklic
13
13
---
14
14
15
-
# Domain validation
15
+
# Validate a domain for direct routing
16
16
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.
18
18
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.
20
20
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.
24
22
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.
26
24
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`.
28
26
29
-
### Domain verification using Azure portal
27
+
##Add a new domain name
30
28
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.
37
33
1. Reenter the domain name.
38
-
1. Select Confirm and then select Add.
34
+
1. Select **Confirm**, and then select **Add**.
39
35
40
36
[](./media/direct-routing-add-domain.png#lightbox)
41
37
42
-
####Verify domain ownership
38
+
## Verify domain ownership
43
39
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.
46
42
47
-
[](./media/direct-routing-verify-domain-2.png#lightbox)
43
+
[](./media/direct-routing-verify-domain-2.png#lightbox)
48
44
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.
51
46
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.
53
48
54
-
[](./media/direct-routing-domain-verified.png#lightbox)
49
+
[](./media/direct-routing-domain-verified.png#lightbox)
55
50
56
-
####Remove domain from Azure Communication Services
51
+
## Remove a domain from Azure Communication Services
57
52
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**.
59
54
60
55
[](./media/direct-routing-remove-domain.png#lightbox)
61
56
62
-
## Next steps:
57
+
## Next steps
63
58
64
59
### Conceptual documentation
65
60
@@ -70,4 +65,4 @@ If you want to remove a domain from your Azure Communication Services direct rou
70
65
### Quickstarts
71
66
72
67
-[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)
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.
4
4
services: azure-communication-services
5
5
author: boris-bazilevskiy
6
6
@@ -16,24 +16,27 @@ ms.author: nikuklic
16
16
17
17
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
18
18
- 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.
22
22
23
23
## Final code
24
24
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).
26
26
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).
28
28
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:
30
32
31
33
```console
32
34
dotnet new console -o DirectRoutingQuickstart
33
35
```
34
36
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:
37
40
38
41
```console
39
42
cd DirectRoutingQuickstart
@@ -42,39 +45,35 @@ Change your directory to the newly created app folder and use the dotnet build c
42
45
43
46
## Install the package
44
47
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:
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:
52
55
53
56
```csharp
54
57
usingAzure.Communication.PhoneNumbers.SipRouting;
55
58
```
56
59
57
60
## Authenticate the client
58
61
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):
60
63
61
64
```csharp
62
-
// Get a connection string to our Azure Communication Services resource.
65
+
// Get a connection string to the Azure Communication Services resource.
63
66
varconnectionString="<connection_string>";
64
67
varclient=newSipRoutingClient(connectionString);
65
68
```
66
69
67
-
## Setup direct routing configuration
70
+
## Set up a direct routing configuration
68
71
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.
70
73
71
-
1. Domain ownership verification - see [prerequisites](#prerequisites)
72
-
1. Creating trunks (adding SBCs)
73
-
1. Creating voice routes
74
+
### Create or update trunks
74
75
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:
78
77
79
78
```csharp
80
79
// Register your SBCs by providing their fully qualified domain names and port numbers.
> 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.
95
95
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 `+`:
>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.
116
115
117
-
### Removing a direct routing configuration
116
+
##Remove a direct routing configuration
118
117
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:
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.
<!-- 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