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

# Retrieve a SIP trunk

> Returns the SIP trunk identified by `id`.



## OpenAPI

````yaml https://wavix.github.io/wavix-openapi/wavix-api.yaml get /v1/trunks/{id}
openapi: 3.1.0
info:
  title: Wavix APIs
  description: >-
    Wavix provides robust APIs that let you integrate voice and text messaging
    features directly into your app. Send text, place calls, and access detailed
    reports  programmatically.
  termsOfService: https://wavix.com/terms-and-conditions
  license:
    name: MIT
    identifier: MIT
  contact:
    name: Wavix
    url: https://wavix.com
    email: support@wavix.com
  version: '1.0'
servers:
  - url: https://api.wavix.com
    description: https://api.wavix.com
    variables: {}
security:
  - bearerAuth: []
tags:
  - name: SIP trunks
    description: SIP trunks
  - name: Buy
    description: Numbers
  - name: Cart
    description: Numbers
  - name: My numbers
    description: Numbers
  - name: Billing
    description: Billing, transactions, and invoices
  - name: Profile
    description: Account profile and customer information
  - name: CDRs
    description: Call detail records and call history
  - name: Speech Analytics
    description: Call transcription and speech analytics
  - name: SMS and MMS
    description: Messaging
  - name: Number Validator
    description: Phone number validation
  - name: Link shortener
    description: Short link and click metrics
  - name: 2FA
    description: Two-factor authentication
  - name: 10DLC
    description: 10DLC Campaigns and Brands
  - name: API Keys
    description: API key management
  - name: Call webhooks
    description: Webhook configuration for call events
  - name: Call control
    description: Programmable Voice
  - name: Call streaming
    description: Real-time call audio streaming over WebSocket
  - name: Call recording
    description: Call recording
  - name: Sub-accounts
    description: Sub-account management
  - name: Voice campaigns
    description: Outbound voice campaigns
  - name: Wavix Embeddable
    description: WebRTC embeddable widget
paths:
  /v1/trunks/{id}:
    get:
      tags:
        - SIP trunks
      summary: Retrieve a SIP trunk
      description: Returns the SIP trunk identified by `id`.
      operationId: sip_trunks_get
      parameters:
        - name: id
          in: path
          description: The unique ID of the SIP trunk.
          required: true
          style: simple
          schema:
            type: integer
            format: int32
            example: 3107
      responses:
        '200':
          description: Returns the SIP trunk.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SIPTrunkResponse'
              examples:
                success:
                  summary: Successful response
                  value:
                    id: 293
                    name: '67758'
                    callerid: '12345678900'
                    label: My trunk
                    ip_restrict: false
                    allowed_ips:
                      - id: 6712
                        ip: 127.0.0.1
                    channels_restrict: false
                    max_channels: 2
                    cost_limit: true
                    max_call_cost: '0.18'
                    call_restrict: false
                    call_limit: 3600
                    didinfo_enabled: true
                    rewrite_enabled: true
                    rewrite_prefix: '1'
                    rewrite_cond: example
                    call_recording_enabled: true
                    machine_detection_enabled: true
                    transcription_enabled: false
                    transcription_threshold: 10
                    created_at: '2023-05-16T17:13:25.000Z'
                    host: dynamic
                    multiple_numbers: true
                    encrypted_media: true
                    access_token: 123easwqe321132
        '403':
          $ref: '#/components/responses/ForbiddenErrorResponse'
        '404':
          description: >-
            Returns when no SIP trunk matches `id`, or the account is not
            provisioned for SIP trunks.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ForbiddenErrorResponse'
              examples:
                success:
                  summary: Successful response
                  value:
                    success: false
                    message: The service is not provisioned for your account.
      deprecated: false
      security:
        - bearerAuth:
            - trunks:read
