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

# Add carrier IP to SIP trunk API

> Allow inbound calls from your carrier by adding its signalling address or CIDR range via POST /trunk/trunks/{trunk_id}/ip-acls.

<Note>
  Add every signalling address your carrier publishes for inbound calls. Bolna's SIP edge answers an INVITE from any other source with `403 Forbidden`.
</Note>


## OpenAPI

````yaml POST /trunk/trunks/{trunk_id}/ip-acls
openapi: 3.1.0
info:
  title: Bolna API
  description: >-
    Use and leverage Bolna Voice AI using APIs through HTTP requests from any
    language in your applications and workflows.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.bolna.ai
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: SIP trunks
    description: >-
      Bring-your-own-carrier SIP trunks, their gateways, carrier IPs and
      numbers.
paths:
  /trunk/trunks/{trunk_id}/ip-acls:
    post:
      tags:
        - SIP trunks
      description: >
        Adds a carrier IP: an address or CIDR range your carrier sends inbound
        calls from. Bolna's SIP edge refuses an INVITE from any source that is
        not on an active, inbound-enabled trunk's carrier IP list with `403
        Forbidden`, so list every signalling address your carrier publishes.


        A bare address is stored as a `/32`, and host bits are cleared
        (`203.0.113.7/24` is stored as `203.0.113.0/24`). Ranges must be public
        IPv4 and no broader than `/16`. A trunk has at most 32 carrier IPs.
        Bolna's SIP edge is normally reloaded with the change before the
        response returns.
      parameters:
        - in: path
          name: trunk_id
          required: true
          schema:
            type: string
            format: uuid
          description: The trunk's `id`
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrunkCarrierIpRequest'
            example:
              cidr: 198.51.100.0/28
      responses:
        '200':
          description: The added carrier IP
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrunkCarrierIp'
        '400':
          description: >-
            `cidr` is not an IP address or CIDR, is IPv6, is not a public
            network, is broader than `/16`, or the trunk already has 32 carrier
            IPs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrunkMessageError'
              example:
                message: 10.0.0.0/24 is not a public network
        '404':
          description: No live trunk with this ID belongs to your account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrunkMessageError'
        '422':
          description: '`cidr` is missing or empty, or the body has an unknown field'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrunkValidationError'
components:
  schemas:
    TrunkCarrierIpRequest:
      type: object
      required:
        - cidr
      properties:
        cidr:
          type: string
          description: >-
            An IPv4 address or CIDR range your carrier sends SIP from. Public,
            no broader than `/16`.
          example: 198.51.100.0/28
    TrunkCarrierIp:
      type: object
      properties:
        id:
          type: string
          format: uuid
        trunk_id:
          type: string
          format: uuid
        cidr:
          type: string
          description: The range as stored, always with a prefix length.
          example: 198.51.100.0/28
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        is_deleted:
          type: boolean
        deleted_at:
          type: string
          format: date-time
          nullable: true
    TrunkMessageError:
      type: object
      description: >-
        Error body for `400`, `403` and `404` responses from the SIP trunk
        endpoints.
      required:
        - message
      properties:
        message:
          type: string
          description: >-
            Human-readable reason. On a `404` it names the ID that was not
            found.
    TrunkValidationError:
      type: object
      description: >-
        Error body for `422` responses from the SIP trunk endpoints. The
        rejected input is never echoed back.
      properties:
        detail:
          type: array
          items:
            type: object
            properties:
              loc:
                type: array
                items:
                  oneOf:
                    - type: string
                    - type: integer
                description: Where the error is, such as `["body", "channels"]`.
              msg:
                type: string
                description: What is wrong.
              type:
                type: string
                description: >-
                  Pydantic error type, such as `value_error` or
                  `less_than_equal`.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.