> For the complete documentation index, see [llms.txt](https://manuals.dialox.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manuals.dialox.ai/studio/flows/nodes/dial-number.md).

# Dial: Number

Voice Bots are able to dial out to forward the conversation to another number or extension.

Dialing can be done in two different ways:

* invite: the call is handed over, but if it fails, it returns
* refer: the call is immediately handed over and will not return

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FXhvf8o3wjZifE3RKFru9%2Fimage.png?alt=media&#x26;token=a2bc48e4-c616-4782-b4f5-344d01d0d90a" alt=""><figcaption></figcaption></figure>

The following properties can be configured for this node type.

| Property                  | Description                                                                  | Explanation                                                                                                                                                                                                                                          |
| ------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| destination               | The destination type for the call (default)                                  | <p>"Default" to dial the following number in any situation.</p><p>"Contact based alternatives" to dial a number that is based on user data (a specific contact field).</p><p>"Number from variable" to fetch the number to dial from a variable.</p> |
| number                    | The number to call                                                           | Using the extension checkbox, a non-ISO phone number can be provided. This way extension numbers are valid to enter.                                                                                                                                 |
| variable                  | The variable in which the number is stored                                   | The variable picker allows you to select an existing variable or create a new one.                                                                                                                                                                   |
| exceptions                | Option to use another number based on certain rules                          | Currently only the option "contact based" is offered to select a number based on the value of a specific contact field, like "segment" or "country", etc.                                                                                            |
| SIP                       | The method for dialing                                                       | See above.                                                                                                                                                                                                                                           |
| Timeout                   | Time in seconds                                                              | Only works for SIP invite. Stops counting once the Flow for the called party has started.                                                                                                                                                            |
| Caller ID                 | Which number is presented to the called party                                | Either "caller" (the original caller's number) or "bot" (the Bot's own number). Defaults to "caller". Only works for SIP invite.                                                                                                                     |
| Flow for the called party | The Flow that runs for the person being called, before the call is connected | Only works for SIP invite. The Flow must end in a Dial: Bridge call or Dial: Cancel bridge node. See Announce the call to the called party.                                                                                                          |
| Handover message          | Text that is passed on to the Flow for the called party                      | Only used together with a Flow for the called party. Supports variables and translations. Available in the called party's Flow as the variable `handover_message`.                                                                                   |

**Caller ID**

*Caller ID selection only applies to SIP invite dials; with SIP refer the network handling the handover determines the presented number.*

**caller** (default): the original caller's number is presented, so the called party sees who is actually trying to reach them.\
**bot**: the Bot's own number is presented instead — useful when the caller's number shouldn't be exposed, or when the receiving system only accepts calls from a known (whitelisted) number.

#### Announce the call to the called party

With SIP invite you can run a short Flow for the person you are calling *before* the call is connected. Use this, for example, to tell them who is calling and let them accept or decline the call. Select the Flow in **Flow for the called party**.

* While this Flow runs, the caller waits and hears a ringing tone. The Bot cannot speak to the caller in the meantime.
* The Flow runs as a separate conversation for the called party. It cannot see the variables of the caller's conversation. The only thing handed over is the **Handover message**.
* The Flow has to end in a **Dial: Bridge call** or **Dial: Cancel bridge** node. Make sure every path of the Flow ends in one of them.

**Bridge call and Cancel bridge**

These two nodes are meant for the Flow for the called party.

| Node                | Effect                                                                                                                                                                                                                                 |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Dial: Bridge call   | Connects the caller to the called party. This is the last step of the Flow for the called party.                                                                                                                                       |
| Dial: Cancel bridge | Does not connect the call. The Dial node of the caller treats the call as unavailable. The Flow for the called party continues at the next link of this node, so you can still tell the called party something, for example a goodbye. |

**Handover message**

The Handover message works like the title of a Note: it supports variables (for example `{{name}}`) and translations. In the Flow for the called party, use the variable `handover_message`, for example in the text of a Say node.

{% hint style="info" %}
The text is completed on the caller's side, in the caller's language. The Flow for the called party receives the finished text, not the variables themselves, and it is not translated into the language of the called party.
{% endhint %}

**After the dial**

* **The call was connected and has ended:** the conversation closes.
* **The call was not connected:** the called party declined (Cancel bridge), the line was busy or the call was declined, nobody answered within the Timeout, or the line of the called party ended before the call was connected. The variable `unavailable` is set to `true`, the tag `dial:failed` is added, and the Flow continues at the next link of the Dial node. Use these to branch.

{% hint style="warning" %}
A Flow for the called party is only available on the Grid telephony adapter, and only for user extensions and external numbers. It is not supported for queues and groups; use SIP refer for those.

The Timeout no longer applies once the Flow for the called party has started. Keep that Flow short.
{% endhint %}

#### Contact based alternatives

If a different number should be dialed for specific users (Contacts), the destination field should be configured with the value "contact based alternatives". This adds a button to add Alternatives based on specific contact field values.

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FrydiaWGuSLoiucaLdSgJ%2Fimage.png?alt=media&#x26;token=3b41d991-1099-4b09-94d2-eebfc0651ae8" alt=""><figcaption></figcaption></figure>

In the above example there are three alternative numbers based on the contact field "segment". If none of the alternatives match (so the current caller doesn't have "A", "B" or "C" in the field "segment" in this example), the default number will be used. Otherwise it will use the number corresponding to the matching alternative.

{% hint style="info" %}
Instead of `segment`, used as example above, any other field can be used. For instance `first_name` or `last_name` if you want to dial another number based on someone's name.
{% endhint %}

The field `segment` used in the above example should be present in the Contacts database in order for the example to work. The field `segment` should therefore first be added in the contact definition. This can be done in Settings -> Studio

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FenM8Ee45bImqn0taIZbk%2Fimage.png?alt=media&#x26;token=a0def77f-54e3-4387-93fa-5ef88d34ae71" alt=""><figcaption></figcaption></figure>

This will add a column in the Contacts list:

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FPbuCHVijzjXsb4fERSfH%2Fimage.png?alt=media&#x26;token=90be2c74-c305-4140-bd2c-e91bca16643e" alt=""><figcaption></figcaption></figure>

Which can be edited in the side bar:

<figure><img src="https://3356808761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEBQHGJABNTj5ISSOTRxM%2Fuploads%2FreosEBUVa1m2WvJ2Xab0%2Fimage.png?alt=media&#x26;token=ee020ab9-6286-4f43-b670-9201bd563f69" alt=""><figcaption></figcaption></figure>

### Resources

* Phone flows
* Dial: Smart
