Codec Reordering

Certain carriers deploy voice services where their peering partners do not use the carriers’ preferred codecs. The Oracle® Enterprise Session Border Controller can now reorder the codecs so that the preferred one is selected first.

Take the example of a carrier that deploys a voice service using G.729 rather than G.711. If that carrier has a peering partner providing call origination for the VoIP customers with G.711 used as the preferred codec, there can be issues with codec selection.

The Oracle® Enterprise Session Border Controller resolves this issue by offering its codec reordering feature. Enabled for realms and session agents, this feature gives the Oracle® Enterprise Session Border Controller the ability to reorder the default codec in an SDP offer to the preferred codec before it forwards the offer to the target endpoint. When you enable this feature, you increase the probability that the target endpoint will choose the preferred codec for its SDP answer, thereby avoiding use of the undesired codec.

You enable codec reordering feature by setting the preferred-codec=X (where X is the preferred codec) option in the realm and session agent configurations. You set it in the realm from which the Oracle® Enterprise Session Border Controller receives SDP offers (in requests or responses), and for which the media format list needs to be reordered by the Oracle® Enterprise Session Border Controller prior to being forwarded. To configure additional codec ordering support for cases when a response or request with an SDP offer is from a session agent, you can set this option in the session agent configuration.

If you enable the option, the Oracle® Enterprise Session Border Controller examines each SDP media description before if forwards an SDP offer. And if necessary, it performs reordering of the media format list to designate that the preferred codec as the default.

The Oracle® Enterprise Session Border Controller determines preferred codecs in the following ways:

  • If the response or request with an SDP offer is from a session agent, the Oracle® Enterprise Session Border Controller determines the preferred codec by referring to the session agent configuration. You set the preferred codec for a session agent by configuring it with the preferred-codec=X option.
  • If the response or request with an SDP offer is not from a session agent or is from a session agent that does not have the preferred-codec=X option configured, the Oracle® Enterprise Session Border Controller determines the preferred codec by referring to the preferred-codec=X option in the realm.
  • If the Oracle® Enterprise Session Border Controller cannot determine a preferred codec, it does not perform codec reordering.
The way that the Oracle® Enterprise Session Border Controller performs codec reordering is to search for the preferred codec in the SDP offer’s media description (m=) line, and designate it as the default codec (if it is not the default already). After it marks the preferred codec as the default, the Oracle® Enterprise Session Border Controller does not perform any operation on the remaining codecs in the media format list.

Note:

that the Oracle® Enterprise Session Border Controller performs codec reordering on the media format list only. If the rtpmap attribute of the preferred codec is present, the Oracle® Enterprise Session Border Controller does not reorder it.

Preferred Codec Precedence

When you configure preferred codecs in session agents or realms, be aware that the codec you set for a session agent takes precedence over one you set for a realm. This means that if you set preferred codecs in both configurations, the one you set for the session agent will be used.

In the case where the Oracle® Enterprise Session Border Controller does not find the session agent’s preferred codec in the SDP offer’s media format list, then it does not perform codec reordering even if the media format list contains the realm’s preferred codec.

Codec Reordering Configuration

When you configure codec ordering, the codec you set in either the session agent or realm configuration must match the name of a media profile configuration. If your configuration does not use media profiles, then the name of the preferred codec that you set must be one of the following:

  • PCMU
  • G726-32
  • G723
  • PCMA
  • G722
  • G728
  • G729

    Note:

    If you configure this feature for a session agent, you must configure it for the associated realm as well. Otherwise, the feature will not work correctly.

Setting a Preferred Codec for a Realm

To set a preferred codec for a realm configuration:

These instructions assume that you want to add this feature to a realm that has already been configured.

  1. In Superuser mode, type configure terminal and press Enter.
    ORACLE# configure terminal
  2. Type media-manager and press Enter.
    ORACLE(configure)# media-manager
    ORACLE(media-manager)#
  3. Type realm-config and press Enter. The system prompt changes to let you know that you can begin configuring individual parameters.
    ORACLE(media-manager)# realm-config
    ORACLE(realm-config)#
  4. Select the realm where you want to apply this feature.
    ORACLE(realm-config)# select
    identifier:
    1: public     media2:0         0.0.0.0
    2: private    media1:0         0.0.0.0
    selection:1
    ORACLE(realm-config)#
  5. options—Set the options parameter by typing options, a Space, the option name preceded by a plus sign (+) (preferred-codec=X), and then press Enter. X is the codec that you want to set as the preferred codec.
    ORACLE(realm-config)# options +preferred-codec=PCMU

    If you type options preferred-codec=X, you will overwrite any previously configured options. In order to append the new option to the realm-config’s options list, you must prepend the new option with a plus sign as shown in the previous example.

  6. Save and activate your configuration.

Setting a Preferred Codec for a Session Agent

To set a preferred codec for a session agent configuration:

These instructions assume that you want to add this feature to a session agent that has already been configured.

  1. In Superuser mode, type configure terminal and press Enter.
    ORACLE# configure terminal
  2. Type session-router and press Enter.
    ORACLE(configure)# session-router
    ORACLE(session-router)#
  3. Type session-agent and press Enter. The system prompt changes to let you know that you can begin configuring individual parameters.
    ORACLE(session-router)# session-agent
    ORACLE(session-agent)#
  4. Select the session agent where you want to apply this feature.
    ORACLE(session-agent)# select
    <hostname>:
    1: acmepacket.com realm=       ip=
    2: sessionAgent2  realm=tester ip=172.30.1.150
    selection:
    selection:1
    ORACLE(session-agent)#
  5. options—Set the options parameter by typing options, a Space, the option name preceded by a plus sign (+) (preferred-codec=X), and then press Enter. X is the codec that you want to set as the preferred codec.
    ORACLE(session-agent)# options +preferred-codec=PCMU

    If you type options preferred-codec=X, you will overwrite any previously configured options. In order to append the new option to the session agent’s options list, you must prepend the new option with a plus sign as shown in the previous example.

  6. Save and activate your configuration.