Dialogic Voice Cards - About the TOS/DSCP Class of Service field in NaturalAccess RTP

Dialogic Voice Cards - About the TOS/DSCP Class of Service field in NaturalAccess RTP

Information

Dialogic NaturalAccess Software is use to create development and runtime environment for creating voice, fxs, conferencing and video application using the Dialogic CG Series Media Boards.

Overview

The Dialogic NaturalAccess™ Media Stream Protocol Processing (MSPP) API provides support for the TOS and DSCP Class of Service field in an IPv4 header.

The TOS field was the original class of service field defined for IPv4 packets in RFC 791. It defines 7 levels of precedence (3 bits) in an 8-bit field in the IP header. The TOS  uses the most significant 3 bits of the 8-bit field.  For example, the value 0xA0 represents TOS level 5, as the most significant 3 bits (101) are the value 5.

The DSCP  field is a newer specification (defined in RFC 2475 and RFC 2476) that uses the same 8-bit field used by TOS  in the IP header. The DSCP  defines 63 levels of precedence (6 bits). DSCP  is backwards compatible with TOS  so that the most significant 3 bits are used for precedence, while the next 3 bits are used for finer granularity. An incoming packet using the older TOS standard will still be routed with the correct precedence.

The  NaturalAccess MSPP API contains a TypeOfService field used when defining an IPv4 endpoint for use with RTP: 

typedef struct tag_RTPRTCP_ENDPOINT_PARMS {   DWORD size; BYTE TypeOfService; DWORD startRtcp; RTCP_SESSION_PARMS rtcpParms; DWORD RtpTsFreq; DWORD Session_bw; DWORD dtmf_event_control; DWORD frameQuota; DWORD linkEvents; RTP_ PAYLOAD_MAP PayloadMap;   } RTPRTCP_ENDPOINT_PARMS;

 

The TypeOfService field must be set to the correct 8-bit value used in the IP header. If a IP precedence level of 5 is desired, then the most significant 3 bits should be set to 5, while the remaining bits are left as zeroes. For example, for IP precedence level 5:

RTPRTCP_ENDPOINTPARMS.TypeOfService = 0xA0    /* sets IP precedence level 5 */

 

By default, the TypeOfService field is set to zero.

If DSCP is desired, then the correct 8-bit TypeOfService setting should be used when defining the IPv4 endpoint.

Glossary of Acronyms / Terms

MSPP - Media Stream Protocol Processing
TOS - Type of Services, defined in RFC 791
DSCP - Differentiated Services Code Point, defined in RFC 2474 and 2475