Skip to content

Commit

Permalink
[Communication - Telephony Service] Trunk status API (Azure#19233)
Browse files Browse the repository at this point in the history
* trunkstatus 2022-07-01 preview

* fix nextLink

* remove pageable, fix sdk typo

* add port to trunk properties

* replace by health endpoint

* fix overallHealth property

* fix enums

* update enum and add descriptive properties

* enums to camelcase

* remove trunkstatus folder

* add health to trunk properties

* create new preview

* address review comments

* fix example

* the latest api version swaggers are in the default tag

* remove unused response codes from example

* fix prettier

* update python and ruby tag to the latest version

* Unify naming SBC->Trunk, move Extended to beginning of Trunk and SipConfiguration to suggest inheritance

* bump up version

* bump up the swagger version

* fix errors missing enabled property

* revert error code version back to new

* fix typo and duplicate definition in previous reamdme versions

* fix typo

* address comments

* update ping description

* shuffle object definition to help APIview render document properly

* Revert "shuffle object definition to help APIview render document properly"

This reverts commit a682d6a.

* remove redundant type:object on
  • Loading branch information
dzeliar authored and kayousef committed Dec 21, 2022
1 parent 3ee7323 commit bb89870
Show file tree
Hide file tree
Showing 8 changed files with 883 additions and 16 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"parameters": {
"api-version": "2023-01-01-preview",
"endpoint": "https://resourcename.communication.azure.com/"
},
"responses": {
"200": {
"headers": {},
"body": {
"domains": {
"xyz.biz": {
"enabled": true
},
"abc.biz": {
"enabled": true
}
},
"trunks": {
"vendor.xyz.biz": {
"sipSignalingPort": 5061,
"enabled": true
},
"vendor.abc.biz": {
"sipSignalingPort": 5061,
"enabled": true
}
},
"routes": [
{
"name": "LocalRoute",
"numberPattern": "^\\+1[0-9]{10}$"
},
{
"name": "VendorXYZ",
"description": "External route XYZ",
"numberPattern": "^\\+?\\d+$",
"trunks": [
"vendor.xyz.biz"
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"parameters": {
"api-version": "2023-01-01-preview",
"endpoint": "https://resourcename.communication.azure.com/",
"expand": "trunks/health"
},
"responses": {
"200": {
"headers": {},
"body": {
"domains": {
"xyz.biz": {
"enabled": true
},
"abc.biz": {
"enabled": true
}
},
"trunks": {
"vendor.xyz.biz": {
"sipSignalingPort": 5061,
"enabled": true,
"health": {
"tls": {
"status": "unknown"
},
"ping": {
"status": "unknown"
},
"overall": {
"status": "unknown"
}
}
},
"vendor.abc.biz": {
"sipSignalingPort": 5061,
"enabled": true,
"health": {
"tls": {
"status": "certExpiring"
},
"ping": {
"status": "ok"
},
"overall": {
"status": "inactive",
"reason": "noRecentCalls"
}
}
}
},
"routes": [
{
"name": "LocalRoute",
"numberPattern": "^\\+1[0-9]{10}$"
},
{
"name": "VendorXYZ",
"description": "External route XYZ",
"numberPattern": "^\\+?\\d+$",
"trunks": [
"vendor.xyz.biz"
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"parameters": {
"api-version": "2023-01-01-preview",
"domains": {
"xyz.biz": {
"type": "Custom"
}
},
"body": {
"domains": {
"xyz.biz": {
"enabled": true
},
"abc.biz": {
"enabled": true
}
},
"trunks": {
"vendor.xyz.biz": {
"sipSignalingPort": 5061,
"enabled": true
}
},
"routes": [
{
"name": "VendorXYZ",
"description": "External route XYZ",
"numberPattern": "^\\+?\\d+$",
"trunks": [
"vendor.xyz.biz"
]
}
]
},
"endpoint": "https://resourcename.communication.azure.com/"
},
"responses": {
"200": {
"headers": {},
"body": {
"domains": {
"xyz.biz": {
"enabled": true
},
"abc.biz": {
"enabled": true
}
},
"trunks": {
"vendor.xyz.biz": {
"sipSignalingPort": 5061,
"enabled": true
}
},
"routes": [
{
"name": "VendorXYZ",
"description": "External route XYZ",
"numberPattern": "^\\+?\\d+$",
"trunks": [
"vendor.xyz.biz"
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"parameters": {
"api-version": "2023-01-01-preview",
"endpoint": "https://resourcename.communication.azure.com/",
"targetPhoneNumber": "+14251234567",
"sipConfiguration": {
"domains": {
"contoso.com": {
"enabled": true
}
},
"trunks": {
"seattle.contoso.com": {
"sipSignalingPort": 5011,
"enabled": true
},
"us1.contoso.com": {
"sipSignalingPort": 5012,
"enabled": true
},
"us2.contoso.com": {
"sipSignalingPort": 5013,
"enabled": true
},
"russia.contoso.com": {
"sipSignalingPort": 5014,
"enabled": true
},
"global.contoso.com": {
"sipSignalingPort": 5015,
"enabled": true
}
},
"routes": [
{
"name": "Seattle",
"description": "Seattle route",
"numberPattern": "^\\+1(425|206)\\d{7}$",
"trunks": [
"seattle.contoso.com"
]
},
{
"name": "US",
"description": "US route",
"numberPattern": "^\\+1\\d{10}$",
"trunks": [
"us1.contoso.com",
"us2.contoso.com"
]
},
{
"name": "Russia",
"description": "Russian route",
"numberPattern": "^\\+7\\d+$",
"trunks": [
"russia.contoso.com"
]
},
{
"name": "Global",
"description": "Fallback route",
"numberPattern": "^\\+\\d+$",
"trunks": [
"global.contoso.com"
]
}
]
}
},
"responses": {
"200": {
"headers": {},
"body": {
"matchingRoutes": [
{
"description": "Seattle route",
"name": "Seattle",
"numberPattern": "^\\+1(425|206)\\d{7}$",
"trunks": [
"seattle.contoso.com"
]
},
{
"description": "US route",
"name": "US",
"numberPattern": "^\\+1\\d{10}$",
"trunks": [
"us1.contoso.com",
"us2.contoso.com"
]
},
{
"description": "Fallback route",
"name": "Global",
"numberPattern": "^\\+\\d+$",
"trunks": [
"global.contoso.com"
]
}
]
}
}
}
}
24 changes: 12 additions & 12 deletions specification/communication/data-plane/SipRouting/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,18 @@ These are the global settings for the communicationservices.

```yaml
openapi-type: data-plane
tag: package-2022-10-01-preview
tag: package-2023-01-01-preview
```
### Tag: package-2023-01-01-preview
These settings apply only when `--tag=package-2023-01-01-preview` is specified on the command line.

```yaml $(tag) == 'package-2023-01-01-preview'
input-file:
- preview/2023-01-01-preview/communicationservicessiprouting.json
title:
Azure Communication Services
```

### Tag: package-2022-10-01-preview
Expand Down Expand Up @@ -63,17 +74,6 @@ title:
Azure Communication Services
```

### Tag: package-2022-10-01-preview

These settings apply only when `--tag=package-2022-05-01-preview` is specified on the command line.

```yaml $(tag) == 'package-2022-10-01-preview'
input-file:
- preview/2022-10-01-preview/communicationservicessiprouting.json
title:
Azure Communication Services
```

---

# Code Generation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ python:
payload-flattening-threshold: 2
namespace: Microsoft.CommunicationServices
package-name: communicationservices
package-version: 2022-10-01-preview
package-version: 2023-01-01-preview
clear-output-folder: true
```
Expand Down
19 changes: 16 additions & 3 deletions specification/communication/data-plane/SipRouting/readme.ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,27 @@

These settings apply only when `--ruby` is specified on the command line.

### Tag: package-2023-01-01-preview and ruby

These settings apply only when `--tag=package-2023-01-01-preview --ruby` is specified on the command line.
Please also specify `--ruby-sdks-folder=<path to the root directory of your azure-sdk-for-ruby clone>`.

```yaml $(tag) == 'package-2023-01-01-preview' && $(ruby)
package-name: azure_mgmt_communicationservices
package-version: 2023-01-01-preview
azure-arm: true
namespace: Microsoft.CommunicationServices
output-folder: $(ruby-sdks-folder)/communicationservices
```
### Tag: package-2022-10-01-preview and ruby
These settings apply only when `--tag=package-2022-10-01-preview --ruby` is specified on the command line.
Please also specify `--ruby-sdks-folder=<path to the root directory of your azure-sdk-for-ruby clone>`.

```yaml $(tag) == 'package-2022-10-01-preview' && $(ruby)
package-name: azure_mgmt_communicationservices
package-version: 2021-10-01-preview
package-version: 2022-10-01-preview
azure-arm: true
namespace: Microsoft.CommunicationServices
output-folder: $(ruby-sdks-folder)/communicationservices
Expand All @@ -22,7 +35,7 @@ Please also specify `--ruby-sdks-folder=<path to the root directory of your azur

```yaml $(tag) == 'package-2022-09-01-preview' && $(ruby)
package-name: azure_mgmt_communicationservices
package-version: 2021-09-01-preview
package-version: 2022-09-01-preview
azure-arm: true
namespace: Microsoft.CommunicationServices
output-folder: $(ruby-sdks-folder)/communicationservices
Expand All @@ -39,4 +52,4 @@ package-version: 2021-05-01-preview
azure-arm: true
namespace: Microsoft.CommunicationServices
output-folder: $(ruby-sdks-folder)/communicationservices
```
```

0 comments on commit bb89870

Please sign in to comment.