# Voicebot-specific actions

## Forward and record a call

Transferring a voicebot to an agent happens with a call instead of chat.

### Forward a call&#x20;

{% stepper %}
{% step %}
From your [canvas](/navigation/bot-builder/flows.md), add an [**Action**](/buildabot/flow-logic/dialog-state.md#action) block.
{% endstep %}

{% step %}
Select the **Forward call**, **Start recording the call**, or **Stop recording the call** step.

<figure><img src="/files/J65vfHeNkoJ02dfITtwl" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}

### When forwarding a call, Chatlayer cannot guarantee the original caller number is maintained and visible in the destination (dependent on country and operator). This can be countered on SIP Forward by sending it as an attribute:

{% endhint %}

<figure><img src="/files/DGcPU5Rp2votrDPzlUqB" alt=""><figcaption></figcaption></figure>

### Record a call

If you have a [voicebot](/voice/phone-and-voice.md), chances are you need to record part of your calls for legal or administrative reasons. Here is how you can do it:

{% stepper %}
{% step %}
Go to your **Channels** > **Voice** > **Settings** tab.
{% endstep %}

{% step %}
Toggle on the **Save recordings** feature.

By default, your Sinch Voice channel settings for recordings will be off.

<div align="left"><figure><img src="/files/PAScYzW0RLAr0RwSSqV4" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
Go to the **History** > **Conversations** tab and listen to your conversations.
{% endstep %}
{% endstepper %}

### Record only a part of a call

{% stepper %}
{% step %}
Go back to your [**Flows**](/navigation/bot-builder/flows.md).
{% endstep %}

{% step %}
Find the spot in the flow where you'd like to start the recording and drop an **Action** block.
{% endstep %}

{% step %}
Add a **Start recording the call** step.

<div align="left"><figure><img src="/files/una8OZpHnOgfVyaV9nh0" alt="" width="375"><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/uFPa6Xn92upSk3GHK4tt" alt="" width="375"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
Click **Save**.
{% endstep %}

{% step %}
Do the same at the point of the flow where you'd like to stop the recording, using the **Stop recording the call** step this time.

<div align="left"><figure><img src="/files/k76xuhoTkenq6rYP9koI" alt="" width="375"><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/LPphh6j2tWTNIxKTDZ67" alt="" width="375"><figcaption></figcaption></figure></div>
{% endstep %}
{% endstepper %}

{% hint style="info" %}
Please bear in mind that even if you add more than one start/stop recording actions in the same bot, only the last one will be available in the recording widget.
{% endhint %}

{% hint style="info" %}
If you wish to maintain the recording until the end of the live agent conversation, you don’t need to add a Stop recording action.
{% endhint %}

<details open>

<summary>Tips for better cut-off</summary>

The following is optional and dependent on your tests:

* If you realize that the last bot or user utterance is still showing up in the recording, we suggest you add a [**Delay,**](/buildabot/flow-logic/dialog-state/action-bot-dialog.md#delay) before the **Start recording the call** step, that is long enough so the last message before the action is not recorded.&#x20;
* If you want to prevent your recording from including the conversation between the user and live agent from Sinch Contact Pro after offloading, add a **Stop recording the call** step prior to the **Forward the call** step.

</details>

## DTMF

Chatlayer supports dual-tone multi-frequency (DTMF), allowing users to click numbers on their dialpad for redirection.

To use DTMF in your bot:

{% stepper %}
{% step %}
Add a [**Condition**](/buildabot/flow-logic/dialog-state/plugins.md) block to your canvas.
{% endstep %}

{% step %}
Set up your conditions.

The user input, stored in the variable `choice`, determines which **Go-To** option to execute. The input guides the user to a corresponding bot flow, routing calls to the designated queue.&#x20;

For example:

* Customer Support:\
  Say "Support" or press 3 to transfer to Customer Support.
* Marketing:\
  Say "Marketing" or press 2 to transfer to Marketing.
* Sales:\
  Say "Sales" or press 1 to transfer to Sales
  {% endstep %}
  {% endstepper %}

<figure><img src="/files/179C0wtY751bqyn4xsQ2" alt=""><figcaption><p>Example using speech recognition</p></figcaption></figure>

<figure><img src="/files/lHJ6koDXrgCET1YphSQ8" alt=""><figcaption><p>Example using DTMF</p></figcaption></figure>

{% hint style="success" %}
You can also use DTMF to [collect the user's `preferredLanguage`](/nlp/languages/change-language-within-the-conversation.md) and change the language that the bot is using conversationally.
{% endhint %}

## Collect input in voicebots

You can save anything the user is saying as a variable by using the **voiceMessage** format type in **Collect input** blocks. Read more [here](/buildabot/flow-logic/dialog-state/user-input-bot-dialog.md#voice-message).

<figure><img src="/files/unq9S39eh5mnhX49WjJv" alt="" width="375"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chatlayer.ai/voice/phone-and-voice/voicebot-specific-actions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
