> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voice.wixzel.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Check a SIP trunk

> Asterisk's own qualify result and a live network probe, reported side by side rather than reduced to one boolean, because where they disagree IS the diagnosis. A provider that ignores unauthenticated OPTIONS shows `probe.reachable: false` while Asterisk reports it healthy — that is normal and Asterisk is right. A provider whose account has been suspended shows healthy on both, which is what `recent_failures` is for: a `failure_code` of 21 on a reachable trunk almost always means the carrier account is suspended, closed or out of balance.



## OpenAPI

````yaml /openapi.json get /v1/sip-trunks/{id}/status
openapi: 3.1.0
info:
  title: Wixzel Voice API
  version: '2026-09-01'
  description: >-
    APIs for AI voice agents. One key, one balance, every voice engine.


    ## Authentication

    Send your key as `Authorization: Bearer wv_live_...`. Keys are scoped —
    grant only what an integration needs. There is no admin scope.


    ## Versioning

    The `/v1` prefix covers additive changes. Behavioural changes ship behind a
    dated `Wixzel-Version` header, and existing keys keep the behaviour they
    were created with.


    ## Money

    Amounts are integer **micro-USD** (1,000,000 = $1.00). Voice usage is billed
    per second, per token and per character, so a float dollar figure cannot
    represent it without disagreeing with the ledger.


    ## Errors

    Every error carries a stable `code` and a `request_id`. Match on `code`; the
    `message` is for humans and may change.
  contact:
    name: Wixzel Voice
    url: https://voice.wixzel.com
servers:
  - url: https://api.voice.wixzel.com
    description: Production
security: []
tags:
  - name: Calls
    description: Place calls and read what happened on them.
  - name: Agents
    description: The prompt, voice and behaviour of a caller.
  - name: Leads
    description: People to call, and data to merge into prompts.
  - name: Campaigns
    description: Call a list of leads with one agent.
  - name: Knowledge bases
    description: Facts an agent can draw on mid-call.
  - name: Phone numbers
    description: Numbers on your SIP trunks.
  - name: SIP trunks
    description: Your carrier connections.
  - name: Appointments
    description: Bookings, including ones agents make on calls.
  - name: Usage
    description: Itemised billing lines.
  - name: Billing
    description: Balance, ledger and top-ups.
  - name: API keys
    description: Create, scope and rotate keys.
  - name: Engines
    description: What the platform can serve, and what it costs.
paths:
  /v1/sip-trunks/{id}/status:
    get:
      tags:
        - SIP trunks
      summary: Check a SIP trunk
      description: >-
        Asterisk's own qualify result and a live network probe, reported side by
        side rather than reduced to one boolean, because where they disagree IS
        the diagnosis. A provider that ignores unauthenticated OPTIONS shows
        `probe.reachable: false` while Asterisk reports it healthy — that is
        normal and Asterisk is right. A provider whose account has been
        suspended shows healthy on both, which is what `recent_failures` is for:
        a `failure_code` of 21 on a reachable trunk almost always means the
        carrier account is suspended, closed or out of balance.
      parameters:
        - schema:
            type: string
            pattern: ^[0-9a-f]{24}$
            example: 6a96a3ead6e886d42462dd3e
          required: true
          name: id
          in: path
      responses:
        '200':
          description: Current state of the trunk
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SipTrunkStatus'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Key lacks the required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such record
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited. Retry after the interval in `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    SipTrunkStatus:
      type: object
      properties:
        object:
          type: string
          enum:
            - sip_trunk_status
        sip_trunk_id:
          type: string
          pattern: ^[0-9a-f]{24}$
          example: 6a96a3ead6e886d42462dd3e
        name:
          type:
            - string
            - 'null'
        host:
          type:
            - string
            - 'null'
        port:
          type:
            - integer
            - 'null'
        transport:
          type:
            - string
            - 'null'
        origination_uri:
          type:
            - string
            - 'null'
          description: >-
            Where the carrier must send inbound calls. Repeated here because a
            number that never rings is half of "why is this not working", and
            unlike everything else in this response it is not a state we can
            measure — if it is missing from the carrier's Origination URI field
            the call never reaches us and nothing on this side is aware of it.
          example: sip:95.216.218.102:5090
        asterisk:
          type: object
          properties:
            connected:
              type: boolean
              description: Whether this server currently holds an ARI connection.
            endpoint_known:
              type: boolean
              description: False until the trunk has synced into Asterisk.
            endpoint_state:
              type:
                - string
                - 'null'
            reachable:
              type:
                - boolean
                - 'null'
              description: >-
                Asterisk's own qualify result. Null when it is not qualifying
                this trunk. Authoritative for "is it working right now".
            round_trip_ms:
              type:
                - number
                - 'null'
            detail:
              type: string
          required:
            - connected
            - endpoint_known
            - endpoint_state
            - reachable
            - round_trip_ms
            - detail
        probe:
          type: object
          properties:
            reachable:
              type: boolean
              description: >-
                A TCP connect or SIP OPTIONS sent from this server just now.
                Authoritative for "can we route to it at all". Some providers
                ignore unauthenticated pings, so false here with Asterisk
                reachable is normal.
            method:
              type: string
            detail:
              type: string
          required:
            - reachable
            - method
            - detail
        recent_failures:
          type: array
          items:
            type: object
            properties:
              call_id:
                type: string
              failure_code:
                type:
                  - integer
                  - 'null'
              failure_reason:
                type:
                  - string
                  - 'null'
              at:
                type:
                  - string
                  - 'null'
            required:
              - call_id
              - failure_code
              - failure_reason
              - at
          description: >-
            The last few carrier rejections on this account, newest first. A
            reachable trunk that rejects every call is usually a suspended or
            unfunded carrier account — cause 21.
      required:
        - object
        - sip_trunk_id
        - name
        - host
        - port
        - transport
        - origination_uri
        - asterisk
        - probe
        - recent_failures
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - rate_limit_error
                - insufficient_credits
                - not_found_error
                - conflict_error
                - api_error
            code:
              type: string
              description: Stable machine-readable code.
              example: agent_not_found
            message:
              type: string
              description: >-
                Human-readable explanation. Do not match on this — match on
                code.
            param:
              type: string
              description: Which field caused the failure, when applicable.
            doc_url:
              type: string
            request_id:
              type: string
              description: Quote this when asking for help.
              example: req_01HXYZ...
          required:
            - type
            - code
            - message
            - request_id
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Wixzel Voice API key: `Authorization: Bearer wv_live_...`. Keys are
        scoped; grant only what the integration needs.

````