# RTP IPv4 simplex receive endpoint filter

Provides an entry point for a simplex voice over IPv4 data stream (data that includes RTP headers within UDP packets) received from the IP interface. For information about RTP IPv4 endpoint parameters, refer to RTP IPv4 endpoint address structure and RTP IPv4 endpoint parameter structure.

#### Filter ID

MSP_ENDPOINT_RTPIN

#### Initialization structure

RTPRTCP_ENDPOINT_PARMS

#### Restrictions

Used in the voice processing connections.

#### Channel connections

Can connect to simplex voice decode channels.

#### Commands

RTP IPv4 simplex receive endpoint filters respond to the following commands:

Command ID | Description
MSP_CMD_RTPIN_CONFIG | Sends an msp_ENDPOINT_RTPIN_CONFIG structure that specifies configuration parameters for the endpoint. RTP IPv4 simplex receive endpoints must be in a disabled state to receive MSP_CMD_RTPIN_CONFIG commands.
MSP_CMD_RTPIN_RTCP_EVENTS | Enables or disables sending of RTCP reports to the application through unsolicited events.
MSP_CMD_RTPIN_MAP | Assigns a payload ID to a vocoder.
MSP_CMD_RTPIN_DTMF_EVENTS | Specifies how the endpoint responds to inband DTMF carriage packets. A control value specifies how the endpoint responds to inband DTMF packets. Defined control values include: SEND_NO_EVENTS No MSPEVN_RFC2833_event is sent upon the arrival of an RFC 2833 compliant packet. SEND_FIRST_EVENT MSPEVN_RFC2833_REPORT is sent upon the arrival of the first RFC 2833 compliant packet for a given DTMF digit. SEND_LAST_EVENT MSPEVN_RFC2833_REPORT is sent upon the arrival of the last RFC 2833 compliant packet for a given DTMF digit. SEND_ALL_EVENTS MSPEVN_RFC2833_REPORT event is sent upon the arrival of all RFC 2833 compliant packets (this is limited by the decimation value). A decimation value specifies how many RFC 2833 compliant packets the filter should receive for a particular tone before sending another event. By default SEND_FIRST_EVENT and SEND_LAST_EVENT are enabled.

RTP IPv4 receive endpoints can receive commands any time after the endpoint is created except for the MSP_CMD_RTPIN_CONFIG command. The RTP receive endpoint must be disabled to receive MSP_CMD_RTPIN_CONFIG commands.

When sending MSP_CMD_RTPIN_CONFIG commands, applications provide a pointer to an msp_ENDPOINT_RTPIN_CONFIG structure. This structure contains all of the parameters used to configure the RTP endpoint when the application created it (parameters that do not apply to the specific endpoint type, for example assembler parameters for a simplex receive endpoints, are ignored by the MSPP service).

When using the MSP_CMD_RTPIN_CONFIG command, applications can specify a value of 0xFFFF for 16-bit parameters or 0xFFFFFFFF for 32-bit parameters (or -1 in decimal format) to retain the existing settings for any endpoint parameters. Otherwise the MSPP service expects a new value for every parameter in the msp_ENDPOINT_RTIN_CONFIG structure.

For a list of command IDs and their associated structures, refer to the mspcmd.h or mspinit.h header files.

#### Queries

RTP IPv4 simplex receive endpoint filters respond to the following query:

Query ID | Description
MSP_QRY_RTPIN_STATUS | Returns information about the RTP endpoint filter state in an msp_FILTER_RTPIN_STATUS structure.

MSP_QRY_RTPIN_STATUS queries return the following structure:

typedef struct tag_msp_ENDPOINT_RTPIN_STATUS {
// RTP Data
DWORD FilterId;
DWORD ipFilterState;
IPADDRESS localIPAddr;
DWORD localPort;
IPADDRESS remoteIPAddr;
DWORD remotePort;
DWORD rtcpEvents;
DWORD linkEvents;
// RTP Stats
DWORD rxDrop;
DWORD rxPkts;
DWORD rxBytes;
// RTP Disassembler Data
DWORD last_pid_rcvd;
DWORD mismatches;
DWORD last_map_vocoder;
DWORD last_map_pid;
DWORD disassemble_dtmfFrames;
DWORD dtmf_event_control;
} msp_ENDPOINT_RTPIN_STATUS;

The returned query structure provides the following information:

Field | Description
Filterid | Reserved.
ipFilterState | Indicates the current state of the filter and the socket state with the CG board IPv4 stack: Created (0x00) The filter is created. Configured (0x01) The filter has been configured with its IP and RTP parameters. Starting (0x02) The filter is enabled and is in the process of opening a socket with the CG board IPv4 stack. Active (0x03) The filter has an open socket and is processing RTP data. Stopping (0x04) The filter is disabled and is in the process of closing its socket with the CG board IPv4 stack. Stop/Destroy (0x05) The filter received a destroy indication and is closing its socket with the CG board IPv4 stack prior to destroying itself. Destroying (0x06) The filter is cleaning up any associated on-board resources before destroying itself.
localIPAddr | Local IPv4 address of the Ethernet interface on which the RTP session runs.
localPort | Local UDP port number associated with the RTP session.
remoteIPAddr | Remote IPv4 address associated with the RTP session's destination.
remotePort | Remote UDP port number associated with the RTP session's destination.
rtcpEvents | Indicates whether or not the endpoint is configured to generate RTCP report events.
linkEvents | Indicates whether or not the endpoint is configured to generate route availability events.
rxDrop | Number of RTP/IP packets dropped by the filter when not in an active state.
rxPkts | Number of valid RTP packets received by this filter.
rxBytes | Number of bytes received by this filter. Includes header bytes as well as data bytes.
last_pid_rcvd | The last RTP payload type (identifier) received.
mismatches | The number of received RTP payload types that were not matched to any supported vocoder.
last_map_vocoder | The Dialogic vocoder used in the last map command. Refer to Vocoder filter attributes for a description of the possible values.
last_map_pid | The payload type (identifier) used in the last map command.
disassemble_dtmfFrames | Number of inbound inband DTMF frames received.
dtmf_event_control | Indicates whether or not the endpoint is configured to generate MSPEVN_RTCP_REPORT events when it receives inband DTMF packets.

#### Unsolicited events

The RTP IPv4 simplex receive endpoints generate the following unsolicited events when the DtmfMode parameter is set:

Event | Description
MSPEVN_RTCP_REPORT | When the endpoint is configured to return RTCP information, these events return RFC 1889 compliant RTCP report information.
MSPEVN_RFC2833_REPORT | When the endpoint is configured (during initialization or with the MSP_CMD_RTPIN_DTMF_EVENTS command) to detect inband DTMF packets, these events return information about the tone information received in a DTMF packet.

RTP simplex receive endpoint filters can generate unsolicited MSPEVN_RTCP_REPORT events when they are configured (during creation) to return RTCP information. For more information about these events, refer to MSPP unsolicited events.

#### Details

For more information about receiving information from a packet network through RTP simplex receive endpoints, refer to the RTP IPv4 full duplex endpoint filter.

The following illustration shows an RTP IPv4 simplex receive endpoint filter:

#### See Also

DS0 full duplex endpoint filter, Jitter, RTP switching channel filter, Voice decoder channel filter