> For a complete page index, fetch https://docs.synthflow.ai/llms.txt. For full documentation content, fetch https://docs.synthflow.ai/llms-full.txt.

# Asterisk-based PBX Systems

> Configure warm transfers between Synthflow and Asterisk-based PBX systems for seamless handoff to human agents.

This guide outlines how warm transfers are handled between **Synthflow** and **Asterisk-based PBX systems**, and how to configure both your PBX and Synthflow UI for seamless call handoff to human agents.

***

## How warm transfer works

When a caller asks the AI assistant (Synthflow) to speak to a human agent:

1. Synthflow sends a new SIP `INVITE` to the human agent (transferee).
2. Once the human agent answers, Synthflow sends a `REFER` request on the original call with a `Refer-To:` URI.
3. The Asterisk PBX must accept the \`\` and open a new channel using the `Refer-To` URI.
4. The `Refer-To` URI includes a random ID prefixed with `0875704225`.
5. This URI bridges the customer and the human agent, completing the warm transfer.

***

## Asterisk PBX configuration

### 1. `extensions.ael` example

```ael
context from-synthflow {
  +12345678912 => {
    Dial(PJSIP/${EXTEN});
    Hangup();
  }
  _0875704225. => {
    Dial(PJSIP/synthflow/sip:${EXTEN}@sip:sipin.synthflow.ai:32681);
    Hangup();
  }
}
```

### 2. `extensions.conf` example

```conf
[from-synthflow]
exten => +12345678912,1,Dial(PJSIP/${EXTEN})
same => n,Hangup()

exten => _0875704225.,1,Dial(PJSIP/synthflow/sip:${EXTEN}@sip:sipin.synthflow.ai:32681)
same => n,Hangup()
```

**Note**: The `_0875704225.` extension pattern must match the prefix used in the `Refer-To` URI to successfully complete the transfer.

***

## Set up the warm transfer in Synthflow

### Step 1. Create an outbound agent

Go to the **Agents** tab on the left-hand sidebar.

Create a new outbound agent. For more details on how to create an agent, see [Create an agent](/create-an-agent).

Add a **DID number** (this can be a test/dummy DID if needed).

### Step 2. Configure call actions for warm transfer

On the left-hand sidebar, click **Agents**.

Select the agent you want to configure the action for.

On the navigation sidebar, select **Actions**.

Switch to the **During the call** tab and click  **Add Action** >  **Call Transfer**.

Enter the phone number of the human agent and click **Add Actions**. If you're adding a new number, you'll be prompted to validate it.

Click on the action you've just created and select **Transfer Settings**.

Set **Transfer Mode** to **“Warm transfer with message”**. You can set a custom message the agent will say before transferring the call (for example, "“The user requested the manager; merging you now!").

Click **Save**.

***

## Test the warm transfer

On the left-hand sidebar, click **Agents**.

Select the agent you want to test.

On the nevigation sidebar under your agent's nae, click  **Test Agent**.

Dial the number and begin a conversation with the AI bot. In your conversation, say: "Please transfer to a human agent." The system will dial the transferee. Once the agent answers, they will hear the configured prompt before being merged into the call.