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 Codec Restriction
Example of Configuring Codecs
Example of Configuring a CAC Policy to Use a Codec List
Additional References
Related Documents
Standards
MIBs
RFCs
Technical Assistance
Restricting Codecs
A compressor-decompressor (codec) is a device or program that performs a transformation on a data stream or signal. The SBC is hard-coded with a set of recognized codecs (see Table 4 - Table 7), 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.
Feature History for Restricting Codecs
Release
|
Modification
|
Release 3.4.1
|
This feature was introduced on the Cisco XR 12000 Series Router.
|
Release 3.5.0
|
No modification.
|
Release 3.6.0
|
No modification.
|
Contents
This module contains the following sections:
•
Prerequisites for Restricting Codecs
•
Restrictions for Codecs
•
How to Configure Codec Restriction
•
Examples of Configuring Codec Restriction
•
Additional References
Prerequisites for Restricting Codecs
The following prerequisites are required before you can restrict codecs:
•
You must be in a user group associated with a task group that includes the proper task IDs for SBC commands being used. For detailed information about user groups and task IDs, see the defined task ID required per command in the Cisco IOS XR Session Border Controller Command Reference.
•
You must install and activate the package installation envelope (PIE) for the SBC software.
For detailed information about PIE installation, refer to the Upgrading and Managing Cisco IOS XR Software module in the Cisco IOS XR Getting Started Guide.
•
The SBC must already be created. See the procedures described in the SBC Configuration Prerequisites section.
•
Transcoding must be configured before you can restrict codecs. See the procedures described in the Implementing SBC Transcoding section.
•
All SBE and 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 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 4 - Table 7) are allowed for all calls.
•
You must use the textual value of the codec description that appears on the 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 4 - Table 7.
•
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.
Note
The bandwidths listed in the tables below are the bandwidths without the transport layer overheads. Therefore, the actual bandwidths reserved by the SBC are higher than the listed values.
Table 4 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 5 Non-Sample-Based Audio Codecs
Payload Type
|
Codec Name
|
Packetization Time (ms)
|
Allocated Bandwidth (bits/s)
|
3
|
GSM
|
10
|
13200
|
7
|
LPC
|
10
|
5600
|
9
|
G722
|
10
|
64000
|
13
|
CN
|
10
|
400
|
18
|
G729
|
10
|
8000
|
4
|
G723
|
30
|
6400
|
12
|
QCELP
|
N/A
|
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 6 Video Codecs
Payload Type
|
Codec Name
|
Packetization Time (ms)
|
Allocated Bandwidth (bits/s)
|
25
|
CelB
|
N/A
|
524228
|
26
|
JPEG
|
N/A
|
524228
|
28
|
nv
|
N/A
|
524228
|
31
|
H261
|
N/A
|
524228
|
32
|
MPV
|
N/A
|
524228
|
33
|
MP2T
|
N/A
|
524228
|
34
|
H263
|
N/A
|
524228
|
| |
BMPEG
|
N/A
|
524228
|
| |
BT656
|
N/A
|
170000000
|
| |
DV
|
N/A
|
1500000000
|
| |
H263-1998
|
N/A
|
524228
|
| |
H263-2000
|
N/A
|
524228
|
| |
MP1S
|
N/A
|
1600000
|
| |
MP2P
|
N/A
|
524228
|
| |
MP4V-ES
|
N/A
|
524228
|
| |
raw
|
N/A
|
1500000000
|
| |
SMPTE292M
|
N/A
|
1500000000
|
Table 7 Other Codecs
Codec Name
|
Packetization Time (ms)
|
Allocated Bandwidth (bits/s)
|
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 sbe codec-list list-name
3.
description text
4.
codec codec-name [packetization-period packetization-period]
5.
commit
6.
exit
7.
show services sbc service-name sbe codec-list list-name
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/0/CPU0:router# configure
|
Enables global configuration mode.
|
Step 2
|
sbc service-name sbe codec-list list-name
Example:
RP/0/0/CPU0:router(config)# sbc mysbc sbe
codec-list my_codecs
|
Enters a submode where the codec-list with the name provided can be configured.
Use the service-name argument to define the name of the service.
The no version of this command deletes the codec-list.
Note A codec list can exist despite having no codecs. Deleting all codes from a list does not delete the list.
|
Step 3
|
description text
Example:
RP/0/0/CPU0:router(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 4
|
codec codec-name [packetization-period
packetization-period]
Example:
RP/0/0/CPU0:router(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 5
|
commit
Example:
RP/0/0/CPU0:router(config-sbc-sbe-codec-list)#
commit
|
Saves configuration changes. Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Step 6
|
exit
Example:
RP/0/0/CPU0:router(config-sbc-sbe-codec-list)#
exit
|
Exits the codec-list mode to the SBE mode.
|
Step 7
|
show services sbc service-name sbe codec-list
list-name
Example:
RP/0/0/CPU0:router# 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 sbe cac-policy-set policy-set
3.
cac-table table-id
4.
entry entry-id
5.
codec-restrict-to-list list-name
6.
commit
7.
exit
8.
show services sbc service-name sbe cac-policy-set id table name entry entry
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/0/CPU0:router# configure
|
Enables global configuration mode.
|
Step 2
|
sbc service-name sbe cac-policy-set policy-set
Example:
RP/0/0/CPU0:router(config)# sbc mysbc sbe
cac-policy-set 1
|
Enters a submode where a specific CAC policy can be set to restrict codecs.
Use the service-name argument to define the name of the service.
|
Step 3
|
cac-table table-id
Example:
RP/0/0/CPU0:router(config-sbc-sbe-cacpolicy)#
cac-table MyCacTable match-type adjacency
|
Identifies the CAC table.
|
Step 4
|
entry entry-id
Example:
RP/0/0/CPU0:router(config-sbc-sbe-cacpolicy-
cactable)# entry 1
|
Identifies the specific table entry.
|
Step 5
|
codec-restrict-to-list list-name
Example:
RP/0/0/CPU0:router(config-sbc-sbe-cacpolicy-
cactable)# codec-restrict-to-list my_codecs
|
Configures CAC to restrict the codecs used in signalling 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 6
|
commit
Example:
RP/0/0/CPU0:router(config-sbc-sbe-codec-list)#
commit
|
Saves configuration changes. Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Step 7
|
exit
Example:
RP/0/0/CPU0:router(config-sbc-sbe-codec-list)#
exit
|
Exits the codec-list mode to the sbe mode.
|
Step 8
|
show services sbc service-name sbe
cac-policy-set id table name entry entry
Example:
RP/0/0/CPU0:router(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 Codec Restriction
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
The following example shows the commands required to configure codec restriction.
Figure 10 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:
codec-list allowable_codecs
description The set of codecs allowed on adjacency AdjA
codec g729 packetization-period 20
codec pcmu packetization-period 10
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.
Figure 10 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 code list, see "Example of Configuring Codecs" on page 62.
codec-restrict-to-list allowable_codecs
Note
The codec list 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 commit the configuration and the policy set is marked as "complete".
Additional References
The following sections provide references related to restricting codecs and configuring a minimum permissible packetization period.
Related Documents
Related Topic
|
Document Title
|
Cisco IOS XR master command reference
|
Cisco IOS XR Master Commands List
|
Cisco IOS XR SBC interface configuration commands
|
Cisco IOS XR Session Border Controller Command Reference
|
Initial system bootup and configuration information for a router using the Cisco IOS XR Software
|
Cisco IOS XR Getting Started Guide
|
Cisco IOS XR command modes
|
Cisco IOS XR Command Mode Reference
|
Standards
Standards
|
Title
|
No new or modified standards are supported by this feature, and support from existing standards has not been modified by this feature.
|
—
|
MIBs
RFCs
RFCs
|
Title
|
RFC 2833
|
RTP Payload for DTMF Digits, Telephony Tones and Telephony Signals
|
RFC 3261
|
SIP: Session Initiation Protocol
|
Technical Assistance
Description
|
Link
|
The Cisco Technical Support website contains thousands of pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.
|
http://www.cisco.com/techsupport
|