To correctly apply the tech prefix `32270#` to the destination phone number rather than the caller ID, you should adjust the FreeSWITCH dialplan. Below is the updated guide using XML files to achieve this and how to set up using a web GUI if available (like FusionPBX).

Configuring Using XML Files

Step 1: Locate the Dialplan File

Find the appropriate dialplan file in your FreeSWITCH installation, typically under `conf/dialplan/`. You may choose to edit one of the context files like `default.xml`, `public.xml`, or `external.xml`.

Step 2: Edit or Add an Extension

Modify or add a new extension in the dialplan to prepend the tech prefix to the destination phone number and route the call via your specified SIP gateway. Here is an example configuration:

<extension name="outbound_calls_with_prefix">
    <condition field="destination_number" expression="^(\d+)$">
        <action application="export" data="dialed_extension=32270#$1"/>
        <action application="bridge" data="sofia/gateway/your_gateway_name/sip:${dialed_extension}"/>

- Condition: This matches calls to numbers consisting of digits only.

- Action (export): This action creates a variable `dialed_extension` that includes the tech prefix `32270#` followed by the originally dialed number `$1`.

- Action (bridge): This action directs the call to the specified gateway, using the variable `${dialed_extension}` which includes the tech prefix.

Step 3: Reload the Dialplan

After editing the dialplan file, apply the changes by reloading the dialplan configuration:

fs_cli -x "reloadxml"

Step 4: Test the Configuration

Perform a test call to ensure that the tech prefix is correctly prepended to the destination number and that the call is properly routed through the specified SIP gateway.

Configuring Using a Web GUI (e.g., FusionPBX)

If you are using a web GUI like FusionPBX, the steps to add a tech prefix will be different:

Step 1: Access the Dialplan Manager

Log into your FusionPBX web interface and navigate to the "Dialplan" section.

Step 2: Add or Edit a Dialplan Entry

- Create a New Dialplan: Click on “Add” to create a new dialplan entry.

- Condition**: Set the condition to match the destination number pattern, typically `^(\d+)$` for numbers.

- Actions: Add actions to:

  - Set Variable: Use this to create a variable `dialed_extension` with the value `32270#` concatenated with the destination number.

  - Bridge: Use this action to bridge the call using the variable you set, indicating the gateway and the full destination address with the tech prefix.

Step 3: Save and Apply Changes

After configuring the actions, save your dialplan entry and apply changes.

Step 4: Test Your Configuration

Make sure to test your configuration to confirm that everything is working as expected, with calls being routed with the tech prefix.

This guide should help you implement the desired behavior both through direct XML configuration and via a web interface like FusionPBX.

Here is a screenshot of a working configuration between FreeSwitch and TelecomsXChange. The dial plan variable is the seller Tech prefix you need to use, so for example if you want to send the calls to TATA Communications you will insert Dialplan Variable: 32270#