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

# Fix Sip Trunk

> Fix SIP trunk by deleting and recreating with correct IP allowlist.

Use this when inbound calls aren't reaching LiveKit due to IP allowlist issues.

**CAUTION**: This will:
1. Delete the existing trunk
2. Create a new trunk with correct provider IPs
3. The trunk_id will change
4. You may need to re-register the phone number to recreate dispatch rules

Args:
    phone_number: The phone number to fix (E.164 format)
    provider: SIP provider (telnyx, twilio, vonage, plivo, etc.)



## OpenAPI

````yaml https://api.mrassistant.ai/openapi.json post /agents/sip/fix-trunk/{phone_number}
openapi: 3.1.0
info:
  title: Backend - Multilingual Voice Agent System
  description: FastAPI backend for multilingual voice agents with tool use
  version: 1.0.0
servers: []
security: []
paths:
  /agents/sip/fix-trunk/{phone_number}:
    post:
      tags:
        - agent-phone-numbers
      summary: Fix Sip Trunk
      description: >-
        Fix SIP trunk by deleting and recreating with correct IP allowlist.


        Use this when inbound calls aren't reaching LiveKit due to IP allowlist
        issues.


        **CAUTION**: This will:

        1. Delete the existing trunk

        2. Create a new trunk with correct provider IPs

        3. The trunk_id will change

        4. You may need to re-register the phone number to recreate dispatch
        rules


        Args:
            phone_number: The phone number to fix (E.164 format)
            provider: SIP provider (telnyx, twilio, vonage, plivo, etc.)
      operationId: fix_sip_trunk_agents_sip_fix_trunk__phone_number__post
      parameters:
        - name: phone_number
          in: path
          required: true
          schema:
            type: string
            title: Phone Number
        - name: provider
          in: query
          required: false
          schema:
            type: string
            default: telnyx
            title: Provider
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Fix Sip Trunk Agents Sip Fix Trunk  Phone Number 
                  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````