Cisco 7600 Series Routers Session Border Controller Configuration Guide
Restricting Codecs

Table Of Contents

Restricting Codecs

Contents

Prerequisites for Restricting Codecs

Restrictions for Codecs

How to Configure Codec Restriction

Configuring Codecs

Configuring a CAC Policy to Use a Codec List

Examples of Configuring Codecs

Example of Configuring Codecs Restriction

Example of Configuring a CAC Policy to Use a Codec List

Example of Codec Ordering


Restricting Codecs


A compressor-decompressor (codec) is a device or program that performs a transformation on a data stream or signal. The Session Border Controller (SBC) is hard-coded with a set of recognized codecs (see Table 17-1 to Table 17-4), including all commonly used voice and video codecs. The default behavior is to allow all recognized codecs on all calls. Any other codec present in call signaling is removed by the SBC.

This enhancement allows you to restrict which codec(s) a particular call can use and to configure a minimum permissible packetization period for each permitted codec.


Note For ACE SBC Release 3.0.0 and later, this feature is supported in the unified model only.


Feature History for Restricting Codecs

Release
Modification

ACE SBC Release 3.1.00

Added support for codec ordering.

ACE SBC Release 3.0.00

This feature was introduced on the Cisco 7600 series router along with support for the SBC unified model.


Contents

This module contains the following sections:

Prerequisites for Restricting Codecs

Restrictions for Codecs

How to Configure Codec Restriction

Examples of Configuring Codecs

Prerequisites for Restricting Codecs

The following prerequisites are required before you can restrict codecs:

On the Application Control Engine Module (ACE), you must be an Admin user to enter SBC commands. For more information, see the Application Control Engine Module Administration Guide at http://www.cisco.com/en/US/products/hw/modules/ps2706/products_configuration_guide_book09186a00806838f4.html.

Before implementing restricting codecs, the SBC must already be created. See the procedures described in Chapter 2, "ACE Configuration Prerequisites for the SBC".

Transcoding must be configured before you can restrict codecs. See the procedures described in the Implementing SBC Transcoding section.

All signaling border element (SBE) and data border element (DBE) configurations required to make simple calls must already be configured. Transcoding configurations follow these configurations.

Restrictions for Codecs

Review the following restrictions for codecs:

The media packet forwarder on the DBE polices the bandwidth consumed by each media stream, but it cannot police the type of codecs or the packetization periods.

Unrecognized codecs cannot be configured as members of the codec whitelist.

Active calls are not released if there is a change in the codec whitelist during the call.

If a codec whitelist is configured, SBC removes any unlisted codecs from the call setup flow and media gate allocation.

Multiple codec whitelists can be configured on a Call Admission Control (CAC) policy basis. For example, the list of codecs allowed for calls from SipAdj1 can be different than the list of codecs allowed for calls from SipAdj2.

If a codec whitelist has not been configured, all recognized codecs (see Table 17-1 to Table 17-4) are allowed for all calls.

You must use the textual value of the codec description that appears on the Session Description Protocol (SDP) to configure the codec whitelist, for example "PCMU" or "telephone-event".

Disallowing all codecs is not supported. However, you could set a bandwidth limit of 0 to achieve the same result.

Codec lists are not applied to media-bypass calls (those in which the SBC does not reserve media resources).

The format of the codec name is the same as the string used to represent it in SDP, for example PCMU or VDVI. All recognized codec names are listed in Table 17-1 - Table 17-4.

A single codec can only be added to each list once, with a single packetization period.

For each codec on a list, CAC restricts the signaled packetization period for any stream using that codec to be greater than or equal to the packetization period configured along with the codec in the list. If a stream uses more than one codec in the list, then the greater of all the packetization periods configured for each codec in the list is applied to the stream.

The Codec Ordering feature implicitly orders codecs according to the order in which they are added to the codec list using the codec command. Explicit codec ordering is not available with this feature.


Note The SBC will not order the codecs in SIP messages that are not generated by the SBC.



Note The bandwidths listed in Table 17-1 to Table 17-4 below are the bandwidths without the transport layer overheads. Therefore, the actual bandwidths reserved by the SBC are higher than the listed values.


Table 17-1 Sample-Based Audio Codecs with Packetization Time 10 ms 

Payload Type
Codec Name
Clock Rate (Hz)
Sample Size (bits)
Channels

0

PCMU

8000

8

1

5

DVI4

8000

4

1

6

DVI4

16000

4

1

8

PCMA

8000

8

1

10

L16

44100

16

2

11

L16

44100

16

1

15

G728

8000

2

1

16

DVI4

11025

4

1

17

DVI4

22050

4

1

G726-40

8000

5

1

2

G726-32

8000

4

1

G726-24

8000

3

1

G726-16

8000

2

1

L8

8000

8

1

DAT12

8000

12

2

L20

44100

10

2

L24

44100

24

2


Table 17-2 Non-Sample-Based Audio Codecs 

Payload Type
Codec Name
Packetization Time (ms)
Allocated Bandwidth (bps)

