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
Copy file name to clipboardExpand all lines: articles/communication-services/how-tos/telephony/domain-validation.md
+21-25Lines changed: 21 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
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,50 @@ 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. 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` would be a host name and`contoso.com` would be a domain name. If there's an SBC with FQDN of `acs.sbc1.testing.contoso.com`, `acs`is a host name and `sbc1.testing.contoso.com`is a domain name. To use direct routing, you need to validate that you own the domain part of your FQDN.
18
18
19
-
Azure Communication Services direct routing configuration consists of the following steps:
19
+
To configure direct routing configuration in Azure Communication Services, you first verify domain ownership for your SBC FQDN. You then configure the SBC FQDN and port number and create voice routing rules.
20
20
21
-
- Verify domain ownership for your SBC FQDN
22
-
- Configure SBC FQDN and port number
23
-
- Create voice routing rules
21
+
## Validate domain ownership by using the Azure portal
24
22
25
-
## Domain ownership validation
23
+
When you're verifying the domain name portion of the FQDN, 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.
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
40
1. Select Verify next to new domain that is now visible in Domain’s list.
45
41
1. Azure portal generates a value for a TXT record, you need to add that record to
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
+
>[!NOTE]
46
+
>It might take up to 30 minutes for new DNS record to propagate on the Internet
51
47
52
-
3. Select Next. If everything is set up correctly, you should see Domain status changed to *Verified* next to the added domain.
48
+
1. Select Next. If everything is set up correctly, you should see Domain status changed to *Verified* next to the added domain.
53
49
54
-
[](./media/direct-routing-domain-verified.png#lightbox)
50
+
[](./media/direct-routing-domain-verified.png#lightbox)
55
51
56
-
####Remove domain from Azure Communication Services
52
+
### Remove a domain from Azure Communication Services
57
53
58
54
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*.
59
55
60
56
[](./media/direct-routing-remove-domain.png#lightbox)
description: A quickstart on how to use Number Management JavaScript SDK to configure direct routing.
3
+
description: Learn how to use the Number Management JavaScript SDK to configure direct routing.
4
4
services: azure-communication-services
5
5
author: boris-bazilevskiy
6
6
@@ -15,29 +15,30 @@ ms.author: nikuklic
15
15
## Prerequisites
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
-
- An active Communication Services resource and connection string. [Create a Communication Services resource](../../create-communication-resource.md)).
19
-
- Active LTS and Maintenance LTS versions of [Node.js](https://nodejs.org/) 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.
18
+
- An active Azure Communication Services resource and connection string. [Create a Communication Services resource](../../create-communication-resource.md).
19
+
- Active LTS and Maintenance LTS versions of [Node.js](https://nodejs.org/) 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-javascript-quickstarts/tree/main/direct-routing-quickstart)
25
+
Find the finalized code for the following procedures on [GitHub](https://github.com/Azure-Samples/communication-services-javascript-quickstarts/tree/main/direct-routing-quickstart).
26
26
27
27
## Create a new Node.js application
28
28
29
-
First, open your terminal or command window, create a new directory for your app, and navigate to it.
29
+
First, open your terminal or command window, create a new directory for your app, and go to it:
30
30
31
31
```console
32
32
mkdir direct-routing-quickstart && cd direct-routing-quickstart
33
33
```
34
34
35
-
Run npm `init -y` to create a package.json file with default settings.
35
+
Run npm `init -y` to create a *package.json* file with default settings.
36
36
37
37
```console
38
38
npm init -y
39
39
```
40
-
Create a file called direct-routing-quickstart.js in the root of the directory you created. Add the following snippet to it:
40
+
41
+
Create a file called *direct-routing-quickstart.js* in the root of the directory that you created. Add the following snippet to it:
41
42
42
43
```javascript
43
44
asyncfunctionmain() {
@@ -49,19 +50,19 @@ main();
49
50
50
51
## Install the package
51
52
52
-
Use `npm install` command to install the Azure Communication Services Phone Numbers client library for JavaScript.
53
+
Use the `npm install` command to install the Azure Communication Services Phone Numbers client library for JavaScript:
The `--save` option adds the library as a dependency in your package.json file.
59
+
The `--save` option adds the library as a dependency in your *package.json* file.
59
60
60
61
## Authenticate the client
61
62
62
-
Import the `SipRoutingClient` from the client library and instantiate it with your connection string. The code retrieves the connection string for the resource from an environment variable named `COMMUNICATION_SERVICES_CONNECTION_STRING`. Learn how to [manage your resource's connection string](../../create-communication-resource.md#store-your-connection-string).
63
+
Import `SipRoutingClient` from the client library and instantiate it with your connection string. The code retrieves the connection string for the resource from an environment variable named `COMMUNICATION_SERVICES_CONNECTION_STRING`. [Learn how to manage your resource's connection string](../../create-communication-resource.md#store-your-connection-string).
63
64
64
-
Add the following code to the `direct-routing-quickstart.js`:
65
+
Add the following code to *direct-routing-quickstart.js*:
1. Domain ownership verification - see [prerequisites](#prerequisites)
80
-
1. Creating trunks (adding SBCs)
81
-
1. Creating voice routes
80
+
In the [prerequisites](#prerequisites), you verified domain ownership. The next steps are to create trunks (add SBCs) and create voice routes.
82
81
83
-
### Create or update Trunks
82
+
### Create or update trunks
84
83
85
-
Azure Communication Services direct routing allows communication with registered SBCs only. To register an SBC, you need its FQDN and port.
84
+
Azure Communication Services direct routing allows communication with registered SBCs only. To register an SBC, you need its FQDN and port:
86
85
87
86
```javascript
88
87
awaitclient.setTrunks([
@@ -96,12 +95,12 @@ Azure Communication Services direct routing allows communication with registered
96
95
]);
97
96
```
98
97
99
-
### Create or update Routes
98
+
### Create or update routes
100
99
101
100
> [!NOTE]
102
-
> Order of routes does matter, as it determines priority of routes. The first route that matches the regex will be picked for a call.
101
+
> The order of routes determines the priority of routes. The first route that matches the regex will be picked for a call.
103
102
104
-
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 `+`.
103
+
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 call is routed. In this example, you create one route for numbers that start with `+1` and a second route for numbers that start with just `+`:
105
104
106
105
```javascript
107
106
awaitclient.setRoutes([
@@ -119,22 +118,23 @@ For outbound calling routing rules should be provided. Each rule consists of two
119
118
]);
120
119
```
121
120
122
-
### Updating existing configuration
121
+
##Update a direct routing configuration
123
122
124
-
Properties of specific Trunk can be updated by overwriting the record with the same FQDN. For example, you can set new SBC Port value.
123
+
You can update the properties of a specific trunk by overwriting the record with the same FQDN. For example, you can set new SBC port value:
125
124
126
125
```javascript
127
126
awaitclient.setTrunk({
128
127
fqdn:'sbc.us.contoso.com',
129
128
sipSignalingPort:5063
130
129
});
131
130
```
131
+
132
132
> [!IMPORTANT]
133
-
>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.
133
+
>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.
134
134
135
-
### Removing a direct routing configuration
135
+
##Remove a direct routing configuration
136
136
137
-
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:
137
+
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:
138
138
139
139
```javascript
140
140
//delete all configured voice routes
@@ -144,23 +144,21 @@ await client.setRoutes([]);
144
144
//delete all trunks
145
145
console.log("Deleting all trunks...");
146
146
awaitclient.setTrunks([]);
147
-
```
147
+
```
148
148
149
-
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.
149
+
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.
150
150
151
151
```javascript
152
152
awaitclient.deleteTrunk('sbc.us.contoso.com');
153
153
```
154
154
155
-
<!-- All Direct Routing configuration can be deleted by overriding routes and trunks configudation with new configuration or empty lists. Same methods are used as in "Create or Update Trunks" and "Create or Update Routes" sections. -->
156
-
157
-
### Run the code
155
+
## Run the code
158
156
159
-
Use the node command to run the code you added to the `direct-routing-quickstart.js` file.
157
+
Use the node command to run the code that you added to the `direct-routing-quickstart.js` file:
160
158
161
159
```console
162
160
node direct-routing-quickstart.js
163
161
```
164
162
165
163
> [!NOTE]
166
-
> More usage examples for SipRoutingClient can be found [here](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/communication/azure-communication-phonenumbers/src/samples/java/com/azure/communication/phonenumbers/siprouting/AsyncClientJavaDocCodeSnippets.java).
164
+
> You can find more usage examples for `SipRoutingClient` on [GitHub](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/communication/azure-communication-phonenumbers/src/samples/java/com/azure/communication/phonenumbers/siprouting/AsyncClientJavaDocCodeSnippets.java).
0 commit comments