# Get Extension Info

Get Extension Info is one of the Internal Data Ops operations. It searches for an extension and returns that user's details, extension number, name, email address, and mobile number, then stores each value in a variable. Components further along the flow can read those variables or test them in a condition.

## What it does

Point the component at an extension and it hands back four pieces of information about that user:

- The extension number.
- The extension name.
- The email address on the extension.
- The mobile number on the extension.

You can name the extension directly through the filters, or supply an expression so the target is chosen while the call runs. The lookup writes its results into variables you can pass to a following component or evaluate in a **Condition**.

:::note
When a search matches more than one extension, the component returns the details of the most recently created one.
:::

## Configure the component

1. Drag the **Internal Data Ops** component onto the canvas, then click it to open its settings.

   ![The Internal Data Ops block placed on the call flow canvas](/images/pbx/developer-component-cfd.png)

2. In the **Component Type** drop-down list, choose **Get Extension Info**.

   ![Choosing Get Extension Info from the Component Type list](/images/pbx/get-extension-info-cfd.png)

3. Narrow the search to the extension you want using any of the filters below.

   ![Setting the filters that identify the target extension](/images/pbx/get-extension-info-filter.png)

   | Filter | Description |
   |--------|-------------|
   | Keyword | Search by first name, last name, email address, or extension number. Alternatively, click the *fx* icon and enter an expression to resolve the extension at runtime. |
   | Name | Enter the extension's first or last name, or click the *fx* icon to supply an expression. |
   | Email | Enter the extension's email address, or click the *fx* icon to supply an expression. |
   | Number | Enter the extension number, or click the *fx* icon to supply an expression. |
   | Extension Group | Choose one or more extension groups to limit the search to those groups. Leave it empty to search every extension group. |
   | Organization | Choose one or more departments to limit the search to those departments. Available only when **Organization Management** is turned on (**PBX Settings > Preferences > Organization Management**). When set, the search covers the selected departments and their sub-departments; leave it empty to search all departments. |

4. Click **Confirm** in the bottom-right corner.

:::tip
When a lookup could match more than one person, filter on a unique value such as the exact extension number. The component then returns a single, predictable result instead of falling back to the most recently created match.
:::

## Variables

Adding a Get Extension Info component writes the extension's details into the variables below. Read them from any expression-aware component, **Condition**, for instance, to act on what the lookup returned.

:::note
A call flow can hold more than one Get Extension Info component, so each is numbered in the order you add it (Get Extension Info 1, Get Extension Info 2, and so on). Include the matching index in the variable name so you read from the right component.
:::

| Variable | Type | Description | Example |
|----------|------|-------------|---------|
| `$GetExtensionInfo{index}.number` | String | Extension number. | `"1001"` |
| `$GetExtensionInfo{index}.name` | String | Extension name. | `"Phillip Huff"` |
| `$GetExtensionInfo{index}.email` | String | The extension's email address. | `"phillip@sample.com"` |
| `$GetExtensionInfo{index}.mobileNumber` | String | The extension's mobile number. | `"15880123456"` |

## What it can connect to

A Get Extension Info component leads to **exactly one** downstream component. Any of the following can follow it:

| Component | Purpose |
|-----------|---------|
| [Prompt](/pbx/call-flow-designer-guide/prompt/) | Play an audio file or a text-to-speech message to the caller. |
| [Business Hours](/pbx/call-flow-designer-guide/business-hours/) | Route the call to different destinations depending on the time of day. |
| [Menu](/pbx/call-flow-designer-guide/menu/) | Offer callers a set of options and route them by the DTMF key they press. DTMF (Dual-Tone Multi-Frequency) is the tone a phone sends when the caller presses a keypad digit. |
| [User Input](/pbx/call-flow-designer-guide/user-input/) | Collect DTMF digits from the caller, usually paired with **Condition** to act on what was entered. |
| [Language](/pbx/call-flow-designer-guide/language/) | Change the system prompt language for the rest of the flow. |
| [Record](/pbx/call-flow-designer-guide/record/) | Start recording once the caller connects to another party, with optional notification prompts, or turn recording off for a call that would otherwise be recorded. |
| [Dial by Number](/pbx/call-flow-designer-guide/dial-by-number/) | Let callers dial a number directly to reach their destination. |
| [Dial by Name](/pbx/call-flow-designer-guide/dial-by-name/) | An end component that lets callers reach a user by typing the first three letters of their name. |
| [Transfer](/pbx/call-flow-designer-guide/transfer/) | An end component that sends the caller to a chosen destination, with optional prompts announcing the transfer. |
| [Hang Up Call](/pbx/call-flow-designer-guide/hang-up-call/) | An end component that disconnects the call. |
| [Condition](/pbx/call-flow-designer-guide/condition/) | Route the call based on logical expressions. |
| [Loop](/pbx/call-flow-designer-guide/loop/) | Repeat a group of components a set number of times or until a condition is met. |
| Internal Data Ops | Read from and write to the Cloud Voice system's own database. See [Get Extension Presence Status](/pbx/call-flow-designer-guide/get-extension-presence-status/), [Set Extension Presence Status](/pbx/call-flow-designer-guide/set-extension-presence-status/), [Get Queue Agent](/pbx/call-flow-designer-guide/get-queue-agent/), [Get Queue Info](/pbx/call-flow-designer-guide/get-queue-info/), [Get Agent Status](/pbx/call-flow-designer-guide/get-agent-status/), [Set Agent Status](/pbx/call-flow-designer-guide/set-agent-status/), [Get System Info](/pbx/call-flow-designer-guide/get-system-info/), [Get System Capacity](/pbx/call-flow-designer-guide/get-system-capacity/), [Get Extension Info](/pbx/call-flow-designer-guide/get-extension-info/), and [Get Company Contact Info](/pbx/call-flow-designer-guide/get-company-contact-info/). |
| [Email Sender](/pbx/call-flow-designer-guide/email-sender/) | Send an email for real-time notifications, alerts, or user-specific information. |
| [Database Access](/pbx/call-flow-designer-guide/database-access/) | Run a SQL (Structured Query Language) operation against an external database during the call flow. |
| [HTTP Request](/pbx/call-flow-designer-guide/http-request/) | Send an HTTP request to an external server to exchange data with a third-party service. |
