swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector NumberRoutingValidation API schemes: - https tags: - name: NumberRoutingValidation paths: /sip:testRoutesWithNumber: post: tags: - NumberRoutingValidation summary: Microsoft Azure Gets The List Of Routes Matching The Target Phone Number, Ordered By Priority operationId: microsoftAzureSiproutingTestrouteswithnumber consumes: - application/json produces: - application/json parameters: - in: query name: targetPhoneNumber description: Phone number to test routing patterns against required: true type: string x-example: '+11234567890' - $ref: '#/parameters/ApiVersionParameter' - in: body name: sipConfiguration description: Sip configuration object to test with targetPhoneNumber. schema: $ref: '#/definitions/SipConfiguration' responses: '200': description: A list of matching routes schema: $ref: '#/definitions/RoutesForNumber' default: description: Failure schema: $ref: ../../../Common/stable/2022-07-13/common.json#/definitions/CommunicationErrorResponse x-ms-error-response: true x-ms-examples: Validate target phone number routing: $ref: ./examples/TestRoutesWithNumber.json description: Needs a more full description created. definitions: Health: description: Represents health state of a SIP trunk for routing calls. type: object required: - tls - ping - overall properties: tls: $ref: '#/definitions/Tls' ping: $ref: '#/definitions/Ping' overall: $ref: '#/definitions/OverallHealth' Enabled: type: boolean description: "Flag if domain is enabled or not.\r\nIf enabled it's used in configuration, if not enabled it's not used." OverallHealth: type: object description: The overall health status of Trunk. required: - status properties: status: type: string description: The overall health status of Trunk. enum: - unknown - active - inactive x-ms-enum: name: overallHealthStatus modelAsString: true values: - value: unknown description: Indicates an unknown health status. - value: active description: Indicates the Trunk is active. - value: inactive description: Indicates the Trunk is inactive. reason: type: string description: The reason overall status of Trunk is inactive. enum: - noRecentCalls - noRecentPings - noRecentCallsAndPings x-ms-enum: name: inactiveStatusReason modelAsString: true values: - value: noRecentCalls description: Indicates no recent calls. - value: noRecentPings description: Indicates ping status is expired. - value: noRecentCallsAndPings description: Indicates no recent calls and ping status is expired. RoutesForNumber: description: Represents number routing validation details. type: object properties: matchingRoutes: description: The list of routes whose number patterns are matched by the target number. The routes are displayed and apply in the same order as in SipConfiguration. maxItems: 250 type: array items: $ref: '#/definitions/TrunkRoute' SipConfiguration: 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. The configuration can be expanded with additional data." type: object properties: domains: description: "Validated Domains.\r\nMap key is domain." maxProperties: 250 type: object additionalProperties: $ref: '#/definitions/Domain' trunks: description: "SIP trunks for routing calls.\r\nMap key is trunk's FQDN (1-249 characters)." maxProperties: 250 type: object additionalProperties: $ref: '#/definitions/Trunk' routes: description: Trunk routes for routing calls. maxItems: 250 type: array items: $ref: '#/definitions/TrunkRoute' Domain: description: "Represents Domain object as response of validation api.\r\nMap key is domain." required: - enabled type: object properties: enabled: description: Enabled flag $ref: '#/definitions/Enabled' Tls: type: object description: The status of the TLS connections of the Trunk. required: - status properties: status: type: string description: The status of the TLS connections of the Trunk. enum: - unknown - ok - certExpiring - certExpired x-ms-enum: modelAsString: true name: tlsStatus values: - value: unknown description: Indicates an unknown status. - value: ok description: Indicates the status is okay. - value: certExpiring description: Indicates the Trunk certificate is expiring. - value: certExpired description: Indicates the Trunk certificate is expired. TrunkRoute: description: Represents a trunk route for routing calls. required: - name - numberPattern type: object properties: description: description: Gets or sets description of the route. maxLength: 1024 type: string name: description: Gets or sets name of the route. maxLength: 256 type: string numberPattern: 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}$\"." maxLength: 1024 type: string trunks: description: Gets or sets list of SIP trunks for routing calls. Trunks are represented as FQDN. maxItems: 250 type: array items: type: string Ping: type: object description: The status of SIP OPTIONS message sent by Trunk. required: - status properties: status: type: string description: The status of SIP OPTIONS message sent by Trunk. enum: - unknown - ok - expired - error x-ms-enum: name: pingStatus modelAsString: true values: - value: unknown description: Indicates an unknown status. - value: ok description: Indicates the status is okay. - value: expired description: Indicates the status is expired. - value: error description: Indicates the status is at an error level. Trunk: description: Represents a SIP trunk for routing calls. See RFC 4904. Can be expanded with additional data. required: - sipSignalingPort - enabled type: object properties: sipSignalingPort: format: int32 description: Gets or sets SIP signaling port of the trunk. type: integer enabled: description: Enabled flag $ref: '#/definitions/Enabled' health: description: Represents health state of a SIP trunk for routing calls. type: object readOnly: true $ref: '#/definitions/Health' parameters: ApiVersionParameter: in: query name: api-version description: Version of API to invoke required: true type: string x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'