# MSPP API

The MSPP API provides functions for building unified voice and fax gateway applications by creating, connecting, configuring, and destroying media endpoints and channels. Applications can create, connect, and enable duplex or simplex media connections by managing objects called endpoints and channels. Endpoints provide nodes for sending and receiving network data. Channels provide a mechanism for converting and transferring data as it flows from one endpoint to another. Use the MSPP API in combination with other Natural Access APIs, such as the NaturalCallControl (NCC) and ADI
APIs, to provide an interface for PSTN call control and IVR.

The MSPP API does not perform call control at either the PSTN or packet network interfaces. Applications must perform call control independently by using functions from the NCC API for PSTN-side call control and a third party call control stack (such as SIP) for IP-side call control. For more information about using the NaturalCallControl API, refer to the Dialogic® NaturalAccess™ NaturalCallControl™ API Developer’s Manual.

This topic provides information about the following:

- MSPP API programming objects

- MSPP API connections

- Initiating MSPP media connections

For more information, refer to the Dialogic® NaturalAccess™ Media Stream Protocol Processing API Developer's Manual.

## MSPP API programming objects

Applications use the MSPP API to create and control the following components:

Term | Description
endpoint | An entry and/or exit point for data that streams through the gateway through an MSPP channel. For example, a DS0 endpoint provides the terminus through which PCM data travels to and from a PSTN network. An RTP endpoint provides a node through which packet data (framed in RTP format) travels to and from an IP network.
channel | A linked set of functions that transform a real-time flow of voice or fax data from one form to another. The flow of data can either be two-way (duplex) or one-way (simplex). For example, a G.711 full-duplex channel provides all the necessary processing for G.711 data to flow between a PSTN network and an IP network.
connection | A direct coupling between MSPP endpoints and a channel that transfers and processes voice or fax data. When the connection is enabled, data flows between the endpoints.

For example, an application can create a typical Fusion MSPP connection by joining a DS0 endpoint at the PSTN interface, and an RTP endpoint (IPv4
or IPv6
) at the IP network interface, by means of a full duplex G.711 voice channel. Because the channel is full duplex, it performs G.711 encoding or decoding depending on the direction the data is moving in. When the connection is enabled, it forms an active, full duplex voice path across the gateway from network to network.

## MSPP API connections

Fusion allows applications to create several different kinds of channels. The following illustration shows the components that make up a typical MSPP voice connection. In this case, the connection is used for transferring and processing voice data between a PSTN and IP network:

Applications can also use RTP
switching channels to route voice data to more than one RTP endpoint. This mechanism allows applications to monitor the voice data transferred across a particular voice channel. The following illustration shows the components used to connect voice data between two RTP endpoints. For more information about how to implement RTP switching, refer to RTP forking and RTP switching. Because MSPP switch channels are always simplex (whereas voice channels can be simplex or duplex), applications must connect two switch channels to enable a full duplex switch connection between two duplex RTP endpoints. The following illustration shows a pair of RTP switching channels used to transfer a duplex audio stream:

## Initiating MSPP media connections

Applications create media channels across the Fusion gateway in the following way:

- Creating MSPP endpoints and MSPP channels. Applications create endpoints and channels independently and in any sequence.

- Connecting a pair of MSPP endpoints with a channel to form an MSPP connection.

- Enabling the channel so that data begins to flow through the media connection.

The application performs PSTN and IP call control independently at the PSTN and IP interface. For PSTN call control the application can use the NCC service. For more information about PSTN call control, refer to Receiving inbound calls and Placing outbound calls. At the IP interface, the application can use a third-party multimedia protocol stack such as H.323 and MGCP to control calls.