Codec Policy Definition

Codec policies describe how to manipulate SDP messages as they cross the Oracle Communications Session Border Controller. The Oracle Communications Session Border Controller bases its decision to transcode a call on codec policy configuration and the SDP. Each codec policy specifies a set of rules to be used for determining what codecs are retained, removed, and how they are ordered within SDP.

Syntax

The following parameters are used to create a codec policy. Their syntax is described inline.

allow-codecs

allow-codecs—The allow-codecs parameter configures the codecs that are allowed and/or removed from the SDP. A blank list allows nothing, * allows all codecs, none removes all codecs, the :no designation blocks the specific codec or class of media, and the :force designation is used to remove all non-forced codecs.

The allow-codecs parameter is configured in the following way:

  • <codec>:no—blocks the specific codec
  • *—allow all codecs.
  • <codec>:force—If any forced codec is present in an SDP offer, all non-forced codecs are stripped from the m- line.
  • audio:no—audio m= line is disabled
  • video:no—video m= line is disabled

For example, if you configure PCMU in the allow-codecs parameter, the PCMU codec, received in an SDP message is allowed on to the next step of transcoding processing, and all other codecs are removed.

The order of precedence is for removing codecs according to codec policy is:

  1. <codec>:no—Overrides all other allow-codecs parameter actions.
  2. audio:no / video:no. An allow-codecs line like “allow-codecs PCMU audio:no” disables the PCMU m= line because audio:no has a higher precedence than the specific codec.
  3. <codec>:force
  4. <codec> Specific codec name and those codecs configured in the add-codecs-on-egress list.
  5. * has the lowest precedence of all flags. For example "allow-codecs * PCMU:no" allows all codecs except PCMU.

order-codecs

order-codecs—The order-codecs parameter is used to re-order the codecs in the m= line as the SDP is passed on to the next step. This parameter overwrites the order modified by the add-codecs-on-egress command, when relevant. The following is valid syntax for this parameter:

  • <blank>—Do not re-order codecs
  • *—You can add a <codec> before or after the * which means to place all unnamed codecs before or after (the position of the *) the named codec. For example:
  • <codec> *—Puts the named codec at the front of the codec list.
  • * <codec>—Puts the named codec at the end of the codec list.
  • <codec1 > * <codec2>—Puts <codec1> first, <codec2> last, and all other unspecified codecs in between them.
  • <codec>—When the * is not specified, it is assumed to be at the end.

Any codec name is allowed in the order-codecs parameter, even those not defined or not transcodable. An * tells the order-codecs parameter where to place unspecified codecs with respect to the named codecs. Refer to the examples below.

  • <blank>—do not reorder m= line
  • PCMU *—Place PCMU codec first, all others follow
  • * PCMU—Place PCMU codec last, all others proceed PCMU
  • G729 * PCMU—Place G729 codec first, PCMU codec last, all others remain in between
  • PCMU—If * is not specified, it is assumed to be at the (PCMU *).

Add on Egress

add-codecs-on-egress—This parameter adds a codec to the SDP’s m= line only when the codec policy is referenced from an egress realm (except in one 2833 scenario). Codecs entered for this parameter are added to the front of the m= line. Signaling codecs are added to the end of the m= line.

Transcoding can only occur if this parameter is configured. There is a special case for 2833 support where the add-codecs-on-egress parameter is configured for an ingress realm. See RFC 2833 Scenario 2 for details.

Packetization Time

packetization-time—This parameter specifies a media packetization time in ms to use within the realm referencing this codec policy. Packetization time You must also enable the force ptime parameter to enable transrating in conjunction with configuring the packetization time. See the Transrating section for more information.