3

GSM

10

13200

7

LPC

10

5600

9

G722

10

64000

13

CN

10

400

18

G729

10

8000

18

G.729A

10

8000

18

G729A

10

8000

4

G723

30

6400

12

QCELP

13300

14

MPA

N/A

131072

G729D

10

6400

G729E

10

11800

GSM-EFR

10

12400

VDVI

10

25000

AMR

10

12500

AMR-WB

10

24420

dsr-es201108

10

4800

EVRC

10

8550

EVRC0

10

8550

mpa-robust

10

327680

G7221

10

32000

MP4A-LATM

10

131072

SMV

10

8550

SMV0

10

8550

G729AB

10

8000


Table 17-3 Video Codecs 

Payload Type
Codec Name
Packetization Time (ms)
Allocated Bandwidth (bps)

25

CelB

524228

26

JPEG

524228

28

nv

524228

31

H261

524228

32

MPV

524228

33

MP2T

524228

34

H263

524228

BMPEG

524228

BT656

170000000

DV

1500000000

H263-1998

524228

H263-2000

524228

MP1S

1600000

MP2P

524228

MP4V-ES

524228

raw

N/A

1500000000

SMPTE292M

N/A

1500000000


Table 17-4 Other Codecs 

Codec Name
Packetization Time (ms)
Allocated Bandwidth (bps)

telephone-event

20

1600

tone

20

1600

RED

20

1

parityfec

20

1

t140

100

80

pointer

20

1600

H224

20

6560

T.38

N/A

15500

X-NSE

20

1600


How to Configure Codec Restriction

You first configure the codecs and then apply them as explained in the following sections:

Configuring Codecs

Configuring a CAC Policy to Use a Codec List

Configuring Codecs

To restrict which codec(s) a particular call can use and to configure a minimum permissible packetization period for each permitted codec, you must configure CAC with a list of codecs, provide a description for the list, and then add any codec(s) to the list.

SUMMARY STEPS

1. configure

2. sbc service-name

3. sbe

4. codec-list list-name

5. codec

6. description text

7. codec codec-name [packetization-period packetization-period]

8. exit

9. show services sbc service-name sbe codec-list list-name

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

configure

Example:

host1/Admin# configure

Enables global configuration mode.

Step 2 

sbc service-name

Example:

host1/Admin(config)# sbc mysbc

Enters the submode of an SBC service.

Step 3 

sbe

Example:

host1/Admin(config-sbc)# sbe

Configures the submode of the SBE entity within a SBC service.

Step 4 

codec-list list-name

Example:

host1/Admin(config-sbc-sbe)#sbc mysbc sbe codec-list my_codecs

Creates a codec list.

Step 5 

codec codec-name

Example:

host1/Admin(config-sbc-sbe-codec-list)# codec PCMU

Adds a codec to a codec list.

Step 6 

description text



Example:

host1/Admin(config-sbc-sbe-codec-list)# description Legitimate codes

Adds a description for the specified codec-list using a readable text string format.

The no form of this command removes the description.

This description is displayed when the show command is used for this codec-list. It is also included for each codec-list when a summary of all codec-lists is displayed.

Step 7 

codec codec-name [packetization-period packetization-period]



Example:

host1/Admin(config-sbc-sbe-codec-list)# codec PCMU packetization-period 20

Adds a codec to a codec list, and sets a minimum packetization period (optional) for the codec.

The no form of this command (without the packetization period) removes the named codec from the codec list.

Note If the no form of this command includes the packetization period, only the packetization period for the codec is removed.

Step 8 

exit

Example:

host1/Admin(config-sbc-sbe-codec-list)# exit

Exits the codec-list mode to the SBE mode.

Step 9 

show services sbc service-name sbe codec-list list-name

Example:

host1/Admin# show services sbc mysbc sbe codec-list my_codecs

Displays detailed information about the codec lists configured on the SBE.

If the list name is omitted, for example, my_codecs, then details are displayed for all codec lists on the SBE.

Configuring a CAC Policy to Use a Codec List

SUMMARY STEPS

1. configure

2. sbc service-name

3. sbe

4. cac-policy-set policy-set

5. cac-table table-id

6. entry entry-id

7. codec-restrict-to-list list-name

8. exit

9. show services sbc service-name sbe cac-policy-set id table name entry entry

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

configure

Example:

host1/Admin# configure

Enables global configuration mode.

Step 2 

sbc service-name

Example:

host1/Admin(config)# sbc mysbc

Enters the submode of an SBC service.

Step 3 

sbe

Example:

host1/Admin(config-sbc)# sbe

Configures the submode of the SBE entity within a SBC service.

Step 4 

cac-policy-set policy-set

Example:

host1/Admin(config-sbc-sbe)# cac-policy-set 1

Enters the submode of CAC policy.

Step 5 

cac-table table-id

Example:

host1/Admin(config-sbc-sbe-cacpolicy)# cac-table MyCacTable

Identifies the CAC table.

Step 6 

entry entry-id

