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

# SIP trunk

> Prepare SIP routing details, save a trunk configuration, and separate stored settings from a verified calling deployment.

The phone-number API accepts a `sip_trunk` import with inbound and outbound configuration. Importing saves a workspace record; it does not establish a connected trunk or prove that a call can reach an executable agent.

## Prepare the trunk

Ask the carrier or trunk operator for the routing identifier, inbound source addresses, outbound destination, authentication method, transport, media encryption, and codec requirements. Record which direction each value describes. For example, [Twilio's SIP documentation](https://www.twilio.com/docs/sip-trunking) distinguishes termination toward the phone network from origination toward your infrastructure.

| Configuration | Review |
| - | - |
| `phone_number` | Use the exact telephone number or SIP routing identifier expected by this route. |
| Inbound `allowed_addresses` and `allowed_numbers` | Limit accepted sources to the intended deployment. |
| Inbound `remote_domains` | Match the certificate domains required by your TLS design. |
| Outbound `address` and `transport` | Use the carrier-provided destination and supported transport. |
| `media_encryption` | Agree on the media policy at both ends; saving it does not prove negotiation. |
| `enabled_codecs` | Match the request schema and provider capability. |

The current schema accepts `auto`, `udp`, `tcp`, or `tls` transport and `disabled`, `allowed`, or `required` media encryption. Its codec values include `G722/8000`, `PCMU/8000`, and `PCMA/8000`. These are configuration choices, not a claim that every combination has passed a live call test.

## Save and verify the record

<Steps>
  <Step title="Import the configuration">
    Use [Import phone number](/api-reference/agents-platform/import-phone-number) with `provider: "sip_trunk"`. Review the nested inbound and outbound schemas before submitting. The import path redacts credential fields in stored provider metadata; it does not validate them against the carrier.
  </Step>

  <Step title="Read the result back">
    Keep the returned identifier and use [Get phone number](/api-reference/agents-platform/get-phone-number). Check the routing identity, label, assignment, and trunk details. A configured status is stored state, not a connectivity test.
  </Step>

  <Step title="Review the deployment separately">
    Confirm the runtime's ingress destination, credential handoff, network policy, and executable agent version before routing traffic. Use [customize calls](/agents-platform/deploy/telephony/customize-calls) for assignment and branch handling.
  </Step>
</Steps>

When a supported calling runtime is available, test inbound and outbound directions independently with authorized test numbers. Check answer, two-way audio, hangup, failure handling, and provider records. See [troubleshooting](/agents-platform/deploy/telephony/troubleshooting).

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Does importing a SIP number provision a carrier trunk?" id="sip-trunk-faq-provision">No. It saves configuration in Threetone. Carrier provisioning and runtime connectivity require separate verification.</Accordion>
  <Accordion title="Can I use any listed outbound-call route after import?" id="sip-trunk-faq-outbound">No. Each route has its own provider and runtime requirements. A SIP import does not satisfy the managed PSTN and Twilio fulfillment requirements of the general outbound route.</Accordion>
</AccordionGroup>


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