Azure SDK Review - [Beta SDK for ACS Direct Routing]
- Dominant language
- PowerShell
- Stars
- 597
- Forks
- 374
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 42
Description
New SDK Review meeting has been requested.
**Service Name**: ACS PSTN
**Review Created By**: Jiri Burant
**Review Date**: 04/15/2025 02:05 PM PT
**Release Plan**:[](https://web.powerapps.com/apps/821ab569-ae60-420d-8264-d7b5d5ef734c?release-plan-id=)
**Hero Scenarios Link**:
Check connection health of configured SIP Trunks:
```ts snippet:SipRoutingClientRetrieveTrunksHealth
const trunks = client.listTrunks({includeHealth: true});
for await (const trunk of trunks) {
console.log(`Trunk ${trunk.fqdn}:${trunk.health}`);
}
// Check health of one trunk
const singleTrunk = client.getTrunk({includeHealth: true});
console.log(`Trunk ${trunk.fqdn}:${trunk.health}`);
```
Check ACS direct routing against target phone number to see how it will be routed:
```ts snippet:SipRoutingClientRoutesForNumber
const routesToTest = [{name = "US route", numberPattern: "\+1*", trunks:["ustrunk.mydomain.com"]}, {name = "CZ route", numberPattern: "\+420*", trunks:["cztrunk.mydomain.com"]}, {name: "Fallback route", numberPattern: "*", trunks:["fallbacktrunk.mydomain.com"]]}]
const response = await client.testRoutesWithNumber(targetPhoneNumber: +123456789, routes: routesToTest);
// response.matchingRoutes now contains list of routes whose pattern matches the targetPhoneNumber.
```
Configure customer owned DNS domains with their ACS resource:
```ts snippet:SipRoutingClientManageDomains
// Add domains
await client.setDomains([
{
fqdn: "domain.com",
enabled: true,
},
{
fqdn: "seconddomain.com",
enabled: true,
},
]);
// Retrieve domains
var domains = await client.getDomains();
// Update one domain
await client.setDomain("seconddomain.com", false);
// Retrieve specific domain
const domain = await client.getDomain("seconddomain.com");
// Delete one domain
await client.deleteDomain("domain.com")
```
Update ACS direct routing configuration with new trunk-level settings (allow for additional configuration for specific use-cases)
```ts snippet:SipRoutingClientTrunkLevelSettings
import { DefaultAzureCredential } from "@azure/identity";
import { SipRoutingClient } from "@azure/communication-phone-numbers";
const credential = new DefaultAzureCredential();
const client = new SipRoutingClient("", credential);
await client.setTrunks([
{
fqdn: "sbc.one.domain.com",
sipSignalingPort: 1234,
enabled: true,
directTransfer: true, // New property
privacyHeader: "none", // New property
ipAddressVersion: "ipv6" // New property
},
{
fqdn: "sbc.two.domain.com",
sipSignalingPort: 1234,
enabled: true,
directTransfer: false, // New property
privacyHeader: "id", // New property
ipAddressVersion: "ipv4" // New property
},
]);
await client.setRoutes([
{
name: "First Route",
description: "route's description",
numberPattern: "^+[1-9][0-9]{3,23}$",
trunks: ["sbc.one.domain.com"],
callerIdOverride: "+123456789", // New property
},
{
name: "Second Route",
description: "route's description",
numberPattern: "^.*$",
trunks: ["sbc.two.domain.com", "sbc.one.domain.com"],
},
]);
```
**API Link**: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/communication/data-plane/SipRouting/preview/2024-11-15-preview/communicationservicessiprouting.json
**Architecture Diagram Link**: Not Provided
**Core Concepts Doc Link**: Not Provided
**APIView Links**: Python, .NET, Javascript, Java,
**Description**: Added new settings on existing ACS PSTN DirectRouting configuration that allow for better customization of customer's scenarios.
API link:
Detailed meeting information and documents provided can be accessed [here](https://web.powerapps.com/apps/f0a98ca4-117c-4d4b-a06a-3e2cdfe46753?view=edit&event=b0d5ad9f-ab0b-f011-bae3-0022480939f0)
Contributor guide
Research direction
Start with specification/communication/data-plane/SipRouting/preview/2024-11-15-preview/communicationservicessiprouting.json and compare its definitions with the listed SipRoutingClient scenarios. Review the linked SDK meeting materials and APIView links; done means the proposed trunk, route, domain, and health capabilities are reviewed across the listed SDK languages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, typescript
- Domain
- api, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100