# Switching service definition

The Natural Access Switching service:

- Provides a set of functions for controlling multi-vendor integration protocol (MVIP) switch blocks on MVIP and H.100/H.110 compliant switching devices. The switch block is controlled by the Switching service functions to make or break connections, send patterns, sample data, query, reset, configure, and run diagnostics on different parts of the MVIP switching device.

- Is based on the MVIP-95 and CT bus device driver standards. It can be used to access MVIP-95 and MVIP-90 device drivers.

NMS Communications also offers the Point-to-Point Switching service that provides an application program interface (API) for making switch connections between boards connected by a telephony bus without having to specify the intervening timeslots
. The Point-to-Point Switching service maintains an internal database that records the topology of the switching configuration for the system and the state of all the timeslots. For more information, refer to the Point-to-Point Switching Service Developer's Reference Manual.

You need to understand the following characteristics of the Natural Access Switching service as you prepare to create an application:

- Switch handles

- Terminus

- MVIP-95 switch block model

## Switch handles

Many functions take or return a switch handle
. A switch handle identifies an open MVIP switching device.

To access an MVIP switching device, call swiOpenSwitch to retrieve a switch handle. For more information, refer to Opening a switch handle.

swiCloseSwitch releases a switch handle. For more information, refer to Closing a switch handle.

## Terminus

A terminus is a single access point to a switch block
input or switch block output. Many of the Switching service functions take one or more terminus elements an argument.

A terminus contains a bus, a stream, and a timeslot:

Component | Description
--- | ---
Bus | Specifies the interface point of the switch block. Devices can reside directly on the telephony bus. Devices can also reside on a board's local bus and may require a switch block to access the telephony bus.
Stream | Specifies a grouping of timeslots that usually corresponds to a particular bit-stream of TDM (time-division multiplexed) serial data on an individual track or wire of a bus.
Timeslot | Specifies a particular 64 kbit/second subdivision of a TDM bus stream. Timeslots number from zero (0) to n, where n is stream-dependent.

## MVIP-95 switch block model

The H.100/H.110 bus has 32 data streams. The MVIP-95 switch model was created to accommodate the complete set of streams (0 to 31).

The MVIP-95 switch model is used with H.100/H.110 busses. The MVIP-95 model is based on the premise that a given stream number corresponds to the same physical wire on both sides of the switch block.

As shown in the following illustration, MVIP-95 uses one number for each bus signal, regardless of the side of the switch block. In MVIP-95, bus signals are numbered sequentially starting at 0, allowing for future expansion of the switch capacity without renumbering.

In MVIP-95, local devices are connected to a logical bus called a local bus. The streams they are connected to (either the H bus or the local) are numbered sequentially starting from 0 (zero). Therefore, you must explicitly specify the bus (the H bus or local) when referring to a switch block input or output. MVIP-95 switching commands use a new data structure called a terminus that contains a bus specifier, as well as a stream number and a timeslot number, to refer to a switch block input and output.