Configuring H.323 (Examining VoIP Gateways and Gateway Control Protocols) Part 4

Configuring Codecs on an H.323 Gateway

Normally you configure only one codec when you configure a dial peer on a gateway.

However, you can configure a prioritized list of codecs to increase the probability of establishing a connection between endpoints during the H.245 exchange phase.

Codec-order preservation is enabled by default in Cisco gateways running Cisco IOS Release 12.3(1) and later. No further configuration is needed.

Step 3. To configure codec negotiation, you must first create a codec voice class and populate with a list of codecs in order of their preference.

Enter voice-class configuration mode and assign an identification tag number for this codec voice class.


This command only creates the voice class for codec selection preference and assigns an identification tag. Use the codec preference command to specify the parameters of the voice class, and use the voice-class codec dial-peer command to apply the voice class to a VoIP dial peer.

Specify a list of preferred codecs to use on a dial peer.


Table 5-1 details the syntax options for this command.

Table 5-1 codec preference Syntax Description



The order of preference, with 1 being the most preferred and 14 being the least preferred

The codec preferred. Values are as follows:

clear-channel: Clear Channel 64,000 bps

g711alaw: G.711 a-law 64,000 bps

g711ulaw: G.711 mu-law 64,000 bps

g723ar53: G.723.1 ANNEX-A 5300 bps

g723ar63: G.723.1 ANNEX-A 6300 bps

g723r53: G.723.1 5300 bps

g723r63: G.723.1 6300 bps

g726r16: G.726 16,000 bps

g726r24: G.726 24,000 bps

g726r32: G.726 32,000 bps

g728: G.728 16,000 bps

g729abr8: G.729 ANNEX-A and B 8000 bps

g729br8: G.729 ANNEX-B 8000 bps

g729r8: G.729 8000 bps

gsmamr-nb: Enables GSMAMR codec capability

gsmefr: Global System for Mobile Communications Enhanced Full Rate

(GSMEFR) 12,200 bps

gsmfr: Global System for Mobile Communications (GSM) Full Rate

(GSMFR) 13,200 bps

ilbc: internet Low Bit rate Codec (iLBC) at 13,330 bps or 15,200 bps

transparent: Enables codec capabilities to be passed transparently

between endpoints (Note: The transparent keyword is not supported

when the call-start command is configured.)

bytes payload-size

(Optional) Number of bytes you specify as the voice payload of each frame. Values depend on the codec type and the packet voice protocol.

Enter dial-peer configuration mode for the VoIP dial peer.


Specify a single codec or assign the previously configured codec selection preference list to the VoIP dial peer.

To specify a single codec


Tuning H.323 Timers

The last part of the scenario requires you to adjust some of the H.323 timers to meet network specifications.

Step 4. Adjust H.225 timers.

Create an H.323 voice class and enter voice class configuration mode.


To set the H.225 TCP establish timeout value for VoIP dial peers, configure the H.323 TCP establish timeout value.


The number of seconds for the timeout range is 0 to 30. The default is 15. If you specify 0, the H.225 TCP timer is disabled.

Configure the SETUP Response Timeout value.


This command sets the timeout value, in seconds, for the response of the outgoing SETUP message. Range: 0 to 30. Default: 15.

Enter dial-peer configuration mode for the VoIP dial peer.


Assign the previously configured H.323 voice class to this VoIP dial peer.


Enter voice-service configuration mode and specify a voice-encapsulation type.


Enable the H.323 voice service configuration commands.


To set a timer for an idle call connection, change the Idle Timer for concurrent calls.


The following is a description of the syntax:

■ value value: The timeout value, in minutes. The range is 0 to 1440. The default is 10. If you specify 0, the timer is disabled, and the TCP connection is closed immediately after all the calls are cleared.

■ never: The connection is maintained permanently or until the other end-point closes it.

This command specifies the time to maintain an established H.225 TCP connection when there are no calls on that connection. If the timer expires, the connection is closed. If the timer is running and any new call is made on that connection, the timer stops. When all the calls are cleared on that connection, the timer starts again.

H.323 Complete Configuration

Example 5-1 illustrates the complete H.323 configuration example previously described.

Example 5-1 H.323 Configuration Example

H.323 Configuration Example

Configuring H.323 Fax Pass-Through and Relay

Tones used by fax machines can be degraded by a codec (for example, G.729) to the point that they are unintelligible by a far-end fax machine. In an H.323 environment, two approaches for preserving fax tones across an IP WAN include fax relay and fax pass-through.

Fax Pass-Through Example

Figure 5-13 shows an example of a topology containing a voice gateway that is configured for H.323 and fax pass-through. Fax pass-through is configured to forward faxes from a T1 (mu-law), and fax relay is disabled.

 H.323 Fax Pass-Through Configuration Example Topology

Figure 5-13 H.323 Fax Pass-Through Configuration Example Topology

This scenario requires a company’s headquarters in San Jose to be able to fax to its Austin office using fax pass-through. As a network administrator, your responsibility is to configure the gateway to meet the requirements of the network.

Requirements dictate that you

■ Create a dial peer to match a destination pattern for the Austin fax machine extension number.

■ Specify the session target for the VoIP dial peer as the Austin fax.

■ Configure Cisco fax pass-through to be used for fax support between the networks.

■ Specify the codec that is to be used for fax pass-through operation.

■ Specify the fax rate to be used for fax transmission to the Austin fax machine.

Complete the following steps to configure fax pass-through and relay with dial-peers.

Step 1. Enter VoIP dial-peer configuration mode.


Step 2. Specify the destination pattern.


Step 3. Specify the session target for VoIP dial peer.


Step 4. Specify the fax protocol to be used for a specific VoIP dial peer.


Use the fax protocol command in dial-peer configuration mode to configure the type of fax relay capability for a specific dial peer. Note the following command behavior:

■ fax protocol none: Disables all fax handling.

■ no fax protocol: Sets the fax protocol for the dial peer to the default, which is system.

If the fax protocol (voice-service) command is used to set fax relay options for all dial peers and the fax protocol (dial peer) command is used on a specific dial peer, the dial peer configuration takes precedence over the global configuration for that dial peer.

Step 5. Specify the rate at which a fax is sent to a specified dial peer.

Step 5. Specify the rate at which a fax is sent to a specified dial peer.


Use this command to specify the fax transmission rate to the specified dial peer.

The higher transmission speed values (for example, 14,400 bps) provide a faster transmission speed but monopolize a significantly large portion of the available bandwidth. The lower transmission speed values (for example, 2400 bps) provide a slower transmission speed and use a relatively smaller portion of the available bandwidth.

Note The fax call is not compressed using the ip rtp header-compression command because UDP is being used and not RTP. For example, a 9600 bps fax call requires approximately 24 kbps.

If the fax rate transmission speed is set higher than the codec rate in the same dial peer, the data sent over the network for fax transmission is above the bandwidth reserved for Resource Reservation Protocol (RSVP).

The voice keyword specifies the highest possible transmission speed allowed by the voice rate. For example, if the voice codec is G.711, the fax transmission might occur at a rate up to 14,400 bps because 14,400 bps is less than the 64 kbps voice rate. If the voice codec is G.729 (8 kbps), the fax transmission speed is 7200 bps.

Example 5-2 illustrates the complete H.323 fax pass-through configuration example previously described.

Example 5-2 H.323 Fax Pass-Through Configuration Example

H.323 Fax Pass-Through Configuration Example

Next post:

Previous post: