# Make Outbound Calls through the Extended FXO Trunks

Once Cloud Voice is paired with a TA810 gateway, the gateway's FXO (Foreign Exchange Office) lines become available as trunks, but nothing sends calls to them yet. An FXO port is the gateway side that plugs into an analog phone line from the local carrier, so calls placed over these trunks leave through the PSTN (Public Switched Telephone Network). To place outbound calls over those lines, you build a matching pair of routes: an outbound route on the PBX (Private Branch Exchange, your phone system) that hands calls to the gateway, and an `IP->Port` route on the gateway that forwards those calls out an FXO trunk.

:::note
Both routes must point at the same SIP (Session Initiation Protocol) trunk. The trunk the PBX outbound route sends to in Step 1 is the same trunk the gateway names as its call source in Step 2. If the two ends reference different trunks, calls will not connect.
:::

![Cloud Voice, call path from a PBX extension through the SIP trunk to the TA810 gateway and out an FXO line to the PSTN](/images/pbx/ta-fxo-gateway-p-series-make-calls-ce.png)

## Step 1: Create an outbound route in Cloud Voice

Add an outbound route so extensions can reach the TA810 gateway.

1. Sign in to the PBX management portal and go to **Call Control > Outbound Route**, then click **Add**.
2. Configure the following, and leave the remaining fields at their defaults:
   - **Name**: A label that makes the route easy to identify.
   - **Dial Pattern**: Define how users dial out. In this example, set **Pattern** to `9.` and **Strip** to `1`, so callers dial a `9` prefix ahead of the number. To reach `123456`, a user dials `9123456`, and the `9` is stripped before the call leaves the PBX. The `.` in the pattern is a wildcard that matches any digits typed after the prefix.

     ![Outbound route dial pattern set to 9-dot with a strip length of one digit](/images/pbx/p560-outbound-dialpattern.png)

     :::caution
     The **Strip** value must equal the number of prefix digits in your pattern. Here the prefix is one digit (`9`) and **Strip** is `1`. If they do not match, the wrong digits reach the carrier and the call fails or dials the wrong number.
     :::

   - **Trunk**: Choose the SIP account trunk that connects to the TA810 gateway, for example `Connect-to-TA810-Gateway`.

     ![Outbound route with the account trunk to the TA810 gateway selected](/images/pbx/pce-outbound-route-trunk-to-fxo.png)

   - **Extension/Extension Group**: Choose which extensions may dial out on this route. In this example, all extensions are allowed.

     ![Outbound route extension selection with all extensions added](/images/pbx/p560-outbound-route-extension.png)

     :::tip
     Grant the route only to the extensions that genuinely need to dial out over these FXO lines. Limiting access keeps unused extensions off the trunk and reduces exposure to toll fraud.
     :::

3. Click **Save**, then **Apply**.

:::danger
Emergency calls need special care on FXO-based outbound routing. With a `9.` pattern and a strip of `1`, a caller must dial `9911` to reach `911`, and the call presents the FXO line's own number to the carrier, which maps to whatever address that line is registered to. Before relying on this route in production, confirm how emergency (911) calls are dialed and that the presented caller ID resolves to the correct physical location.
:::

## Step 2: Create an IP-&gt;Port route on the TA810 gateway

Add an `IP->Port` route so calls arriving from the PBX are sent out an FXO trunk.

1. Sign in to the gateway's web interface and go to **Gateway > Route Settings > IP->Port**, then click **Add IP->Port Route**.
2. In the dialog that opens, configure the route:
   - **Simple Mode**: Select **No**.

     :::note
     Setting **Simple Mode** to **No** reveals the full set of routing fields (call source, DID, and call destination) that you configure below. In **Simple Mode**, those fields are hidden.
     :::

   - **Route Name**: Enter a label to identify the route.
   - **Call Source**: Choose the SIP trunk that connects to Cloud Voice, for example `SIP Trunk - PCEtrunking`. This is the same trunk the PBX outbound route sends to in Step 1.
   - **DID Number**: Set to `.` so users can dial any number. DID (Direct Inward Dialing) matching lets you restrict which dialed numbers this route accepts, and a single `.` matches all of them.
   - **Call Destination**: Choose the FXO trunks used to place the call. In this example, all FXO trunks are selected.

   ![IP-to-Port route on the TA810 gateway matching the PBX SIP trunk to the FXO trunks](/images/pbx/pce-ta810-from-pe-route.png)

   :::caution
   A **DID Number** of `.` combined with all FXO trunks as the destination lets any call from that SIP trunk dial any number out any line. That is convenient in a lab, but in production it widens your exposure to toll fraud. Restrict who can reach this route (see the extension selection in Step 1) or narrow the DID pattern if you do not need open dialing.
   :::

3. Click **Save**, then **Apply Changes**.

## Step 3: Place a test call

Dial out from an extension to confirm the routes work end to end. Say the extended FXO trunk presents an outbound caller ID of `505523301`. When extension `2000` dials `91588035242`, number `1588035242` rings and shows the caller ID `505523301`.

:::tip
If the test call fails, check the pairing before touching the routes: confirm both routes reference the same SIP trunk, that the **Strip** value matches your prefix, and that the destination FXO line is connected and not already in use.
:::