Example:

host1/Admin(config-sbc-sbe-cacpolicy-
cactable)# entry 1

Identifies the specific table entry.

Step 7 

codec-restrict-to-list list-name

Example:

host1/Admin(config-sbc-sbe-cacpolicy-
cactable)# codec-restrict-to-list my_codecs

Configures CAC to restrict the codecs used in signaling a call to the set of codecs provided in the named list.

If a codec list is empty, all codecs recognized by the SBE are allowed.

The no form of this command, or not setting this command, allows any recognized codecs to be used without restrictions.

Note This command replaces any codec list that was set up by an earlier CAC entry. To clear all restrictions from an earlier CAC entry, you must configure a codec-restrict-to-list list-name, where list-name is the name of a list containing no codecs.

Step 8 

exit

Example:

host1/Admin(config-sbc-sbe-codec-list)# exit

Exits the codec-list mode to the sbe mode.

Step 9 

show services sbc service-name sbe cac-policy-set id table name entry entry

Example:

host1/Admin(config-sbc-sbe)# show services sbc mysbc sbe cac-policy-set 1 table standard_policy_list entry 1

Displays detailed information for a specific entry in a CAC policy table, including any restricted codecs.

Examples of Configuring Codecs

This section provides a sample configuration and output for configuring restrictions on codecs and configuring a CAC policy to use a codec list.

Example of Configuring Codecs Restriction

The following example shows the commands required to configure codec restriction.

Figure 17-1 contains three adjacencies (A, B, and C). Any calls involving A need to be configured to use only the G729 and PCMU codecs with a minimal preferred packetization period of 10 milliseconds. However, calls between B and C can use any available codecs.

To create a codec list containing the specified codecs configured with a minimal preferred packetization period, use the following commands:

host1/Admin# configure
host1/Admin(config)# sbc mysbc
host1/Admin(config-sbc)# sbe
host1/Admin(config-sbc-sbe)# codec-list allowable_codecs
host1/Admin(config-sbc-sbe-codec-list)# description The set of codecs allowed on adjacency 
AdjA
host1/Admin(config-sbc-sbe-codec-list)# codec g729 packetization-period 20
host1/Admin(config-sbc-sbe-codec-list)# codec pcmu packetization-period 10
host1/Admin(config-sbc-sbe-codec-list)# exit

After configuring codec restriction, you must configure a CAC policy to use the codec list. See "Example of Configuring a CAC Policy to Use a Codec List" section.

Figure 17-1 Example Scenario for Configuring Codec Restriction

Example of Configuring a CAC Policy to Use a Codec List

The following example shows the commands required to configure a CAC policy to use a codec list. To configure a codec list, see "Example of Configuring Codecs Restriction" section.

host1/Admin# configure
host1/Admin(config)# sbc mysbc
host1/Admin(config-sbc)# sbe
host1/Admin(config-sbc-sbe)# cac-policy-set 1
host1/Admin(config-sbc-sbe-cacpolicy)# first-cac-table table1
host1/Admin(config-sbc-sbe-cacpolicy)# first-cac-scope call
host1/Admin(config-sbc-sbe-cacpolicy)# cac-table table1
host1/Admin(config-sbc-sbe-cacpolicy-cactable)# match-type adjacency
host1/Admin(config-sbc-sbe-cacpolicy-cactable)# entry 1
host1/Admin(config-sbc-sbe-cacpolicy-cactable)# match AdjA
host1/Admin(config-sbc-sbe-cacpolicy-cactable)# codec-restrict-to-list allowable_codecs
host1/Admin(config-sbc-sbe-cacpolicy-cactable-entry)# actionaction cac-complete
host1/Admin(config-sbc-sbe-cacpolicy-cactable-entry)# exit


Note The codec list command line interface (CLI) commands can only be entered at the per-call level in the CAC policy tables. If you configure a codec list at any other level the CAC policy set will not activate. However, a log is displayed after you complete the configuration and the policy set is marked as "complete".


Example of Codec Ordering

In the example below, codecs are added to the codec list. The show run command is then used to show the list order.

Router/Admin# config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router/Admin(config)# sbc sbc
Router/Admin(config-sbc)# sbe
Router/Admin(config-sbc-sbe)# codec-list zilu
Router/Admin(config-sbc-sbe-codec-list)# codec PCMU
Router/Admin(config-sbc-sbe-codec-list)# codec AMR
Router/Admin(config-sbc-sbe-codec-list)# codec PCMA
Router/Admin(config-sbc-sbe-codec-list)# codec G729D
Router/Admin(config-sbc-sbe-codec-list)# codec EVRC
Router/Admin(config-sbc-sbe-codec-list)# codec X-NSE
Router/Admin(config-sbc-sbe-codec-list)# codec T38
Router/Admin(config-sbc-sbe-codec-list)# end
Router/Admin# show run
...
    codec-list zilu
      codec PCMU
      codec AMR
      codec PCMA
      codec G729D
      codec EVRC
      codec X-NSE
      codec t38