# Tielines

> Create Relations and Routing Rules so routes can cross between routers, then preview paths, take cross-router routes and release occupied Relations.

The Tieline system makes multiple individual routers behave like one larger router. An operator can request that a source on Router A reaches a destination on Router B without needing to know how the routers are connected or which intermediate routes are required.

Behind that request, the signal cannot jump directly between the routing matrices. The physical connection normally runs from a destination port on the first router to a source port on the next router. Completing the end-to-end route therefore requires a route on the first router, an available connection between the routers, and another route on the next router.

Buttons hides this complexity from the operator. It models the inter-router connections as **Relations**, limits their permitted use with **Routing Rules**, finds an allowed path, and reserves the shared connections used by that path.

Tielines are shared routing resources. A cross-router route is retained as a Route Request so Buttons can continue to account for the Relations it occupies. **Projects** group those retained routes so they can be found and released when a production is finished.

## How the parts fit together

A Tieline route uses these product concepts:

- A **routing domain** is the set of ports that can route locally. In most installations, this is one router.
- A **Relation** tells Buttons about the physical connection from a destination port on one router to a source port on another.
- A **Routing Rule** identifies the edge sources, edge destinations, and Relations that may form a Tieline path.
- A **Route Request** retains the selected cross-router route and its path through the Relations.
- A **Project** groups retained routes for a production, event, room booking, or other period of use.

For example, a route from `Replay A` on Router A to `PCR 2 Multiview` on Router B may resolve as:

```
Replay A source
→ Router A Tieline Out destination
→ Relation
→ Router B Tieline In source
→ PCR 2 Multiview destination
```

The operator selects only `Replay A → PCR 2 Multiview`. Buttons uses the Relation to understand that the two routers are connected, then plans and executes the route required on each router.

### Tielines with NMOS

An NMOS network works the same way: it's a routing domain of its own, with senders as its sources and receivers as its destinations. Create Relations where the NMOS network and a router meet, for example a router output that feeds an IP gateway's input, and a Tieline path can cross between them. The operator still picks only the edge source and destination, and Buttons routes the router and takes the NMOS connection as needed. See [Understand NMOS in Buttons](/docs/buttons/v1.10/nmos/concepts).

## Before you begin

Identify:

- The routers the route must cross.
- The physical transit connection between each pair of routers.
- The destination port that feeds each physical connection.
- The source port that receives from each physical connection.
- The edge sources and destinations allowed to use those connections.
- How routes should be grouped and released through Projects.

Confirm the physical signal direction before creating Relations. Reversing the endpoints models a different path.

<callout color="yellow" title="Warning">
  Taking or releasing a Tieline route can change several router destinations. Become familiar with the path and release behavior before deploying it in production.
</callout>

## Create Relations between routers

A Relation represents the physical connection from a destination port on one router to a source port on another. It tells Buttons where a signal can cross between routers; it does not execute a route when it is created.

1. Open **Routing → Relations**.
2. Select **Create Relation**.
3. Enter a **Relation Label** that identifies both sides of the connection.
4. On the **Destinations** side, select the port that feeds the physical transit connection.
5. On the **Sources** side, select the port that receives the signal from that connection.
6. Under **Port wiring**, select **Auto-connect** to map the matching essences between the staged destination and source, or draw the edges by hand. **Create** stays disabled until at least one mapping exists. Check the summary line (for example "1 relation (video)") and the **Signal integrity** Buttons suggests before continuing.
7. Leave **Use for tielines** on unless this Relation should carry port metadata without being eligible for Tieline routing: see below.
8. Review the staged pair.
9. Select **Create**.

To create several Relations in one operation, select several destinations and the same number of sources (Cmd-click or Ctrl-click to add to the selection), then select **Auto-connect**. Buttons pairs them in the order you selected them, not the order of the list, and warns when the two counts differ. Each pair becomes its own Relation, and Buttons adds the essence and pair number to the label, for example `Router A to B (video · pair 1)`.

Repeat this for every independent physical transit path. Parallel cables or channels should be separate Relations because each can be occupied independently.

