# Specifying TPKT endpoint parameters

This topic provides the following information:

- TPKT endpoint parameters

- Session IDs

- Session sequence flags

## TPKT endpoint parameters

msp_TPKT_ENDPOINT_CONFIG parameters specify the following endpoint information:

Name | Allowed values | Description
localSessionID | 0 - 4094 | Local session ID.
localSessionSeq | 0 | 1 | Sequence number for detecting session overlap.
remoteSessionID | 0 - 4094 | Remote session ID.
remoteSessionSeq | 0 | 1 | Sequence number for detecting session overlap.
deliveryMethod | kComplexPacket: complex packets kSimplePacket: simple packets | Session delivery method (simple or complex).
remoteGatewayIP | Valid IP address. This field contains an array of four bytes (0 - 255 each) for specifying the remote gateway IP address. | Destination gateway IP address for the endpoint.
coderType | The following coder types are available: kG723High: G.723.1 6.4 kbit/s kG723Low: G.723.1 5.3 kbit/s kG729: G.729A at 8.0 kbit/s kG711Alaw_64: G.711 A law at 64 kbit/s kG711Mulaw: G.711 mu law at 64 kbit/s kG726_32: G.726 ADPCM at 32 kbit/s | TPKT endpoint vocoder type.

## Session IDs

When the application creates TPKT endpoints, the localSessionID parameter assigns a session identifier to the endpoint. This session ID (an integer in the range of 0 to 4094) remains associated with the endpoint until the application destroys the endpoint. The application uses the remoteSessionID parameter to specify the ID of the session on the remote destination gateway.

Gateways exchange remoteSessionID and remoteSessionSeq information while performing IP call control prior to initiating TPKT sessions. Applications can change TPKT endpoint session IDs by using mspSendCommand and the MSP_CMD_TPKT_CONFIG command. For more information, refer to Sending commands to TPKT endpoints.

## Session sequence flags

The SessionSeq parameters are flags with a value of 0 or 1. Applications use these parameters to detect session overlap. Session overlap occurs when an application disables a TPKT endpoint and then re-enables the endpoint to send data to a different session. Applications use localSessionSeq and remoteSessionSeq parameters to avoid these overlaps.

For example, when the application creates an active connection using a TPKT endpoint, the application can set the TPKT endpoint's localSessionSeq parameter to zero. If the application disables and then re-enables the TPKT endpoint, it can use mspSendCommand to reset the localSessionSeq parameter to 1. The remote TPKT endpoint uses the session sequence flag to discard packets intended for the disabled session. During the transition period when the remote gateway is not yet aware that the session has been disabled, the MSPP service running on the local gateway detects any packets directed to the disabled session and drops them.

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