> ## 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.

# List SIP trunk calls API

> List recent inbound and outbound calls on a SIP trunk's numbers via GET /trunk/trunks/{trunk_id}/calls, with outcome and SIP code.



## OpenAPI

````yaml GET /trunk/trunks/{trunk_id}/calls
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}/calls:
    get:
      tags:
        - SIP trunks
      description: >
        Lists recent calls on a trunk's numbers, newest first: inbound calls to
        them and outbound calls placed from them. Each entry links to its full
        record through `execution_id` and the [Get execution
        API](/api-reference/executions/get_execution).
      parameters:
        - in: path
          name: trunk_id
          required: true
          schema:
            type: string
            format: uuid
          description: The trunk's `id`
        - in: query
          name: direction
          required: false
          schema:
            type: string
            enum:
              - all
              - inbound
              - outbound
              - failed
            default: all
          description: >-
            `failed` returns inbound and outbound calls that ended `no-answer`,
            `busy`, `failed`, `error` or `canceled`.
        - in: query
          name: limit
          required: false
          schema:
            type: integer
            minimum: 1
            default: 50
          description: Maximum number of calls to return. Values above 100 return 100.
        - in: query
          name: number
          required: false
          schema:
            type: string
          example: '+12025550143'
          description: >-
            Only calls on this one number, given exactly as the number's `e164`.
            URL-encode the plus as `%2B`.
      responses:
        '200':
          description: Recent calls
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrunkCallList'
        '404':
          description: >-
            No live trunk with this ID belongs to your account, or `number` is
            not one of the trunk's numbers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrunkMessageError'
              example:
                message: trunk_numbers:+12025550143
        '422':
          description: '`direction` is not one of the listed values, or `limit` is below 1'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrunkValidationError'
components:
  schemas:
    TrunkCallList:
      type: object
      properties:
        calls:
          type: array
          items:
            $ref: '#/components/schemas/TrunkCall'
      example:
        calls:
          - execution_id: 4c1e7a9b-2d3f-4a5b-8c6d-7e8f9a0b1c2d
            started_at: '2026-10-16T10:02:11.904512+00:00'
            direction: inbound
            number: '+12025550178'
            duration_s: 143
            outcome: completed
            sip_code: null
            sip_cause: NORMAL_CLEARING
          - execution_id: 9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d
            started_at: '2026-10-16T09:55:40.118204+00:00'
            direction: outbound
            number: '+12025550191'
            duration_s: 0
            outcome: busy
            sip_code: 486
            sip_cause: USER_BUSY
    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`.
    TrunkCall:
      type: object
      properties:
        execution_id:
          type: string
          description: >-
            The call's execution ID, for the [Get execution
            API](/api-reference/executions/get_execution).
          example: 4c1e7a9b-2d3f-4a5b-8c6d-7e8f9a0b1c2d
        started_at:
          type: string
          format: date-time
          example: '2026-10-16T10:02:11.904512+00:00'
        direction:
          type: string
          enum:
            - inbound
            - outbound
        number:
          type: string
          description: The other party's number, as recorded on the call.
          example: '+12025550178'
        duration_s:
          type: integer
          nullable: true
          description: Conversation length in whole seconds. `null` when not recorded.
          example: 143
        outcome:
          type: string
          description: >-
            The execution's status, such as `completed`, `no-answer`, `busy` or
            `failed`.
          example: completed
        sip_code:
          type: integer
          nullable: true
          description: The SIP response code that ended the call, when one was recorded.
          example: 486
        sip_cause:
          type: string
          nullable: true
          description: >-
            The hangup cause reported by Bolna's media server, such as
            `NORMAL_CLEARING` or `USER_BUSY`.
          example: USER_BUSY
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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