{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-communication-services/json-schema/microsoft-azure-communication-services-sip-configuration-schema.json",
  "title": "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.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-communication-services-siprouting-api-openapi.yml#/components/schemas/SipConfiguration",
  "type": "object",
  "properties": {
    "trunks": {
      "description": "SIP trunks for routing calls.\r\nMap key is trunk's FQDN (1-249 characters).",
      "maxProperties": 250,
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/Trunk"
      }
    },
    "routes": {
      "description": "Trunk routes for routing calls.",
      "maxItems": 250,
      "type": "array",
      "items": {
        "$ref": "#/$defs/TrunkRoute"
      }
    }
  },
  "$defs": {
    "Trunk": {
      "description": "Represents a SIP trunk for routing calls. See RFC 4904.",
      "required": [
        "sipSignalingPort"
      ],
      "type": "object",
      "properties": {
        "sipSignalingPort": {
          "format": "int32",
          "description": "Gets or sets SIP signaling port of the trunk.",
          "type": "integer"
        }
      }
    },
    "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"
          }
        }
      }
    }
  }
}