# RTP IPv6 full duplex endpoint filter

Provides entry and exit points for duplex voice over IPv6 data (data that includes RTP headers within UDP packets) at the IP interface. For information about RTP IPv6 endpoint parameters, refer to RTP IPv6 endpoint address structure and RTP IPv6 endpoint parameter structure.

#### Filter ID

MSP_ENDPOINT_RTPFDX_V6

#### Initialization structure

RTPRTCP_V6_ENDPOINT_PARMS

#### Restrictions

Used in the voice processing connections.

#### Channel connections

Can connect to full duplex voice channels.

#### Commands

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

Command ID | Description
MSP_CMD_RTPFDX_V6_CONFIG | Sends an msp_ENDPOINT_RTPFDX_V6_CONFIG structure that specifies configuration parameters for the endpoint. RTP IPv6 full duplex endpoints must be in a disabled state to receive MSP_CMD_RTPFDX_V6_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 (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 IPv6 FDX endpoints can receive commands any time after the endpoint is created with the exception of MSP_CMD_RTPFDX_V6_CONFIG commands. The RTP IPv6 FDX endpoint must be disabled to receive MSP_CMD_RTPFDX_V6_CONFIG commands.

When sending MSP_CMD_RTPFDX_V6_CONFIG commands, applications provide a pointer to an msp_ENDPOINT_RTPFDX_V6_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_V6_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 API expects a new value for every parameter in the msp_ENDPOINT_RTPFDX_V6_CONFIG structure.

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

#### Queries

RTP IPv6 full duplex endpoint filters respond to the following query any time after the endpoint is created:

Query ID | Description
MSP_QRY_RTPFDX_V6_STATUS | Returns information about the RTP IPv6 FDX endpoint filter state in an msp_FILTER_RTPFDX_V6_STATUS structure.

Sending an MSP_QRY_RTPFDX_V6_STATUS query returns the following structure:

typedef struct tag_msp_ENDPOINT_RTPFDX_V6_STATUS {
// RTP Data
DWORD FilterId;
DWORD ipFilterState;
IPV6ADDR localIPv6Addr;
DWORD localPort;
IPV6ADDR remoteIPv6Addr;
DWORD remotePort;
DWORD rtcpEvents;
DWORD linkEvents;
DWORD trafficClass;
DWORD flowLabel;
DWORD linkNum;
// 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_V6_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 IPv6 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 IPv6 stack. Active (0x03) The filter has an open socket and is processing RTP data. Stopping (0x04) The filter has been disabled and is in the process of closing its socket with the CG board IPv6 stack. Stop/Destroy (0x05) The filter received a destroy indication and is closing its socket with the CG board IPv6 stack prior to destroying itself. Destroying (0x06) The filter is cleaning up any associated on-board resources before destroying itself.
localIPv6Addr | Local IPv6 address (in binary form) of the Ethernet interface on which the RTP session runs.
localPort | Local UDP port number associated with the RTP session.
remoteIPv6Addr | Remote IPv6 address (in binary form) associated with the RTP session's destination.
remotePort | Remote UDP port number associated with the RTP session's destination.
trafficClass | Class or priority of the IPv6 packet.
flowLabel | Specific sequence to which the IPv6 packet belongs.
linkNum | Ethernet interface number (1 or 2).
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 were dropped 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 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 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 events when it receives inband DTMF packets.

#### Unsolicited events

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

Event | Description
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 IPv6 endpoint lost the ability to route outbound data to its destination.
MSPEVN_ROUTE_AVAILABLE | Indicates that an RTP IPv6 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 Dialogic® NaturalAccess™ Fusion VoIP API 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. If it contained two, there are 60 ms of encoded information (two 30 ms segments packed sequentially).

Receiving data

Packets that the RTP IPv6 endpoint receives from the IP 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 can contain data from one type of encoder, while frames in the next compound packet contain data from a different type of encoder. RTP IPv6 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 IPv6 endpoint timestamps transfer 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 IP 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. However, applications can reassign payload_ids at any time.

You can assign G723.1 a different payload type value from the dynamic range 96 - 127. In this case, the RTP IPv6 endpoint must be informed of the change (through a MSP_CMD_RTPFDX_MAP command) so that it can accept data with a different payload ID. Any vocoder can be assigned a dynamic payload type. If the RTP IPv6 endpoint receives compound packets (that is, packets containing multiple frames per packet), the jitter filter depth value must be 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 IPv6 full duplex endpoint filter:

#### See also

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