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

# Link a SIP Trunk

> Link a bring-your-own phone number to SIP trunk credentials.

<Warning>
  **Legacy endpoint - deprecated.** Unversioned endpoints are scheduled for removal on **July 31, 2026**. Use the [`/v1` version](/docs/api-reference/v1/phone-numbers/link-sip-trunk) for new integrations. This endpoint remains available for existing integrations until then.
</Warning>

Links a bring-your-own phone number to SIP trunk credentials and registers it for DialNexa routing. Use this path for SIP or BYOC numbers that were not purchased through DialNexa.

## Related endpoints

* [SIP Trunking](/docs/calls/sip-trunking): configure BYOC routing in the dashboard.
* [Create a Phone Number Order](/docs/api-reference/phone-numbers/create-order): purchase a provider number instead.


## OpenAPI

````yaml POST /organization-phone-numbers/sip-trunks
openapi: 3.0.0
info:
  title: DialNexa API
  description: >-
    Public REST API for the DialNexa voice AI platform. Versioned endpoints are
    under /v1; unversioned endpoints are legacy and deprecated.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: API Keys
  - name: Agent Functions
  - name: Agents V1
  - name: Agents2
  - name: Batch Calls
  - name: Batch Calls V1
  - name: Call Logs
  - name: Calls
  - name: Calls V1
  - name: Campaign Leads
  - name: Campaigns
  - name: External Webhooks
  - name: Knowledge Base
  - name: Knowledge Base V1
  - name: LLMs
  - name: LLMs V1
  - name: Languages
  - name: Languages V1
  - name: Organization Phone Numbers
  - name: Organization Phone Numbers V1
  - name: Phone Number Pricing
  - name: Phone Number Pricing V1
  - name: Transcribers
  - name: Transcribers V1
  - name: User Webhooks
  - name: User Webhooks V1
  - name: V1
  - name: Voices
  - name: Voices V1
  - name: Webcall
  - name: Workflow Leads
  - name: Workflow Leads V1
  - name: Workflows
  - name: Workflows V1
paths:
  /organization-phone-numbers/sip-trunks:
    post:
      tags:
        - Organization Phone Numbers
      summary: Link a BYOC phone number with SIP trunk credentials (V1 alias)
      description: >-
        **Legacy endpoint - deprecated, scheduled for removal on July 31,
        2026.** Use the `/v1` version for new integrations. 
      operationId: OrganizationPhoneNumbersController_linkSipTrunkV1
      parameters:
        - name: x-organization-id
          in: header
          description: RSA encrypted organization ID (base64 format)
          required: true
          schema:
            type: string
            example: BASE64_ENCRYPTED_ORG_ID_HERE
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkSipTrunkDto'
      responses:
        '201':
          description: SIP trunk linked and registered with media server.
        '400':
          description: Invalid input or missing configuration
        '409':
          description: Phone number already registered
        '502':
          description: Media server trunk registration failed
      deprecated: true
components:
  schemas:
    LinkSipTrunkDto:
      type: object
      properties:
        phoneNumber:
          type: string
          example: '+14155552671'
          description: E.164 phone number
        terminationUri:
          type: string
          example: 31974861099010243.zt.plivo.com:5060
          description: 'SIP termination host[:port]; must not use a sip: URI prefix'
        sipTrunkUserName:
          type: string
          description: SIP authentication username
        sipTrunkPassword:
          type: string
          description: SIP authentication password (stored encrypted)
        nickname:
          type: string
          description: Display nickname for this trunk
      required:
        - phoneNumber
        - terminationUri
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````