### Exclude a Relation from Tieline routing

Every Relation has its own **Use for tielines** setting, on by default. A Relation with it turned off is ignored by Tieline path selection and hidden from the Tieline graphs: useful for a Relation that exists to carry port/essence metadata for other purposes without being a candidate route Buttons should ever pick. The **Relations** list shows this as a **Tielines** column (**Yes**/**No**), and it can be changed later from the Relation's own edit dialog.

<callout color="yellow" title="Warning">
  Buttons uses any allowed Relation when it needs a path. Once the free ones are in use, it can pick a Relation whose source carries something live, such as a mixer's M/E program output, and routing through it changes what's on air. To keep a live source from being borrowed, turn off **Use for tielines** on its Relation, or leave that Relation out of your Routing Rules.
</callout>

### Inspect Relations

The **Relations** page shows:

- **From** and **To** transit endpoints.
- Whether the Relation is enabled.
- The **Active Signal** currently reported at the transit input.
- The retained **Route Request** using the Relation, or **Available** when none is assigned.
- A **Capacity Overview** of the configured Relations.

A Relation can carry the same upstream source to more than one downstream destination while that source remains on the transit path. A competing source needs another allowed Relation or must wait until the occupied path is released.

Disabling a Relation prevents it from being selected for a new path. It does not describe or repair the physical connection itself.

## Create a Routing Rule

A Relation is not automatically available to every route. At least one Routing Rule must associate permitted edge ports with the Relations they may use.

1. Open **Routing → Routing Rules**.
2. Select **Create Rule**.
3. Enter a **Label**, such as `Router A replay to Router B PCR`.
4. Open the new rule.
5. Add the edge **Source Ports** allowed to originate routes.
6. Add the edge **Destination Ports** allowed to receive those routes.
7. Add the **Relations** that may carry them: only Relations with **Use for tielines** on are offered here.
8. Leave **Enabled** on.
9. Add a **Description** when the operational boundary is not clear from the label.
10. Save the rule.

A Relation can appear in several rules. Buttons considers a Relation allowed for a source-to-destination route only when an enabled rule contains that source, destination, and Relation.

### Keep transit endpoints out of manual routing

Routing Rules provide two separate controls for their Relation endpoints:

- **Hide ports** removes the endpoints from manual routing interfaces while keeping them available to Tieline planning.
- **Protect ports** rejects direct route requests to those endpoints so they can only be changed as part of a Tieline path.

Both are on when a rule is created. **Hide ports** works per port: if a transit bundle carries other essences that the Relation doesn't use, those stay visible. Turning a rule off also stops it hiding and protecting its ports.

We recommend keeping these on all the time, so operators work with the edge source and destination rather than the intermediate transit ports. Leaving transit ports visible and unprotected invites direct routes that can break a Tieline path.

## Understand path selection

When a route is staged, Buttons builds a routing graph from the configured routing domains (normally the routers) along with enabled Relations, enabled Routing Rules, retained Route Requests, and current reservations.

Buttons then:

1. Checks whether the source and destination can route locally on the same router or routing domain.
2. If they are not, finds an allowed path through the configured Relations.
3. Excludes Relations that are unavailable, disallowed by the applicable rule, occupied by a competing source, or temporarily reserved by another routing operation.
4. Reuses an occupied Relation when the retained path already carries the same source and the remaining path is valid.
5. Produces the intermediate physical route requests required for the selected path.
6. Retains the cross-router Route Request so later planning can account for the occupied Relations.

Buttons searches for an eligible short path through the graph. Do not rely on one particular parallel Relation being chosen unless the Routing Rules restrict the available choice accordingly.

## Preview and take a Tieline route

1. Open **Routing → Route**.
2. Select the edge source and destination.
3. Select **Paths**.
4. Review the source, destination, and intermediate path shown for the staged route.
5. If **Paths** and **Take** stay disabled, Buttons found no allowed path. Review the Relation, Routing Rule, endpoint availability, and current Route Requests.
6. Select a Project when one should own the retained route.
7. Select **Take**.
8. Review the routing report and the resulting route state.

A route that stays within one routing domain (normally one router) does not claim a Relation. A cross-router route creates or updates a retained Route Request and may occupy one or more Relations.

## Use Projects for housekeeping

Projects give retained routes an operational owner and make it possible to release a production's routes together.

<callout color="green" title="Tip">
  Assign Tieline routes to Projects so technical staff can find and release all routes held for a production in one place.
</callout>

1. Create or identify the production's Project.
2. Stage the Tieline route in **Routing → Route**.
3. Review **Paths**.
4. Select the Project before selecting **Take**.
5. When the production finishes, inspect the Project and release the routes it holds.

An administrator can turn on **Require project for tielines** to reject Tieline routes that do not have a Project. See [Group and release routes with Projects](/docs/buttons/v1.10/routing/projects) for creation, assignment, release, expiry, and archival guidance.

## Inspect occupancy and retained routes

Use **Routing → Relations** for a transit-resource view:

- **Available** means no retained Route Request currently uses the Relation.
- A Route Request tag identifies the retained route using it.
- **Active Signal** shows the currently reported source at the Relation endpoint.

Use **Routing → Projects** for a production view. It shows which retained routes belong together and whether they still need release.

Use **Paths** in **Routing → Route** for a proposed-route view. It shows how the currently staged route is expected to cross the configured Relations.

These views answer different questions. An active signal on a transit port does not by itself identify which Project owns the retained route; inspect the Route Request or Project for that context.

### Show free Relations on a button

Two internal feedbacks show Relation occupancy on a button, so an operator can see before a take whether a path is still free:

| Feedback | What it gives |
| --- | --- |
| **Tieline Relation Available** | On while the Relation you pick is available, off while a route uses it. Use it to colour a button. |
| **Tieline Available Relation Count** | How many of the Relations under **Wires** are available, or of every Relation with **All**. |

To show the count, add **Tieline Available Relation Count** as a Feedback variable on the button's **Variables** tab and put the variable in the button's text, see [Show a live value from the device](/docs/buttons/v1.10/positions/button-feedback#show-a-live-value-from-the-device). From Buttons 1.8.11 the variable holds the number, for example `17`.

<callout color="gray" title="Note">
  Before 1.8.11 this variable held `true` or `false` (any Relation free or none). An expression written for that, such as `$(self.state.tlcount) == true`, no longer matches. Compare with a number instead: `$(self.state.tlcount) > 0`.
</callout>

## Release Tieline routes

Releasing a Tieline route routes **None** to each destination in its path, on every router it crosses. Set a **None / black / silent source** on each of those router connections first. Without one, that leg of the release fails with "The destination does not have any available none (black/silence) sources to choose", and the Route Request stays.

To release one route, open **Routing → Requests**, select it, and select **Release**.

### Release a Relation manually

If technical staff need to clear every retained route using a specific Relation:

1. Open **Routing → Relations**.
2. Right-click the Relation.
3. Select **Release Route Requests**.
4. Confirm the release.
5. Review the routing report if any route could not be released.

This acts on all retained Route Requests using the selected Relation. Prefer releasing through a Project when the goal is to clean up one production, because a Relation may be shared by routes with different operational owners.

## If no valid path is found

Check the model in this order:

1. Confirm that the source and destination ports exist and are available.
2. Confirm each Relation's destination-to-source direction and **Enabled** state.
3. Confirm an enabled Routing Rule contains the edge source, edge destination, and required Relations.
4. Inspect **Paths** for the first missing or blocked segment.
5. Inspect **Relations** for retained Route Requests from competing sources.
6. Confirm a Project is selected when **Require project for tielines** is enabled.
7. Confirm the physical transit connection and all routing devices remain controllable.

A route can have no valid path even when both edge endpoints are healthy. The missing part may be topology, policy, occupancy, Project context, or the physical transit connection.

## Where to go next

- [Group and release routes with Projects](/docs/buttons/v1.10/routing/projects).
