|
| 1 | +{ |
| 2 | + "swagger": "2.0", |
| 3 | + "info": { |
| 4 | + "title": "SipRouting Service", |
| 5 | + "description": "SipRouting Service", |
| 6 | + "contact": { |
| 7 | + |
| 8 | + }, |
| 9 | + "version": "2023-03-01" |
| 10 | + }, |
| 11 | + "paths": { |
| 12 | + "/sip": { |
| 13 | + "get": { |
| 14 | + "tags": [ |
| 15 | + "SipConfiguration" |
| 16 | + ], |
| 17 | + "summary": "Gets SIP configuration for resource.", |
| 18 | + "operationId": "SipRouting_Get", |
| 19 | + "produces": [ |
| 20 | + "application/json" |
| 21 | + ], |
| 22 | + "parameters": [ |
| 23 | + { |
| 24 | + "$ref": "#/parameters/ApiVersionParameter" |
| 25 | + } |
| 26 | + ], |
| 27 | + "responses": { |
| 28 | + "200": { |
| 29 | + "description": "Ok.", |
| 30 | + "schema": { |
| 31 | + "$ref": "#/definitions/SipConfiguration" |
| 32 | + } |
| 33 | + }, |
| 34 | + "default": { |
| 35 | + "description": "Failure", |
| 36 | + "schema": { |
| 37 | + "$ref": "../../../Common/stable/2022-07-13/common.json#/definitions/CommunicationErrorResponse" |
| 38 | + }, |
| 39 | + "headers": { |
| 40 | + "x-ms-error-code": { |
| 41 | + "type": "string", |
| 42 | + "description": "Error code" |
| 43 | + } |
| 44 | + } |
| 45 | + } |
| 46 | + }, |
| 47 | + "x-ms-examples": { |
| 48 | + "Get SIP configuration for resource": { |
| 49 | + "$ref": "./examples/GetSipConfiguration.json" |
| 50 | + } |
| 51 | + } |
| 52 | + }, |
| 53 | + "patch": { |
| 54 | + "tags": [ |
| 55 | + "SipConfiguration" |
| 56 | + ], |
| 57 | + "summary": "Updates SIP configuration for resource.", |
| 58 | + "operationId": "SipRouting_Update", |
| 59 | + "consumes": [ |
| 60 | + "application/merge-patch+json" |
| 61 | + ], |
| 62 | + "produces": [ |
| 63 | + "application/json" |
| 64 | + ], |
| 65 | + "parameters": [ |
| 66 | + { |
| 67 | + "$ref": "#/parameters/ApiVersionParameter" |
| 68 | + }, |
| 69 | + { |
| 70 | + "in": "body", |
| 71 | + "name": "body", |
| 72 | + "description": "Sip configuration update object.", |
| 73 | + "schema": { |
| 74 | + "$ref": "#/definitions/SipConfigurationUpdate" |
| 75 | + } |
| 76 | + } |
| 77 | + ], |
| 78 | + "responses": { |
| 79 | + "200": { |
| 80 | + "description": "Updated configuration is returned.", |
| 81 | + "schema": { |
| 82 | + "$ref": "#/definitions/SipConfiguration" |
| 83 | + } |
| 84 | + }, |
| 85 | + "default": { |
| 86 | + "description": "Failure", |
| 87 | + "schema": { |
| 88 | + "$ref": "../../../Common/stable/2022-07-13/common.json#/definitions/CommunicationErrorResponse" |
| 89 | + }, |
| 90 | + "headers": { |
| 91 | + "x-ms-error-code": { |
| 92 | + "type": "string", |
| 93 | + "description": "Error code" |
| 94 | + } |
| 95 | + } |
| 96 | + } |
| 97 | + }, |
| 98 | + "x-ms-examples": { |
| 99 | + "Update SIP configuration for resource": { |
| 100 | + "$ref": "./examples/UpdateSipConfiguration.json" |
| 101 | + } |
| 102 | + } |
| 103 | + } |
| 104 | + } |
| 105 | + }, |
| 106 | + "definitions": { |
| 107 | + "Trunk": { |
| 108 | + "description": "Represents a SIP trunk for routing calls. See RFC 4904.", |
| 109 | + "required": [ |
| 110 | + "sipSignalingPort" |
| 111 | + ], |
| 112 | + "type": "object", |
| 113 | + "properties": { |
| 114 | + "sipSignalingPort": { |
| 115 | + "format": "int32", |
| 116 | + "description": "Gets or sets SIP signaling port of the trunk.", |
| 117 | + "type": "integer" |
| 118 | + } |
| 119 | + } |
| 120 | + }, |
| 121 | + "TrunkUpdate": { |
| 122 | + "description": "Represents a SIP trunk update.", |
| 123 | + "type": "object", |
| 124 | + "properties": { |
| 125 | + "sipSignalingPort": { |
| 126 | + "format": "int32", |
| 127 | + "description": "Gets or sets SIP signaling port of the trunk.", |
| 128 | + "type": "integer" |
| 129 | + } |
| 130 | + } |
| 131 | + }, |
| 132 | + "TrunkRoute": { |
| 133 | + "description": "Represents a trunk route for routing calls.", |
| 134 | + "required": [ |
| 135 | + "name", |
| 136 | + "numberPattern" |
| 137 | + ], |
| 138 | + "type": "object", |
| 139 | + "properties": { |
| 140 | + "description": { |
| 141 | + "description": "Gets or sets description of the route.", |
| 142 | + "maxLength": 1024, |
| 143 | + "type": "string" |
| 144 | + }, |
| 145 | + "name": { |
| 146 | + "description": "Gets or sets name of the route.", |
| 147 | + "maxLength": 256, |
| 148 | + "type": "string" |
| 149 | + }, |
| 150 | + "numberPattern": { |
| 151 | + "description": "Gets or sets regex number pattern for routing calls. .NET regex format is supported.\r\nThe regex should match only digits with an optional '+' prefix without spaces.\r\nI.e. \"^\\+[1-9][0-9]{3,23}$\".", |
| 152 | + "maxLength": 1024, |
| 153 | + "type": "string" |
| 154 | + }, |
| 155 | + "trunks": { |
| 156 | + "description": "Gets or sets list of SIP trunks for routing calls. Trunks are represented as FQDN.", |
| 157 | + "maxItems": 250, |
| 158 | + "type": "array", |
| 159 | + "items": { |
| 160 | + "type": "string" |
| 161 | + } |
| 162 | + } |
| 163 | + } |
| 164 | + }, |
| 165 | + "SipConfiguration": { |
| 166 | + "description": "Represents a SIP configuration.\r\nWhen a call is being routed the routes are applied in the same order as in the routes list.\r\nA route is matched by its number pattern.\r\nCall is then directed into route's first available trunk, based on the order in the route's trunks list.", |
| 167 | + "type": "object", |
| 168 | + "properties": { |
| 169 | + "trunks": { |
| 170 | + "description": "SIP trunks for routing calls.\r\nMap key is trunk's FQDN (1-249 characters).", |
| 171 | + "maxProperties": 250, |
| 172 | + "type": "object", |
| 173 | + "additionalProperties": { |
| 174 | + "$ref": "#/definitions/Trunk" |
| 175 | + } |
| 176 | + }, |
| 177 | + "routes": { |
| 178 | + "description": "Trunk routes for routing calls.", |
| 179 | + "maxItems": 250, |
| 180 | + "type": "array", |
| 181 | + "items": { |
| 182 | + "$ref": "#/definitions/TrunkRoute" |
| 183 | + } |
| 184 | + } |
| 185 | + } |
| 186 | + }, |
| 187 | + "SipConfigurationUpdate": { |
| 188 | + "description": "Represents a SIP configuration update.", |
| 189 | + "type": "object", |
| 190 | + "properties": { |
| 191 | + "trunks": { |
| 192 | + "description": "SIP trunks for routing calls.\r\nMap key is trunk's FQDN (1-249 characters).", |
| 193 | + "maxProperties": 250, |
| 194 | + "type": "object", |
| 195 | + "additionalProperties": { |
| 196 | + "$ref": "#/definitions/TrunkUpdate" |
| 197 | + } |
| 198 | + }, |
| 199 | + "routes": { |
| 200 | + "description": "Trunk routes for routing calls.", |
| 201 | + "maxItems": 250, |
| 202 | + "type": "array", |
| 203 | + "items": { |
| 204 | + "$ref": "#/definitions/TrunkRoute" |
| 205 | + } |
| 206 | + } |
| 207 | + } |
| 208 | + } |
| 209 | + }, |
| 210 | + "parameters": { |
| 211 | + "ApiVersionParameter": { |
| 212 | + "in": "query", |
| 213 | + "name": "api-version", |
| 214 | + "description": "Version of API to invoke", |
| 215 | + "required": true, |
| 216 | + "type": "string" |
| 217 | + }, |
| 218 | + "Endpoint": { |
| 219 | + "in": "path", |
| 220 | + "name": "endpoint", |
| 221 | + "description": "The communication resource, for example https://resourcename.communication.azure.com", |
| 222 | + "required": true, |
| 223 | + "type": "string", |
| 224 | + "x-ms-skip-url-encoding": true, |
| 225 | + "x-ms-parameter-location": "client" |
| 226 | + } |
| 227 | + }, |
| 228 | + "securityDefinitions": { |
| 229 | + "azure_auth": { |
| 230 | + "type": "oauth2", |
| 231 | + "flow": "implicit", |
| 232 | + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", |
| 233 | + "scopes": { |
| 234 | + "user_impersonation": "impersonate your user account" |
| 235 | + }, |
| 236 | + "description": "Azure Active Directory OAuth2 Flow" |
| 237 | + }, |
| 238 | + "apiKey": { |
| 239 | + "type": "apiKey", |
| 240 | + "name": "Authorization", |
| 241 | + "in": "header", |
| 242 | + "description": "An authentication string containing a signature generated using HMAC-SHA256 scheme." |
| 243 | + } |
| 244 | + }, |
| 245 | + "security": [ |
| 246 | + { |
| 247 | + "azure_auth": [ |
| 248 | + "user_impersonation" |
| 249 | + ], |
| 250 | + "apiKey": [] |
| 251 | + } |
| 252 | + ], |
| 253 | + "x-ms-parameterized-host": { |
| 254 | + "hostTemplate": "{endpoint}", |
| 255 | + "useSchemePrefix": false, |
| 256 | + "parameters": [ |
| 257 | + { |
| 258 | + "$ref": "#/parameters/Endpoint" |
| 259 | + } |
| 260 | + ] |
| 261 | + } |
| 262 | +} |
0 commit comments