components:
  schemas:
    SIPTrunkResponse:
      title: SIPTrunkResponse
      required:
        - id
        - name
        - callerid
        - label
        - allowed_ips
        - created_at
      type: object
      additionalProperties: false
      properties:
        id:
          type: integer
          description: Unique identifier of the SIP trunk on the platform
          format: int32
          example: 293
        name:
          type: string
          description: System-generated login name of the SIP trunk
          example: '67758'
        callerid:
          type:
            - string
            - 'null'
          description: >-
            Caller ID configured on the SIP trunk. Contains `null` if no Caller
            ID is set, or an empty string if multiple Caller IDs are allowed.
          example: '12345678900'
        label:
          type: string
          description: User-defined name of the SIP trunk
          example: My trunk
        ip_restrict:
          type: boolean
          description: Indicates whether IP restriction must be enabled on the SIP trunk
          default: false
          example: false
        allowed_ips:
          $ref: '#/components/schemas/AllowedIPs'
        channels_restrict:
          type: boolean
          description: >-
            Indicates if the max number of concurrent outbound calls limit is
            activated for the SIP trunk.
          default: false
          example: false
        max_channels:
          type:
            - integer
            - 'null'
          description: >-
            A maximum number of concurrent outbound calls placed via the SIP
            trunk. Cannot be higher than the outbound channel capacity
            configured on the account.
          format: int32
          example: 2
        cost_limit:
          type: boolean
          description: >-
            Indicates if the max cost limit for an outbound call limit is
            activated for the SIP trunk.
          default: false
          example: true
        max_call_cost:
          type:
            - string
            - 'null'
          description: A maximum cost of an outbound call, in USD.
          example: '0.18'
        call_restrict:
          type:
            - boolean
            - 'null'
          description: >-
            Indicates if maximum call duration limit is activated for the SIP
            trunk.
          default: false
          example: false
        call_limit:
          type:
            - integer
            - 'null'
          description: >-
            A maximum call duration for the SIP trunk, in seconds. Cannot be
            higher than the max call duration set for the account.
          format: int32
          example: 3600
        didinfo_enabled:
          type: boolean
          description: >-
            Indicates if inbound calls carry dialed number information in the
            'To' header of SIP Invites
          default: true
          example: true
        rewrite_enabled:
          type: boolean
          description: Indicates if a custom dial plan is activated for the SIP trunk.
          default: false
          example: true
        rewrite_prefix:
          type: string
          description: Leading digits to be added before the dialed phone numbers.
          example: '1'
        rewrite_cond:
          type: string
          description: Leading digits to be deleted from the dialed phone numbers.
        call_recording_enabled:
          type: boolean
          description: >-
            Indicates if outbound call recording is enabled on the SIP trunk.
            Available for `Flex Pro` customers only.
          default: false
          example: true
        machine_detection_enabled:
          type: boolean
          description: >-
            Indicates if automatic voicemail detection is enabled on the SIP
            trunk. Available for `Flex Pro` customers only.
          default: false
          example: true
        transcription_enabled:
          type: boolean
          description: >-
            Indicates if automatic call transcription is enabled on the SIP
            trunk. Available for `Flex Pro` customers only.
          default: false
          example: false
        transcription_threshold:
          type: integer
          description: >-
            Transcriptions will be generated for calls that meet or exceed the
            specified minimal call duration threshold, in seconds
          format: int32
          default: 6
          example: 10
        created_at:
          type: string
          description: Date and time the SIP trunk was created
          format: date-time
          example: '2023-05-16T17:13:25.000Z'
        host:
          type: string
          description: >-
            Registration host for the SIP trunk. `dynamic` for credential-based
            registration, or a public static IP address for IP authentication.
          example: dynamic
        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.
          example: true
        encrypted_media:
          type: boolean
          description: >-
            Indicates whether SRTP media encryption is enabled for the SIP
            trunk.
          example: true
        passthrough:
          type: boolean
          description: Indicates whether Caller ID passthrough is enabled.
          example: true
        access_token:
          type:
            - string
            - 'null'
          description: Static authentication token for the SIP trunk.
          example: 123easwqe321132
    ForbiddenErrorResponse:
      title: ForbiddenErrorResponse
      type: object
      properties:
        success:
          type: boolean
          description: >-
            Indicates whether the request was successful. Always `false` for
            this error.
          example: false
        message:
          type: string
          description: Human-readable description of why access is forbidden.
          example: The service is not provisioned for your account.
    AllowedIPs:
      title: AllowedIPs
      type: array
      items:
        type: object
        additionalProperties: false
        required:
          - id
          - ip
        properties:
          id:
            type: integer
            description: IP address ID.
            format: int32
            example: 6712
          ip:
            type: string
            description: Public static IP address.
            example: 127.0.0.1
  responses:
    ForbiddenErrorResponse:
      description: Request failed. The feature is disabled for your account.
      headers: {}
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Wavix API key. Pass as `Authorization: Bearer <api_key>`. Keys support
        per-resource scopes (none / read / write). See [Restricted keys and
        scopes](https://docs.wavix.com/api-reference/authentication#restricted-keys-and-scopes).

````