# Inbound Route Parameters

An inbound route tells the system where to send an incoming call, based on the number the caller dialed (the Direct Inward Dialing, or DID, number) and, optionally, on who is calling (the caller ID). When you bulk import or export inbound routes, each route is one row in a comma-separated values (CSV) file and each setting maps to a column. Use this reference to format your values correctly, to see which columns are mandatory, and to know the default the system applies when a value is missing.

:::note
On import, any column you leave blank is set to its default value. Any reference to another object (a trunk, phonebook, extension, or extension group) is ignored if that object does not already exist on the system.
:::

:::tip
Several columns accept more than one value. Separate multiple entries with an ampersand (`&`), for example `{name1}&{name2}`. A hyphen (`-`) is reserved for ranges, for example `1001-1005`.
:::

## Column reference

| Parameter | Description | Required? | Default |
| --- | --- | --- | --- |
| **Name** | Identifies the inbound route. No spaces or special characters, must be unique, and up to 63 characters. | Required | - |
| **Inbound Alert Info** | Sets the Alert Info value so matching calls can trigger a distinctive ring tone on the phone (useful for telling staff which line is ringing). Letters and numbers only, up to 31 characters. | Optional | - |
| **DID Matching Mode** | How the route compares the dialed (callee) number. See [DID matching modes](#did-matching-modes) for accepted values. | Optional | `patterns` |
| **DID Pattern** | The pattern the dialed number is matched against; only matching calls follow this route. Formatting depends on the matching mode, see [DID Pattern](#did-pattern). | Required, unless DID Matching Mode is `patterns` | - |
| **Caller ID Matching Mode** | How the route compares the caller's number. Accepted values: `patterns` (rule-based matching) and `phonebook` (match contacts held in specific phonebooks). | Required | `patterns` |
| **Caller ID Pattern** | Limits the route to calls whose caller ID matches. Formatting depends on the matching mode, see [Caller ID Pattern](#caller-id-pattern). | Optional | - |
| **Trunks** | The trunk or trunks whose incoming calls this route handles; a call is routed here when an external caller reaches one of these trunk numbers. Enter one or more existing trunk names separated by `&`, for example `{name1}&{name2}`. | Required | - |
| **Default Destination** | Where a matched call is sent. See [Default destinations](#default-destinations) for accepted values. | Required | `end_call` |
| **Number of Default Destination** | The specific number, range, or extensions for the chosen destination, see [Number of Default Destination](#number-of-default-destination). | Required, unless Default Destination is `end_call` or `pattern_to_ext_list` | - |
| **Enable Fax Detection** | Turns fax detection on or off. `0` disables it, `1` enables it. | Required | `0` |
| **Fax Destination** | Where a detected fax is delivered. Accepted values: `end_call` (hang up), `extension`, and `fax_to_email`. | Required, when Enable Fax Detection is `1` | `extension` |
| **Number of Fax Destination** | The extension that receives the fax; it must already exist on the system. With `extension`, the fax is sent to that extension number. With `fax_to_email`, it is sent to that extension's email address. | Required, unless Fax Destination is `end_call` | - |

## DID matching modes

`DID Matching Mode` accepts one of the following:

- `patterns`, DID Patterns
- `pattern_to_ext`, DID Pattern to Extensions
- `range_to_ext`, DID Range to Extension Range
- `pattern_to_ext_list`, DID Number to Specific Extension

## DID Pattern

How you format the `DID Pattern` column depends on the selected `DID Matching Mode`:

- **`patterns`**, Enter one or more patterns. Numbers, letters, and the characters `[` `]` `*` `#` `(` `)` `.` `-` `+` `!` are allowed, up to 31 characters per DID. Separate multiple patterns with `&`, for example `{pattern1}&{pattern2}`.
- **`pattern_to_ext`**, Numbers, the letters `X` `Z` `N`, the characters `[` `]` `*` `#` `-` `+`, and the placeholder `{{.Ext}}` are allowed, up to 31 characters. Set `Default Destination` to `pattern_to_ext` and list the target extension numbers in `Number of Default Destination`, separated by `&`.
- **`range_to_ext`**, Numbers only, with an optional leading `+`, up to 16 characters per DID. Enter the first and last DID separated by `-`, for example `5503301-5503305`. Set `Default Destination` to `range_to_ext` and enter the matching first and last extension in `Number of Default Destination`, separated by `-`, for example `1001-1005`.

:::caution
The `pattern_to_ext`, `range_to_ext`, and `pattern_to_ext_list` matching modes only work when `Default Destination` is set to the same value. If the two columns do not agree, the route will not deliver calls to the extensions you expect.
:::

## Caller ID Pattern

How you format the `Caller ID Pattern` column depends on the selected `Caller ID Matching Mode`:

- **`patterns`**, Numbers, letters, and the characters `[` `]` `*` `#` `(` `)` `.` `-` `+` `!` are allowed, up to 31 characters per pattern. Separate multiple patterns with `&`, for example `{pattern1}&{pattern2}`.
- **`phonebook`**, Enter one or more phonebook names that already exist on the system, separated by `&`, for example `{name1}&{name2}`. Any name that does not exist is skipped.

## Default destinations

`Default Destination` accepts one of the following:

- `end_call`, Hang up
- `extension`, Extension
- `range_to_ext`, Match an extension range (requires `DID Matching Mode` = `range_to_ext`)
- `pattern_to_ext`, Match a selected extension (requires `DID Matching Mode` = `pattern_to_ext`)
- `pattern_to_ext_list`, DID number matches a specific extension (requires `DID Matching Mode` = `pattern_to_ext_list`)
- `ext_vm`, Extension voicemail
- `group_vm`, Group extension
- `ivr`, IVR (Interactive Voice Response, the automated menu that prompts callers to press a key)
- `ring_group`, Ring group
- `queue`, Queue
- `conference`, Conference
- `fax_to_email`, Fax to email

:::caution
`end_call` is also the default. If you leave `Default Destination` blank on import, every call this route matches is hung up. Set a real destination unless you intend for these calls to be dropped.
:::

## Number of Default Destination

Format this column according to the selected `Default Destination`:

- For a single-target destination (extension, extension voicemail, group extension, IVR, ring group, queue, conference, or fax to email), enter one number.
- For **Match an extension range** (`range_to_ext`), enter an extension range such as `1000-1010`. Each number can be up to 11 digits.
- For **Match a selected extension** (`pattern_to_ext`), enter extension numbers or extension group names separated by `&`, for example `{extension_number1}&{extension_number2}&{extension_group_name3}`.

Any number or name that does not exist on the system is skipped.
