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

# Direct trunk

> Enterprise: send calls from your own SIP trunk or PBX straight to the agent, with no WireDesk number in the path.

By default, the agent answers a number bought through WireDesk, and you keep your published line by forwarding it there from your carrier. See [phone](/docs/channels/phone).

A direct trunk skips that number. You connect a line you already own, WireDesk gives you a SIP destination for it, and your carrier or PBX sends that line's calls straight there. Nothing is bought.

It suits high-volume contact centres that already run their own SIP trunk or PBX and want to route calls themselves.

## Getting it switched on

Direct trunk is off by default and is enabled per workspace by WireDesk. [Talk to sales](https://wiredesk.ai/contact) to have it switched on for your workspace.

Once it's on, the **Phone** card on every agent in the workspace gains a **Connect a line on your own trunk** form. If the option is later switched off, lines already connected keep working.

## Connect a line

<Steps>
  <Step title="Open the Phone card">
    Go to **Agents → your agent → Channels**. The **Connect a line on your own trunk** form is on the **Phone** card, below **Get a number** if the agent has no number yet, or below the agent's existing numbers.
  </Step>

  <Step title="Enter the number">
    Type the line's number in E.164 format, for example `+16075551234`, and click **Connect**.
  </Step>

  <Step title="Copy the SIP destination">
    When you see "Number connected — its SIP destination is on the card.", the line is listed on the **Phone** card under **Your carrier forwards this line to**, with its SIP URI. Click **Copy SIP** to copy it.
  </Step>

  <Step title="Route the line at your carrier or PBX">
    Configure your trunk or PBX to send calls for that line to the SIP URI. The URI specifies TLS transport (`transport=tls`).
  </Step>

  <Step title="Call the line">
    Call the published number and check the agent answers.
  </Step>
</Steps>

Owners and admins can connect lines. An agent can have several connected lines; each line can belong to only one agent.

### Errors when connecting

| Message                                                                                                  | Cause                                                                                                    |
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| "number must be E.164, e.g. +16075551234"                                                                | The number isn't in `+` country code and digits form, with no spaces.                                    |
| "that number is already connected"                                                                       | The number is already attached to an agent.                                                              |
| "this number is the agent's handover number — transferring a call here would loop it back to the agent…" | The line matches the agent's transfer number. Connect a different number, or change the transfer number. |

## How calls are matched

WireDesk identifies the line from the number in the call's SIP `To` header, and answers with the agent that line is connected to. A call whose `To` number isn't a line connected in WireDesk is not answered.

If your PBX forwards a published number onto this line, pass the original number in a `Diversion` or `History-Info` header. The agent reads those headers and won't transfer a caller to the published line that forwarded the call, which would loop the call back to it.

## Transfers

Live transfers work as on any number: the agent transfers the caller to the transfer number set under **Channels → Phone**. The same rule applies. The transfer number must be a different line, such as a mobile, not the connected line or a number that forwards to it, or the call comes back to the agent. See [hand calls to you](/docs/actions/hand-calls-to-you).

## Everything else is the same

A call on a connected line behaves like any other call: the same greeting, [AI & recording notice](/docs/channels/ai-notice), [voice](/docs/channels/voice), knowledge and actions, and the same transcript and summary in **Conversations**. The agent's time on the call is metered as voice minutes, as on any call. See [plans and limits](/docs/reference/plans-and-limits).

Turning the **Phone** card's switch off stops the agent answering connected lines too.

## Remove a line

Click **Remove number** under the line on the **Phone** card. WireDesk stops answering it immediately. The number stays with your carrier; point the line somewhere else there.

If a warning appears under a connected line saying it isn't registered and calls go unanswered, contact WireDesk support.

## Related

* [Phone](/docs/channels/phone)
* [Phone troubleshooting](/docs/troubleshooting/phone)
* [Security model](/docs/developers/security-model)
* [Developer overview](/docs/developers/overview)
