RTP IPv4 full duplex endpoint filter

Provides an entry and exit point for a duplex voice over IPv4 data stream (data that includes RTP headers within UDP packets) at the data network 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_RTPFDX

Initialization structure

RTPRTCP_ENDPOINT_PARMS

Restrictions

Used in the voice processing connections.

Channel connections

Can connect to full duplex voice channels.

Commands

RTP IPv4 full duplex endpoint filters respond to the following commands:

Command ID

Description

MSP_CMD_RTPFDX_CONFIG

Sends an msp_ENDPOINT_RTPFDX_CONFIG structure that specifies configuration parameters for the endpoint. RTP IPv4 full duplex endpoints must be in a disabled state to receive MSP_CMD_RTPFDX_CONFIG commands.

MSP_CMD_RTPFDX_RTCP_EVENTS

Enables or disables sending RTCP reports (disabled by default) to the application through unsolicited events.

MSP_CMD_RTPFDX_LINK_EVENTS

Enables or disables reporting of link availability transitions through unsolicited events.

MSP_CMD_RTPFDX_CHG_QUOTA

Sets the number of frames to be assembled per packet (default is two frames per packet).

MSP_CMD_RTPFDX_MAP

Assigns a payload ID to a vocoder.

MSP_CMD_RTPFDX_DTMF_EVENTS

Specifies how the endpoint responds to RFC 2833 compliant packets.

A control value specifies how the endpoint responds to inband DTMF packets. Defined control values include:

SEND_NO_EVENTS
No MSPEVN_RFC2833_REPORT 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 is sent upon the arrival of all RFC 2833 compliant packets (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.

MSP_CMD_RTPFDX_SEND_2833

Sends an msp_ENDPOINT_RTPFDX_SEND_2833 structure that initiates a sequence of RFC 2833/4733 packets that correspond to a DTMF digit or other tone.

Intended for use with Native Play when there is no encoder filter.

RTP IPv4 FDX endpoints can receive commands any time after the endpoint is created, with the exception of the  MSP_CMD_RTPFDX_CONFIG command. The RTP FDX endpoint must be disabled to receive MSP_CMD_RTPFDX_CONFIG commands.

When sending MSP_CMD_RTPFDX_CONFIG commands, applications provide a pointer to an msp_ENDPOINT_RTFDX_CONFIG structure. This structure contains all of the parameters used to configure the RTP endpoint when the application created it.

When using the MSP_CMD_RTPFDX_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_RTFDX_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 full duplex endpoint filters respond to the following query any time after the endpoint is created:

Query ID

Description

MSP_QRY_RTPFDX_STATUS

Returns information about the RTP endpoint filter state in an msp_FILTER_RTPFDX_STATUS structure.

Sending an MSP_QRY_RTPFDX_STATUS query returns the following structure:

typedef struct tag_msp_ENDPOINT_RTPFDX_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;
   DWORD        txDrop;
   DWORD        txFail;
   DWORD        txPkts;
   DWORD        txBytes;

   // RTP Assembler Data
   DWORD        frame_quota;
   DWORD        assemble_dtmfFrames;

   // 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_RTPFDX_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 is 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 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.

txDrop

Number of RTP packets that the filter failed to transfer to the data network  interface due to internal error conditions.

txFail

Number of socket send errors that occurred.

txPkts

Number of RTP packets delivered to the socket layer of the CG board's IP stack.

frame_quota

Number of media frames assembled in each payload.

assemble_dtmfframes

Number of outbound inband DTMF frames sent.

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_RFC2833_REPORT when it receives inband DTMF packets.

Unsolicited events

RTP IPv4 full duplex endpoints can return the following unsolicited events:

Event

Description

MSPEVN_2833_SEND_COMPLETE

Indicates that a sequence of packets initiated by the command MSP_CMD_RTPFDX_SEND_2833 is complete.

MSPEVN_RFC2833_REPORT

Indicates that the endpoint received an RFC 2833 compliant packet.

MSPEVN_RTCP_REPORT

Returns session information about an active RTP/RTCP session.

MSPEVN_NOROUTE_AVAILABLE

Indicates that an RTP endpoint lost the ability to route outbound data to its destination.

MSPEVN_ROUTE_AVAILABLE

Indicates that an RTP endpoint formerly incapable of transmitting data is now back in service.

For more information about RTP endpoint unsolicited events or inband DTMF carriage, refer to the Fusion Developer's Manual.

Details

RTP payloads can contain more than one frame of encoded media referred to as compound payloads, or more generically, compound packets. For example, the G.723.1 vocoder produces frames that are 30 ms long. An RTP payload, or compound packet, can contain more than one of these frames. If it contained two, there are 60 ms of encoded information (two 30 ms segments packed sequentially).

Receiving data

Packets that the RTP IPv4 endpoint receives from the IPv4 network can contain a variable number of media frames. The endpoint adapts to the type of payload it receives. The frames in one compound packet may contain data from one type of encoder, while frames in the next compound packet contain data from a different type of encoder. RTP IPv4 endpoints separate frames into packets according to the characteristics of the detected encoder and transfers the frames in the same order in which the frames were assembled.

The RTP IPv4 endpoint timestamps output data for all but the first packet from a compound payload. These timestamps are derived from the timestamp in the compound packet's RTP header. The header timestamp is used for the first frame in the input payload.

The RTP header from the IPv4 network specifies the type of encoding in the payload through the payload_id field. The range of values for this field is static and is defined in the audio/video profile for RTP, RFC 1890 (draft 8). Unless otherwise notified, the filter expects these values for the vocoders Dialogic supports. For example, the static payload type value for G723.1 is 4. If the filter receives a value of 4 in the payload_id field, it assumes the payload encoding is G723.1. Applications can reassign payload_ids at any time.

Applications can assign G723.1 a different payload type value from the dynamic range 96 - 127. When this happens, the application must inform the RTP endpoint of the change (using the MSP_CMD_RTPFDX_MAP command) so that the endpoint accepts data associated with a different payload ID. Any vocoder can be assigned a dynamic payload type. If the RTP IPv4 endpoint receives compound packets (that is, packets with multiple frames per packet), the jitter filter depth must be set to a value greater than or equal to the number of frames per packet.

Sending data

The frame_quota parameter specifies the maximum number of media frames the endpoint includes in each payload. This quota should be set to the maximum number of frames that the encoding algorithm allows per payload. Applications can use the MSP_CMD_RTPFDX_CHG_QUOTA filter command to configure the RTP endpoint's frame quota.

The RTP endpoint transfers sequences of packets containing a media header and profile, and a payload containing one or more media frames. The header represents the first frame in the payload.

The following illustration shows an RTP IPv4 full duplex endpoint filter:

See also

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