Thursday, December 17, 2009

Audio Codec Negotation

Cisco routers acting as voice gateways perform an important job in Unified Communications (UC) deployments. Digital signal processors (DSP) in voice gateways translate voice over IP real-time protocol (RTP) media to time division multiplexing (TDM) required for traditional telephony interoperability. A variety of audio codecs that have different audio quality and bandwidth requirements are used on the voice over IP (VoIP) call leg that determine call quality. Voip dial peers in Cisco routers default to the compressed G.729 audio codec, but codecs can be negotiated in SIP and H.323 gateways. MGCP gateways do not support any codec negotiation because Cisco Unified Communications Manager (CUCM) dictates the codec to the calling party as a result of the region configuration.

H.323 uses the H.245 protocol to provide audio, video, and data media negotiation. SIP leverages session description protocol (SDP) to provide the same information. Regardless of the protocol utilized, the configuration is the same in Cisco IOS of the gateway router. The router 1 voice class configuration below is applied to dial peer 900 with the will send out a listing of prioritized codec capabilities to 10.1.1.1.

ROUTER1:

Voice class codec 90
Codec preference 1 g729a
Codec preference 2 ilbc
Codec preference 3 g722
Codec preference 4 g711ulaw
!
Dial-peer voice 900 voip
Destination-pattern 15…
Voice-class codec 90
Session target ipv4:10.1.1.1

The receiving device will make the final codec determination via the local voice class codec negotiation. If a call is routed from router 1 to router 2, the voice class below will result in an audio codec of g711ulaw because both routers support the codec and it is the called party’s preferred audio codec.

ROUTER2:

Voice class codec 914
Codec preference 1 g711ulaw
Codec preference 2 ilbc
Codec preference 3 g722
Codec preference 4 g729a
!
Dial-peer voice 500 voip
Incoming called-number 15…
Voice-class codec 914

The following debugs can be used to verify the media negotiation in H.323 and SIP respectively. Update your resume before running debugs in production environments.

Debug h245 asn1
Debug ccsip messages


Disclaimer: the article is originally written By Dennis Hartmann, www.networkworld.com

No comments: