{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wavix-com/json-schema/wavix-com-siptrunk-create-request-schema.json",
  "title": "SIPTrunkCreateRequest",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wavix-com-openapi.yaml#/components/schemas/SIPTrunkCreateRequest",
  "required": [
    "label",
    "password",
    "callerid",
    "ip_restrict",
    "didinfo_enabled",
    "call_restrict",
    "channels_restrict",
    "rewrite_enabled",
    "transcription_enabled",
    "transcription_threshold"
  ],
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "label": {
      "type": "string",
      "description": "User-defined name of the SIP trunk"
    },
    "password": {
      "type": "string",
      "description": "Password set for the SIP trunk. A strong password helps keep the trunk secure."
    },
    "host_request": {
      "type": "object",
      "description": "For SIP trunks with IP authentication, includes the SIP endpoint public static IP address and the status of the authentication request. Wavix authenticates all SIP traffic originating from this IP address.",
      "additionalProperties": false,
      "required": [
        "host"
      ],
      "properties": {
        "host": {
          "type": "string",
          "description": "SIP endpoint public static IP address"
        }
      }
    },
    "callerid": {
      "type": "string",
      "description": "Caller ID associated with the SIP trunk. Must be an active or verified number on the account."
    },
    "multiple_numbers": {
      "type": "boolean",
      "description": "Indicates whether any active or verified phone number on the account can be used as the Caller ID for the SIP trunk."
    },
    "ip_restrict": {
      "type": "boolean",
      "description": "Indicates whether SIP trunk registration is allowed from only specific public static IP addresses. When set to `true`, the `allowed_ips` parameter must be provided."
    },
    "allowed_ips": {
      "type": [
        "array",
        "null"
      ],
      "description": "A list of public static IP addresses allowed to register with the SIP trunk",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "ip"
        ],
        "properties": {
          "ip": {
            "type": "string",
            "description": "Public static IP address allowed to register with the SIP trunk."
          }
        }
      }
    },
    "didinfo_enabled": {
      "type": "boolean",
      "description": "Indicates whether inbound calls include dialed number information in the `To` header of SIP INVITE requests"
    },
    "call_restrict": {
      "type": "boolean",
      "description": "Indicates whether a maximum call duration limit is enforced for the SIP trunk"
    },
    "call_limit": {
      "type": "integer",
      "description": "Maximum call duration for the SIP trunk, in seconds. Must not exceed the maximum duration set for the account. Ignored when `call_restrict` is `false`.",
      "format": "int32"
    },
    "cost_limit": {
      "type": "boolean",
      "description": "Indicates if the max cost limit for an outbound call limit is activated for the SIP trunk.",
      "default": false
    },
    "max_call_cost": {
      "type": "number",
      "format": "decimal",
      "description": "Maximum cost for an outbound call, in USD"
    },
    "channels_restrict": {
      "type": "boolean",
      "description": "Indicates whether a limit on the number of concurrent outbound calls is enforced for the SIP trunk"
    },
    "max_channels": {
      "type": "integer",
      "description": "Maximum number of concurrent outbound calls for the SIP trunk. Must not exceed the outbound channel capacity set for the account. Ignored when `channels_restrict` is `false`.",
      "format": "int32"
    },
    "rewrite_enabled": {
      "type": "boolean",
      "description": "Indicates whether a custom dial plan is activated for the SIP trunk"
    },
    "rewrite_prefix": {
      "type": "string",
      "description": "Digits to automatically prepend to each dialed phone number"
    },
    "rewrite_cond": {
      "type": "string",
      "description": "Number of leading digits to automatically remove from each dialed phone number"
    },
    "call_recording_enabled": {
      "type": "boolean",
      "description": "Indicates whether outbound call recording is enabled for the SIP trunk"
    },
    "transcription_enabled": {
      "type": "boolean",
      "description": "Indicates whether automatic call transcription is enabled for the SIP trunk.\nAvailable for `Flex Pro` customers only."
    },
    "transcription_threshold": {
      "type": "integer",
      "description": "Transcriptions will be generated for calls that meet or exceed the specified minimal call duration threshold, in seconds.\nAvailable for `Flex Pro` customers only.",
      "format": "int32"
    },
    "machine_detection_enabled": {
      "type": "boolean",
      "description": "Indicates whether automatic voicemail detection is enabled for the SIP trunk.\nAvailable for `Flex Pro` customers only."
    },
    "encrypted_media": {
      "type": "boolean",
      "description": "Indicates whether SRTP media encryption is enabled for the SIP trunk."
    }
  }
}