You are on page 1of 229

VoIP Call Legs

Examining VoIP Call Leg


Characteristics and VoIP Media
Transmission

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-1


Outline

 VoIP Overview
 Converting Voice for VoIP
 VoIP Packetization
 VoIP Media Transmission
 Voice Activity Detection

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-2


VoIP Overview

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-3


VoIP and Traditional Telephony Comparison

Traditional telephony VoIP


Transmission Circuit-switched Packet-switched
technology
Basic signaling Supervisory, address, informational Supervisory, address,
functions informational
Signaling Digital: SS7, ISDN, QSIG H.323, SIP, MGCP,
protocols and Analog: loop-start, ground-start, SCCP
methods immediate-start, wink-start, delay-start,
DTMF, pulse
Transmission Dedicated circuit Bundle of UDP flows
method

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-4


Major Stages of Voice Processing in VoIP

1. Sampling
2. Quantization 7. VoIP Decapsulation
3. Encoding
4. Codec Compression
8. Decoding
5. VoIP Encapsulation 9. Modulation

IP DSP
DSP

Voice Gateway
6. Transport Through IP Network

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-5


VoIP Components

Gatekeeper
Application
Server

IP Backbone
Multipoint Control Gateway Gateway PBX
Unit

Call
Agent
Cisco Unified
Border Element

Cisco Unified IP Phones PSTN

 Most VoIP devices terminate signaling and media


Videoconference
Station  Cisco UBE processes signaling and optionally proxies
media
 Gatekeeper provides Call Admission Control (CAC) by
responding to endpoint queries
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-6
Converting Voice
for VoIP

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-7


Converting Voice to VoIP
Overview

Pulse Code 1. Sample the analog signal regularly.


Modulation 2. Quantize the sample.
(PCM)
3. Encode the value into a binary expression.
Codec
4. Compress the samples to reduce bandwidth
Compression
(optional).

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-8


Sampling

 Significant human articulation range:


– 300 Hz to 4 kHz
 Nyquist theorem: sampling rate = 2 x maximum articulation frequency
– 2 x 4 kHz = 8 kHz = 8000/sec
– Each sample is 1/8000 of a second apart

Analog Waveform

Time

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-9


Quantization
G.711 Operations
Segment 2

+ Segment 1

Segment 0

Segment 0
Each sample is 1/8000 of a Time
second apart

- Segment 1 Types:
mu-law
a-law
Segment 2
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-10
Quantization (Cont.)
G.711 a-law and mu-law
Similarities between mu-law and a-law Differences between mu-law and a-law
Both are linear approximations of logarithmic Different linear approximations lead to
input/output relationship. different lengths and slopes.

Both are implemented using eight-bit codewords The numerical assignment of the bit
(256 levels, one for each quantization interval). positions in the eight-bit codeword to
segments and the quantization levels
within segments are different.
Both break the range into a total of 16 segments:
a-law provides a greater dynamic range
• Eight positive and eight negative segments.
than u-law.
• Each segment is twice the length of the
preceding one. mu-law provides better signal/distortion
• Uniform quantization in each segment. performance for low-level signals than a-
law.
Both use a similar approach to coding the eight- • An international connection needs to
bit word: use a-law
• First (MSB) identifies polarity. • mu to a conversion is the responsibility
• Bits two, three, and four identify segment. of the mu-law country.
• Final four bits quantize the segment are the
lower signal levels than a-law.

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-11


Encoding
G.711 8-Bit Words

1 0 0 1 1 1 0 0

Segment Interval

Sign:
1 = Positive
0 = Negative

Example: mu-law = +99 and a-law = +28

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-12


Compression
Optional

Codec Bandwidth [kb/s]


G.711 64
G.726r32 32
G.726r24 24
G.726r16 16
G.728 16
iLBC* 15.2, 13.3
GSM Full Rate (GSM-FR) 13
G.729 (A/B/AB) 8
G.723r63 6.3
G.723r53 5.3

*iLBC = Internet Low Bitrate Codec


© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-13
VoIP Packetization

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-14


PCM (G.711)
10010111 Sample 1

10010110 Sample 2

10010101 Sample 3

10010100 Sample 4

10010011 Sample 5
...
10110001

VoIP Header 10010111 10010110 10010101 10010100 10010011 ... 10110001

G.711 20 ms of samples (160 bytes)


G.711 30 ms of samples (240 bytes)
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-15
Packetization Rate

 The length of voice streams in a packet affects packetization rate,


sample size, and voice bandwidth.

20-ms 30-ms 40-ms 60-ms 80-ms


voice voice voice voice voice
length in length in a length in length in length in
a packet packet a packet a packet a packet
Packetization rate 50 p/s 33.3 p/s 25 p/s 16.7 p/s 12.5 p/s
Size of collected 160 B 240 B 320 B 480 B 640 B
G.711 samples for
a single packet
Uncompressed raw 64 kb/s 64 kb/s 64 kb/s 64 kb/s 64 kb/s
voice bandwidth
Layer 3+ 80 kb/s 74.7 kb/s 72 kb/s 69.3 kb/s 68 kb/s
uncompressed
VoIP bandwidth

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-16


Codec Operations
G.729

DSP

Codeword generated every 10 ms


10 ms 10 ms 10 ms 10 ms 10 ms

Codewor Codewor Codewor Codewor Codewor Codewor


d d d d d d

20 ms 20 ms

VoIP Header Payload VoIP Header Payload VoIP Header Payload

By default one packet contains 20 ms of voice: 2 codewords


30 ms packetization period: 3 codewords in one packet

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-17


Packetization and Compression Example
G.729
 Layer 3 + bandwidth per call = (Voice Payload + Layer 3
Overhead [40B]) x Packets per Second x 8 bits/Byte

20 ms 30ms
voice length voice length
in a packet in a packet
Packetization rate 50 p/s 33.3 p/s
Size of collected, compressed 20 B 30 B
G.729 samples for a single packet
Compressed raw voice bandwidth 8 kb/s 8 kb/s
Layer 3+ G.729 VoIP bandwidth 24 kb/s 18.7 kb/s

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-18


VoIP Media
Transmission

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-19


VoIP Media Transmission Overview

 Real-Time Transport Protocol: Delivers the actual audio and video


streams over networks.
 Real-Time Transport Control Protocol: Provides out-of-band
control information for an RTP flow.
 cRTP compresses IP/UDP/RTP headers on low-speed serial links.
 SRTP provides encryption, message authentication and integrity,
and replay protection to the RTP.

H.323

IP
GW1 GW2

RTP Stream

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-20


Real-Time Transport Protocol

 Provides end-to-end delivery for real-time data, such as voice and video
 Randomly picks even ports from UDP port range 16384–32767
 Includes the following services:
– Payload type identification (codec type and media format)
 Allows the codec to change during transmission, as with fax/modem pass-
through
– Sequence numbering
 Primarily to detect packet loss
– Measuring delay/jitter
 To place packets in the correct timing order (playout delay compensation)

Layer 2 IP RTP Voice


UDP Header
Header Header Header Payload

Payload Sequence Time


Flags Options
type number stamp
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-21
Real-Time Transport Control Protocol

 Monitors media quality and provides control information


 Provides feedback on the RTP session:
– Packet count
– Packet delay
– Octet count
– Packet loss
– Jitter (variation in delay)
 Provides a separate flow from RTP for UDP transport use:
– Is paired with its RTP stream
– RTP stream UDP port plus 1 (odd-numbered port)

H.3
23
23
H.3 Gatekeeper

IP
GW1 GW2
RTP

RTCP
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-22
Compressed RTP

 Maps 40-byte header to 2 (without checksum) or 4 (with checksum) bytes


most of the time
 Works point-to-point, must be configured on both ends of the link
 On high-speed links, processing overhead does not justify the bandwidth
savings
 Algorithm:
– Establishes session context (full IP/UDP/RTP headers, few first-order
differential values, link sequence number, generation number, and a
delta encoding table)
– Session state shared between the compressor and the decompressor
– After the context state is established, compressed packets may be sent
– Only change (delta) indicators are transmitted
cRTP on low-speed
serial links (<= 768
kb/s)
S0/0

S0/0
IP

RTP/RTCP Stream
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-23
Secure RTP

 Encryption
– Makes the content undecipherable for transit
 Message integrity
– Adds a fingerprint to detect tampering during transit
 Message authentication
– Protects the fingerprint with key to guarantee the authenticity of the
source
 Replay protection
– Sequencing prevents the injecting of outdated information

S0/0
IP S0/0

GW1 GW2

SRTP Stream

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-24


Secure RTP Packet Format

V P X CC M PT Sequence Number
Time Stamp
Synchronization Source (SSRC) Identifier
Contributing Sources (CSRC) Identifier (Optional)
...
RTP Extension (Optional)

RTP Payload

SRTP MKI—0 Bytes for Voice


SHA-1 Authentication Tag (Truncated Fingerprint)

Encrypted Data Authenticated Data

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-25


VoIP Media Considerations
Firewalling
 Signaling sessions use static, well-known ports
– H.323 (TCP and UDP port 1720), SIP (UDP and TCP port 5060),
MGCP (UDP port 2427), SCCP (TCP port 2000)
– Can be easily allowed through firewalls using static ACLs
 RTP/RTCP use dynamically negotiated UDP ports
– Difficult to allow through firewalls using static ACLs
– Stateful firewalls open the RTP/RTCP ports on demand:
 Works well if RTP/RTCP streams follow the signaling path
 Transmission fails when RTP and RTCP flows take different
paths from signaling
Signaling Session

IP

RTP/RTCP Stream
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-26
VoIP Media Considerations (Cont.)
Privacy
 IPsec protection of SRTP packets encrypts already-encrypted data
 Exclude SRTP packets from IPsec protection:
– To save bandwidth and computational resources
 Prefer SRTP over IPsec:
– Less overhead
– More uniform approach (covers other calls, such as from roaming users)

IPsec Tunnel

IP WAN

Encrypted Data (Black Box)

IP ESP UDP (S)RTP Protected Voice


Header Header Header Header Payload

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-27


Voice Activity Detection

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-28


Voice Activity Detection Overview

 Builds on the nature of human conversation


– One speaks, one listens
 Classifies packets into: speech, silence, and unknown
– Speech and unknown packets are sent over the network
– Packets that would carry silence are discarded
 Up to 35 percent bandwidth savings
– Based on average volume of more than 24 calls
 The sound quality could be slightly degraded by VAD
– Initial after-silence sounds chopped off

Listening Speaking

VoIP VoIP

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-29


Bandwidth Savings

Frame Frame
Codec Sample
Codec Relay, no Relay with
speed size
VAD VAD
G.711 64 kb/s 240 B 76.3 kb/s 49.6 kb/s
G.711 64 kb/s 160 B 82.4 kb/s 53.6 kb/s
iLBC 13.3 kb/s 30 B 26.1 kb/s 17.0 kb/s
iLBC 15.2 kb/s 20 B 34.4 kb/s 22.4 kb/s
G.729 8 kb/s 30 B 20.3 kb/s 13.2 kb/s
G.729 8 kb/s 20 B 26.4 kb/s 17.2 kb/s

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-30


Voice Port Settings for VAD
Music Threshold and Comfort Noise
 Voice Activity Detection active when:
– Not disabled in the matched VoIP dial peer
– The negotiated codec supports it
 Tunable voice port parameters:
– Minimal decibel level of music-on-hold
 Defines loudness threshold to correctly interpret and transmit MOH
– Local generation of comfort noise
 Local telephone hears comfort noise during silence of the other end

Speaking Listening

FXS
IP WAN FXS
VoIP VoIP

Comfort
Noise
VAD

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-31


Summary

 VoIP uses IP transport for call signaling and media


transmission.
 Voice conversion into VoIP involves sampling, quantization,
encoding, and optional compression.
 VoIP packetization affects bandwidth by defining the length of
audio put into one VoIP packet.
 Voice and Video are carried in IP networks using Real-Time
Transport Protocol or its variants.
 Voice Activity Detection saves up to 35 percent of bandwidth
by discarding silence packets.

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-32


© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-33
VoIP Call Legs

Explaining H.323 Signaling Protocol

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-34


Outline

 H.323 Architecture
 H.323 Call Flows
 Codecs in H.323
 Configuring H.323 Gateways
 Customizing H.323 Gateways
 Verifying H.323 Gateways

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-35


H.323 Architecture

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-36


H.323 Architecture Overview

H.323 is a suite of protocols for voice, video, and data


with the following characteristics:
 ITU standard
 A mature protocol
 Based on ISDN Q.931
 Vendor-neutral
 Peer-to-peer architecture
 Supported on Cisco voice gateways and all Cisco Unified
Communications call control platforms
 Widely deployed

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-37


H.323 Advantages

 Self-sufficient dial plan per gateway


– Call routing configuration can be more specific than on Cisco
Unified Communications Manager
– No need for extra call-routing configuration when using Cisco
Unified SRST
 Translations defined per gateway:
– Regional conditions can be met within multisite deployments
 No dependency on the Cisco Unified Communications Manager
– Support for more voice interface types than with MGCP
 Support for ISDN NFAS
 Enhanced fax support and call preservation

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-38


H.323 Network Components
H.323 H.323 Multipoint
Gatekeeper
Terminal Terminal Control Unit

Gateways
Cisco H.320
Unified Terminal
IP
Border (ISDN)
Element
H.324
Intranet Internet PBX PSTN Terminal
(POTS)
ITSP

Gateway

Speech Only
H.323 Terminal (Telephones)

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-39


H.323 Gateways

H.323 gateways perform these services:


 Translation between audio, video, and data formats
 Conversion between call setup signals and procedures
 Conversion between communication control signals and
procedures

H.323 Device
H.323 Gateway

Telephone
Protocol
H.323 Translation Non-H.323
Endpoint and Media Endpoint
Transcoding

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-40


H.323 Gatekeepers
H.323 H.323 Multipoint
Terminal Terminal Address Gatekeeper Control Unit
translation
and
admission
control

H.320
Terminal
(ISDN)
H.324
Intranet Internet PSTN Terminal
(POTS)

H.323
Terminal

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-41


H.323 Multipoint Control Units
H.323 H.323 Multipoint
Terminal Terminal Gatekeeper Control Unit
Multimedia
Conferencing Mixing
Audio, Video, and
Data

H.320
Gateway Terminal
(ISDN)

H.324
Intranet Internet PSTN Terminal
(POTS)

H.323
Terminal

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-42


H.323 Multipoint Conferences

A F

B MCU E

E
C D A B C D MCU F

Centralized Multipoint Decentralized Multipoint

A F

B MCU E

C D
Video
Ad Hoc Audio

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-43


H.323 Regional Requirements Example
1
Calling party: 34917216111
Type: international
2 5
Calling Alice in the United States. Calling Frank in Germany.

6
3 U.S. Maria Germany Translate calling number
Translate calling number and route to destination.
Gateway (Spain) Gateway
and route to destination.

4 7
I have an external call. I have an external call.
To call back, I need to To call back, I need to
Alice Frank
dial 901134917216111. dial 00034917216111.
(U.S.) (Germany)

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-44


H.323 Call Flows

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-45


H.323 Signaling Stack
System Control User Data
Video I/O Audio I/O
and User Applications
Interface Equipment Equipment T.120

System Control
Audio
H.245 Video
Codec
Control Codec
G.711, G.722,
Signaling H.261
G.723, G.723.1,
H.263
G.728, G.729
H.225
Call
Signaling Receive Path
Delay
RAS
Control
H.225

H.225 Layer

LAN Stack

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-46


H.323 Slow Start Call Setup
H.323 H.323
Gateway Gateway
PSTN/ PSTN/
Privat IP Privat
e Network e
1. Voice
Initiate Call Voice
2. Call Setup
H.225/Q.93 3. Call Proceeding
4. Ring Called Party
1 5. Alerting
Call Setup 6. Ringback Tone 7. Answer Call
8. Connect
9. Capabilities Exchange
H.245 10. Master/Slave Determination
Capabilities 11. Open Logical Channel
Negotiation

RTP Stream
RTP Stream
12. Media
RTCP Stream
(RTP)

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-47


H.323 Slow Start Call Teardown
H.323 H.323
Gateway Gateway
PSTN/ PSTN/
Privat IP Privat
e Network e
Voice Voice

RTP Stream
RTP Stream
RTCP Stream

1. Hangup

H.245 2. Close Logical Channel


Teardown 3. Close Logical Channel ACK
Negotiation 4. End Session Command
5. End Session Command ACK
H.225 Call 6. Release Complete
Teardown

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-48


H.225 RAS Call Setup
H.323 Gatekeeper
H.323 H.323
Gateway Gateway
PSTN/ PSTN/
Privat IP Privat
e Network e
1. Voice
Initiate Call Voice
2. ARQ
H.225
3. ACF
RAS
4. Call Setup
H.225 5. ARQ
RAS 6. ACF
H.225/Q.93
1 7. Call Proceeding
8. Ring Called Party
Call Setup 9. Alerting
10. Ringback Tone 11. Answer Call
12. Connect
13. Capabilities Exchange
H.245 14. Master/Slave Determination
Capabilities
15. Open Logical Channel
Negotiation

RTP Stream
ARQ – Admission
RTP Stream Request
16. Media
RTCP Stream ACF – Admission Confirm
(RTP)
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-49
H.225 RAS Call Teardown
H.323 Gatekeeper
H.323 H.323
Gateway Gateway
PSTN/ PSTN/
Privat IP Privat
e Network e
Voice Voice

RTP Stream
RTP Stream
RTCP Stream

1. Hangup

H.245 2. Close Logical Channel


Teardown 3. Close Logical Channel ACK
Negotiation 4. End Session Command
5. End Session Command ACK
H.225 Call 6. Release Complete
Teardown
7a. DRQ 7b. DRQ
DRQ – Disengage Request
8a. DCF 8b. DCF
DCF – Disengage Confirm
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-50
Codecs in H.323

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-51


Negotiation Messages

 TCS message negotiates media channel parameters


 OLC message opens a logical channel for media transport
 Possible replies: Acknowledge, Reject, Confirm
 Exchanged by default in the H.245 signaling phase
 Master/slave determination settles conflicts
– If slave tries to open incompatible flow, master rejects it
 H.323 Fast Start feature embeds this information in H.225
call setup and subsequent messages

Terminal Capability Set Codec(s) VAD

Open Logical Channel RTP/RTCP Ports

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-52


Negotiation in Slow Start Call Setup
PSTN/ PSTN/
Privat IP Privat
e Network e
1. Voice
Initiate Call 2. Call Setup Voice
3. Call Proceeding
H.225/Q.93 4. Ring Called Party
1 5. Alerting
6. Ringback Tone 7. Answer Call
Call Setup 8. Connect
9. TCS Request
10. Master/Slave Request
11. TCS Request
12. Master/Slave Request
13. TCS + Master/Slave ACK
H.245
Capabilities 14. TCS ACK
Negotiation 15. Master/Slave ACK
16. OLC Request
17. OLC Request
18. OLC ACK TCS – Terminal Capabilities Set
(Codec, VAD)
19. OLC Response OLC – Open Logical Channel
20. Media (RTP) (RTP/RTCP port numbers)

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-53


H.323 Fast Connect
H.323 H.323
Gateway Gateway
PSTN/ PSTN/
Privat IP Privat
e Network e
1. Voice
Initiate Call Voice
2. Call Setup

H.225 Call Setup message carries multiple H.245 TCS/OLC


combinations, based on the number of codecs

3. Call Proceeding

H.225 Call Proceeding message carries confirmation for one


TCS variant and OLC information
4. Ring Called Party
5. Alerting
6. Ringback Tone 7. Answer Call
8. Connect

RTP Stream
RTP Stream
9. Media (UDP)
RTCP Stream

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-54


H.323 Early Media
H.323 H.323
Gateway Gateway
PSTN/ PSTN/
Privat IP Privat
e Network e
1. Voice
Initiate Call Voice
2. Call Setup

H.225 Call Setup message carries multiple H.245 TCS/OLC


combinations, based on the number of codecs, and requests
Early Media
3. Call Proceeding

H.225 Call Proceeding message carries confirmation for one


TCS/OLC variant and confirms Early Media

RTP Stream
4. Early Media allows streaming
RTP Stream of media (announcements, MOH)
RTCP Stream before the call is accepted

5. Ring Called Party


6. Alerting
7. Ringback Tone 8. Answer Call
9. Connect

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-55


Configuring H.323
Gateways

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-56


Configuring H.323 Gateways

 Configure VoIP dial peers


– Dial peers default to H.323 protocol
 H.323 enabled by default

router(config)#
dial-peer voice tag voip
 Creates a VoIP dial peer
 Enters configuration mode for parameters such as session target,
destination-pattern, incoming called-number, answer-address

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-57


H.323 Gateway Configuration Example
2001
R1 1/0/0
R2
10.1.1.1
10.2.1.1
IP WAN 1/0/1 2002

1/0/0
1001
dial-peer voice 1 voip
incoming called-number .
dial-peer voice 1 voip !
incoming called-number . dial-peer voice 10 pots
! destination-pattern 2001
dial-peer voice 10 pots port 1/0/0
destination-pattern 1001 !
port 1/0/0 dial-peer voice 11 pots
! destination-pattern 2002
dial-peer voice 20 voip port 1/0/1
destination-pattern 200. !
session target ipv4:10.2.1.1 dial-peer voice 20 voip
destination-pattern 100.
session target ipv4:10.1.1.1

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-58


Customizing H.323
Gateways

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-59


H.323 Gateway Tuning Overview

Tuning Options:
 H.323 session transport
 Source IP address
 H.323 timers
– H.225 settings

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-60


H.323 Session Transport

router(config)#
voice service voip
 Enters the VoIP service configuration mode
router(conf-voi-serv)#
h323
 Enters H.323 configuration mode
 Accessed from voice service VoIP configuration mode
 No default behavior or values
 no h323 command removes all commands in H.323 mode but does
not disable H.323 service
router(conf-serv-h323)#
session transport udp
 Defines the H.323 session transport method
 Configured in H.323 mode
 Default: TCP
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-61
Idle Connection and H.323 Source IP Address

router(conf-serv-h323)#
h225 timeout tcp call-idle {value | never}

 Sets the idle call connection timer


 By default 10 seconds

router(config-if)#
h323-gateway voip bind srcaddr ip-address

 Sets the source IP address for outgoing H.323 traffic


 Affects H.225, H.245, and RAS messages

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-62


H.225 Timers

router(config)#
voice class h323 h323_class_tag
 Enters the H.323 class configuration mode
router(config-class)#
h225 timeout tcp establish
 H.225 TCP timeout value (default 15 sec.)
router(config-class)#
h225 timeout setup
 Response timeout value for outgoing setup messages (default 15 sec.)
router(config-dial-peer)#
voice-class h323 h323_voice_class_tag
 Attaches a voice class to a dial peer

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-63


H.323 Gateway Tuning Example
Tuning Example
Loopback 0: 10.1.1.1 10.2.1.1
IP Network 200x

interface Loopback0 10.3.1.1


ip address 10.1.1.1 255.255.255.255
h323-gateway voip bind srcaddr 10.1.1.1
!
voice service voip
h323
 Physical interface redundancy
session transport tcp – Interface binding
voice class h323 10
h225 timeout tcp establish 3  Fast fallback to backup peer
!
dial-peer voice 1 voip – Timer set to 3 seconds
voice-class h323 10
destination-pattern 200.
session target ipv4: 10.2.1.1
!
dial-peer voice 2 voip
voice-class h323 10
destination-pattern 200.
session target ipv4: 10.3.1.1
preference 1
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-64
Verifying H.323
Gateways

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-65


Verifying H.323 Gateways

Router# show gateway


H.323 ITU-T Version: 4.0 H323 Stack Version: 0.1

H.323 service is up
This gateway is not registered to any gatekeeper

Alias list (CLI configured) is empty


Alias list (last RCF) is empty

H323 resource thresholding is Disabled

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-66


Summary

 H.323 is a widely supported peer-to-peer VoIP signaling


protocol.
 H.323 signaling occurs in two stages: H.225 and H.245.
 H.323 fast-start shortens the call setup exchange.
 H.323 gateway uses dial peers to reach other devices.
 H.323 gateway can be configured to use UDP transport,
a specific IP address, and modified timers.
 H.323 operations can be verified using show and debug
commands.

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-67


© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-68
VoIP Call Legs

Explaining SIP Signaling Protocol

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-69


Outline

 SIP Architecture
 SIP Call Flows
 SIP Addressing
 Codecs in SIP
 Configuring Basic SIP
 Configuring SIP ISDN Support
 Configuring SIP SRTP Support
 Customizing SIP Gateways
 Verifying SIP Gateways

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-70


SIP Architecture

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-71


SIP Overview

 Still evolving IETF standard


 Creates, modifies, and terminates multimedia sessions with one or
more participants
 Leverages various standards: RTP, RTCP, HTTP, SDP, DNS, SAP,
MGCP, and RTSP
 Supported on Cisco voice gateways and Cisco Unified IP phones
that have SIP firmware
 Peer-to-peer architecture
– User agent client (UAC) initiates SIP requests
– User agent server (UAS) returns SIP responses
– Phones, gateways, and Cisco call control devices can be UAs
 Uses ASCII text-based messages

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-72


SIP Signaling

 Determines the location of the target endpoint


 Determines the media capabilities of the target endpoint
– SDP establishes the lowest common service level
– Conferences use media parameters supported by all
 Determines the availability of the target endpoint and informs why
the target was unavailable
– Not reachable
– Already connected to a call
– No answer
 Establishes a session between communicating endpoints
– Including midcall changes (adding conference participants,
codec change)
 Handles the transfer and termination of calls
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-73
SIP Architecture Components
SIP Proxy,
Registrar,
Location, and
Redirect Servers

SIP

UA Client – initiating party


SIP SIP
UA Server – receiving party
SIP User Agents
(UAs) PSTN
SIP Gateway
RTP
T1 or PRI

Legacy PBX

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-74


SIP Servers

 Registrar server:
– Accepts registration requests from users
 Proxy server:
– Relays communications
 Acts as client and server
– Keeps no session state
– Transparent to end devices
– Does not generate its own messages (except ACK and Cancel)
– May add services (call forwarding, AAA, forking, and so on)
 Redirect server:
– Redirects callers to other servers
– Rarely used to scale to large environments
 Location server:
– Maintains user whereabouts
 Servers usually deployed as a single platform
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-75
SIP Architecture Examples

Cisco Unified
IP Network Communications
Manager Express

Cisco Unified
SIP Trunk from Carrier
Carrier Communications
Manager

Cisco Unified Intersite SIP Trunk Cisco Unified


Communications Communications
Manager Manager

Cisco Unified
Cisco Voice Communications
IP Network
Gateway Manager Express

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-76


SIP Call Flows

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-77


Direct Call Setup
Calling Party SIP Gateway SIP Gateway Called Party

IP
1. Initiate Call
2. Invite (SDP)

3. 100 Trying 4. Ring SIP Signaling


Called Party and SDP
5. 180 Ringing (UDP or TCP)
6. Ringback Tone
7. Answer Call
8. 200 OK

9. ACK

10. RTP Stream


Media (UDP)
11. BYE

12. 200 OK Signaling

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-78


SIP Call Setup Using Proxy Server

Calling Party Proxy Server Called Party


SIP Gateway SIP Gateway

IP
Invite
(SDP) Invite (SDP)
100 100 Trying
SIP Signaling and SDP Trying
(UDP or TCP) 180 Ringing
180
Ringing
200 OK
200 OK
ACK
ACK

RTP Stream
Media (UDP)

BYE BYE
200 OK 200 OK

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-79


SIP Call Setup Using Redirect Server
Calling Party Proxy Server Called Party
SIP Gateway SIP Gateway

IP
Invite

Moved
SIP Signaling and SDP Invite
(UDP or TCP)
100 Trying

180 Ringing

200 OK
ACK

Media (UDP) RTP Stream

BYE
200 OK

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-80


SIP Addressing

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-81


SIP Address Types

 Address format uses Internet URLs


 General form is name@domain

Address type Examples


Fully qualified domain
sip:jdoe@cisco.com
name (FQDN)

E.164 (PSTN) address sip:14085551234@gateway.com; user=phone

sip:14085551234;
Mixed format password=changeme@10.1.1.1
sip:jdoe@10.1.1.1

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-82


Address Registration

Although SIP servers are typically


collocated, the UA clients:
 First register on the registrar server
 Place calls over the proxy server
Registrar Redirect Location
Server Server Database

SIP Proxy
(UAS)
Register
Here I am! SIP UACs

SIP UACs

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-83


Address Resolution

Registrar Redirect Location Where is the name


Server Server Database or phone number?

SIP Proxy

When SIP proxy receives INVITE message


requesting call to an endpoint, it:
 Authenticates the caller

SIP UACs  Looks up the location database to resolve the


endpoint address FQDN, E.164, or mixed to its
current IP address

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-84


Codecs in SIP

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-85


Session Description Protocol

 SDP describes session parameters in SIP.


 SDP carries:
– The type of media (video, audio, etc.)
– The transport protocol (RTP/UDP/IP, H.320, etc.)
– The format of the media (codecs)
 A list of media formats can be offered:
– All listed formats may be used in the session.
– The first format is the default format.
 Exchanges codecs at different stages in call setup :
– Delayed Offer: 200 OK and ACK
– Early Offer: Invite and 200 OK
– Early media: 183 Session Progress, 180 Ringing, Pre-Ack

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-86


SDP Examples

Example 1: Audio, RTP/49100, G.711 mu-law)


v=0 Field Description
o=bjoe +1-201-555-1212 IN IP4 Version v=0
host1.cisco.com
s=Example1 Origin o=<username> <session id>
t=0 0 <version> <network type>
c=IN IP4 192.168.1.1 <address type> <address>
m=audio 49100 RTP/AVP 0 Session s=<session name>
name
Example 2: Audio, RTP/3456, G.729 most
Times t=<start time> <stop time>
preferred, G.711 mu-law second choice, G.711
a-law third choice) Connection c=<network type> <address type>
data <connection address>
v=0
o=asmith 13015556789 IN IP4 cisco.com Media m=<media> <port> <transport>
<media format list>
s=Example2
t=0 0 Audio 0: G.711 mu-Law
c=IN IP4 10.234.1.1 Video 8: G.711 a-law
m=audio 3456 RTP/AVP 18 0 8 Profile 3:GSM codec
(AVP) 18:G.729
codes
SDP content varies depending
on the message type
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-87
Delayed Offer
Calling Party SIP Gateway SIP Gateway Called Party

IP
1. Initiate Call
2. Invite

4. Ring SIP
3. 100 Trying
Called Party Signaling
5. 180 Ringing (UDP or
6. Ringback Tone TCP)
7. Answer Call
8. 200 OK (SDP: media offer)

9. ACK (SDP: media answer)

10. RTP Stream


Media (UDP)
11. BYE
SIP Signaling
12. 200 OK (UDP or TCP)

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-88


Early Offer
Calling Party SIP Gateway SIP Gateway Called Party

IP
1. Initiate Call
2. Invite (SDP: media offer)

3. 100 Trying 4. Ring SIP


Called Party Signaling
5. 180 Ringing (UDP or
6. Ringback Tone TCP)
7. Answer Call
8. 200 OK (SDP: media answer)

Default on Cisco 9. ACK


gateways (SDP
in Invite message)
10. RTP Stream
Media (UDP)
11. BYE
SIP Signaling
12. 200 OK
(UDP or
TCP)
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-89
Early Media
183 Session Progress Option
Calling Party SIP Gateway SIP Gateway Called Party

IP

Invite

Early Media allows 100 Trying


the sending of media
from the called party 183 Session Progress (SDP: Media Offer) SIP Signaling
or an application
server to the caller, Pre-ACK (SDP: Media Response) (UDP or TCP)
prior to the call being
accepted. Early
media is usually sent 180 Ringing
from the PSTN and
carries ringing tones RTP Stream
or announcements. Media (UDP)
200 OK
SIP Signaling
ACK
(UDP or TCP)
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-90
Early Media (Cont.)
180 Ringing Option
Calling Party SIP Gateway SIP Gateway Called Party

IP

Invite

IETF draft allows 100 Trying


SIP Signaling
other-than-183
messages to carry 180 Ringing (SDP: Media Offer)
(UDP or TCP)
SDP. Some
implementations use Pre-ACK (SDP: Media Response)
180. Cisco gateways
accept the 180
RTP Stream
method by default (in Media (UDP)
addition to 183). This
method can be 200 OK
disabled on Cisco
gateways. SIP Signaling
ACK
(UDP or TCP)

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-91


Configuring Basic SIP

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-92


Basic SIP Configuration Overview

 Configure SIP User Agent (UA):


– Authentication
– SIP servers
 Configure SIP-related dial peer parameters:
– Session protocol
– Session target

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-93


User Agent Configuration

router(config)#
sip-ua
 Enters SIP UA configuration mode

router(config-sip-ua)#
registrar {dhcp | [index] registrar-address[:port]
 Register E.164 numbers on behalf of analog phones (FXS), IP phone
virtual voice ports (EFXS), and SCCP phones with an external SIP
proxy or SIP registrar
 Up to six configurable registrars, can be obtained via DHCP

router(config-sip-ua)#
authentication username username password [0|7] password
 Enables SIP digest authentication
 Only one username can be configured globally in SIP UA
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-94
Dial Peer Configuration

router(config-sip-ua)#
sip-server {dns:host-name | ipv4:ipv4-address | ipv6:
[ipv6-address][:port-num]}
 Defines a SIP server to be referenced in dial peers

router(config-dial-peer)#
session target sip-server
 References the configured SIP server instead of its IP address

router(config-dial-peer)#
session protocol sipv2
 Defines SIPv2 as session protocol

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-95


Basic SIP Configuration Example

Cisco Unified
Communications Manager: 192.168.1.100
10.1.1.15
SIP
Gateway
SIP ITSP

sip-ua
authentication username JDoe password secret
Ext.: 2… registrar 10.1.1.15
sip-server 10.1.1.15
!
dial-peer voice 2001 voip
destination-pattern 2...
session protocol sipv2
session target sip-server
!
dial-peer voice 2002 voip
destination-pattern 9T
session target ipv4:192.168.1.100
session protocol sipv2

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-96


Configuring SIP ISDN
Support

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-97


SIP ISDN Support Configuration Overview

 SIP features for ISDN support:


– ISDN calling name display
– Blocking caller ID when privacy exists
– Substituting the calling number for the display name,
if display name unavailable

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-98


Calling Name Display

 Enables SIP IP phones to display caller-name identification


for calls that originate on an ISDN network

Calling:
Alice Doe Incoming Call

PRI/BRI

IP ISDN
Called SIP SIP Gateway SIP Gateway Caller
Phone

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-99


Calling Name Display Commands

router(conf-voi-serv)#
signaling forward {none | unconditional}
 Specifies whether or not the originating gateway forwards the signaling
payload to the terminating gateway
– None – do not pass the signaling payload to terminating gateway
– Forward the signaling payload unconditionally
 Configured in voice service voip configuration mode

router(config-if)#
isdn supp-service name calling
 Sets the calling-name display parameters sent from an ISDN serial interface
 Configured in serial interface created on a channelized E1 or channelized
T1 controller

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-100


Calling Name Display Configuration

Calling:
Alice Doe Incoming Call

T1 1/0

IP ISDN
Called SIP SIP Gateway SIP Gateway Caller
Phone

voice service voip


signaling forward unconditional
!
interface serial 1/0:23
isdn supp-service name calling

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-101


Blocking and Substituting Caller ID

 ISDN has a private setting to protect caller ID.


 SIP does not hide the private information:
– Just sets a field to mark as private and not to display it
– Data still viewable in the SIP message requests
 Block option deletes the caller ID information from the SIP message
requests so that it cannot be read on the network.
 With substitution, if there is no Display Name field but there is a number,
the number is copied into the Display Name field and presented on the
display of the recipient.

Calling:
xxx Incoming Call

PRI/BRI

IP ISDN
Called SIP SIP Gateway SIP Gateway Caller
Phone
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-102
Blocking and Substituting Caller ID
Commands

router(conf-voi-serv)#
router(config-dial-peer)#
clid strip pi-restrict
 Block caller ID information when privacy exists
 Available in voice service voip and dial peer configuration modes

router(conf-voi-serv)#
router(config-dial-peer)#
clid substitute name
 Substitutes the calling number for the display name when the display name
is unavailable
 Available in voice service voip and dial peer configuration modes

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-103


Blocking and Substituting Caller ID
Configuration

Calling:
xxx Incoming Call

1001 10.1.1.1 T1 1/0

IP ISDN
Called SIP SIP Gateway SIP Gateway Caller
Phone

voice service voip


clid substitute name
!
dial-peer voice 1 voip
destination-pattern 1...
session protocol sipv2
session target ipv4:10.1.1.1
clid strip pi-restrict

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-104


Configuring SIP SRTP
Support

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-105


SIP SRTP Support Overview

Two independently configured security areas:


 Signaling
– SIP Secure protected using TLS
 Media
– Secure RTP (AES encryption, HMAC-SHA1 authentication)

SIPS (TLS) SRTP Description


On On Signaling and media are secure.
Signaling is insecure or secured with other methods.
Off On Media is secure with Cisco IOS Release 12.4(22)T and
later. Media falls back to RTP or fails in earlier versions.
On Off Media insecure (RTP-only)
Off Off Signaling and media insecure

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-106


SIPS Global and Dial Peer Commands

router(conf-dial-peer)#
voice-class sip
 Enters dial peer SIP configuration mode

router(conf-voi-ser)#
router(conf-dial-peer)#
sip
 Enters SIP configuration mode, in:
– Voice service VoIP configuration mode, or
– Dial peer voice class SIP configuration mode

router(conf-ser-sip)#
url sips
 Enables SIPS by generating URLs in SIPS format for VoIP calls
 Available globally or in dial peer configuration mode

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-107


SRTP Global and Dial Peer Commands
router(conf-dial-peer)#
voice-class sip
 Enters dial peer SIP configuration mode

router(conf-voi-ser)#
router(conf-dial-peer)#
securertp
 Configures secure RTP media, in:
– Voice service VoIP configuration mode, or
– Dial peer voice class SIP configuration mode

router(conf-voi-ser)#
router(conf-dial-peer)#
securertp fallback
 Enables fallback to RTP calls in case secure RTP calls fail due to lack of support
from an endpoint
 Available globally or in dial peer configuration mode
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-108
SIPS and SRTP Configuration Example

10.1.1.1 10.2.1.1

IP
1001 SIP Gateway SIP Gateway 2001

voice service voip dial-peer voice 1 voip


sip destination-pattern 1...
url sips session protocol sipv2
securertp session target ipv4:10.1.1.1
securertp fallback voice-class sip
! securertp
dial-peer voice 1 voip securertp fallback
destination-pattern 2... sip
session protocol sipv2 url sips
session target ipv4:10.2.1.1

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-109


Customizing SIP
Gateways

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-110


SIP Gateways Tuning Overview

Tuning Options:
 SIP transport
– Global SIP
– Dial peer
– User agent
 Source IP address
– Global SIP
 SIP Timers
– User agent
 Early media
– Handling of 180 Ringing responses with SDP

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-111


SIP Transport
router(conf-voi-ser)#
router(conf-dial-peer)#
session transport {system | top tls | udp}

 Defines SIP transport globally or for dial peer


– In SIP mode without system option
– System option (in dial peer mode) refers to SIP global mode
 Applies to outgoing signaling
 Default: UDP
router(config-sip-ua)#
transport {top tls | udp}

 Enables the UA to receive signaling messages for inbound calls


over TCP, TCP TLS, or UDP. Uses port 5060.
 By default, all three transports are enabled.
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-112
SIP Source IP Address and UA Timers

router(conf-voi-ser)#
bind {control | media | all} source-interface interface-id
[ipv4-address ipv4-address | ipv6-address ipv6-address]
 Binds the source address for signaling and media packets to the
address of a specific interface

router(config-sip-ua)#
timers
 Configures various timers for the SIP UA

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-113


SIP UA Timers

Default
Timer Description
value
connect Time (in milliseconds) to wait for a 200 response to an 500
ACK request
disconnect Time (in milliseconds) to wait for a 200 response to a BYE 500
request
expires Time (in milliseconds) for which an INVITE request is valid 180000
hold Time to wait during hold before disconnecting (in minutes) 2880
notify Time to wait before NOTIFY retransmission 500
refer Time to wait before REFER retransmission. Refer request 500
is sent by the originating gateway to the receiving gateway
and initiates call forward and call transfer capabilities
register Time to wait before REGISTER retransmission 500
trying Time (in milliseconds) to wait for a 100 response to an 500
INVITE request

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-114


SIP Early Media

router(config-sip-ua)#
disable-early-media 180
 Disables early media cut-through treatment for SIP 180 Ringing
messages with SDP
 Configured in SIP user agent mode
 Does not affect treatment of SIP 183 Session Progress messages
 Early media enabled by default for SIP 183 Session Progress
messages
Response Message SIP Handling Status Treatment
180 response with SDP Enabled (default) Early media cut-through
180 response with SDP Disabled Local ringback
180 response without SDP Not affected Local ringback
183 response with SDP Not affected (default enabled) Early media cut-through
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-115
Gateway-to-Gateway Configuration Example
R1: R2:
Loopback 0 Loopback 0
1001 10.1.1.1 10.2.1.1 2001

IP

voice service voip voice service voip


sip sip
session transport top bind all source-interface
bind all source-interface loopback 0 ipv4-address 10.2.1.1
loopback 0 ipv4-address 10.1.1.1 !
! dial-peer voice 1 voip
dial-peer voice 1 voip destination-pattern 1...
destination-pattern 2... session protocol sipv2
session protocol sipv2 session target ipv4:10.1.1.1
session target ipv4:10.2.1.1 session transport top
! !
sip-ua sip-ua
disable-early-media 180 disable-early-media 180

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-116


UA Example
SIP Gateway
Loopback 0
10.1.1.1 192.168.1.100

SIP ITSP
voice service voip
sip
bind all source-interface loopback0 ipv4-address 10.1.1.1
!
sip-ua
authentication username JDoe password secret
registrar 10.1.1.15 expires 3600
sip-server 10.1.1.15
timers connect 1000
timers register 300
!
dial-peer voice 10 voip
destination-pattern 9T
session target ipv4:192.168.1.100
session protocol sipv2
session transport top

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-117


Verifying SIP Gateways

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-118


show sip-ua Command Overview

Command Description
show sip-ua service Displays the status of the SIP service
show sip-ua status Displays the status of the SIP UA
Displays the status of E.164 numbers that a
show sip-ua register status SIP gateway has registered with an external
primary SIP registrar
show sip-ua timers Displays SIP UA timers
show sip-ua connections Displays active SIP UA connections
show sip-ua calls Displays active SIP UA calls
show sip-ua statistics Displays SIP traffic statistics

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-119


SIP-UA General Verification

router# show sip-ua service


SIP Service is up

router# show sip-ua status


SIP User Agent Status
SIP User Agent for UDP : ENABLED
SIP User Agent for TCP : ENABLED
SIP User Agent for TLS over TCP : ENABLED
SIP User Agent bind status(signaling): ENABLED 10.1.250.101
SIP User Agent bind status(media): DISABLED
SIP early-media for 180 responses with SDP: ENABLED
...
SDP application configuration:
Version line (v=) required
Owner line (o=) required
Timespec line (t=) required
Media supported: audio video image
Network types supported: IN
Address types supported: IP4 IP6
Transport types supported: RTP/AVP udptl

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-120


SIP-UA Registration Status and Timers

router# show sip-ua register status

Line peer expires(sec) registered


4001 20001 596 no
4002 20002 596 no
5100 1 596 no
9998 2 596 no

router# show sip-ua timers


SIP UA Timer Values (millisecs)
trying 500, expires 180000, connect 500, disconnect 500
comet 500, prack 500, rel1xx 500, notify 500
refer 500, register 500

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-121


SIP-UA Call Information

router# show sip-ua calls


SIP UAC CALL INFO
Number of SIP User Agent Client(UAC) calls: 0

SIP UAS CALL INFO


Call 1
SIP Call ID :D215F304-7B5A11DC-8005EA1A-6A8F4AD@10.10.10.2
State of the call : STATE_ACTIVE (7)
Calling Number : 2818902001
Called Number : 1003
Source IP Address (Sig ): 10.10.10.1
Destn SIP Req Addr:Port : 10.10.10.2:5060
Destn SIP Resp Addr:Port: 10.10.10.2:56884
Destination Name : 10.10.10.2
Number of Media Streams : 1
Number of Active Streams: 1
Media Stream 1
State of the stream : STREAM_ACTIVE
Stream Call ID : 1
Stream Type : voice-only (0)
Negotiated Codec : g729r8 (20 bytes)
Codec Payload Type : 18
Negotiated Dtmf-relay : inband-voice
Media Source IP Addr:Port: 10.10.10.1:18050
Media Dest IP Addr:Port : 10.10.10.2:16522

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-122


SIP Debugging Overview

Command Description
debug ccsip For general SIP debugging; has
many detailed options, for example
for viewing direction-attribute settings
and port and network address-
translation traces
debug voip ccapi inout Shows every interaction with the call
control API
debug voip ccapi protoheaders Displays messages sent between the
originating and terminating gateways

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-123


Examining the INVITE Message

router# debug ccsip messages

INVITE sip:3660210@166.34.245.231;user=phone;phone-context=unknown
SIP/2.0
Via: SIP/2.0/UDP 166.34.245.230:55820
From: "3660110" <sip:3660110@166.34.245.230>
To: <sip:3660210@166.34.245.231;user=phone;phone-context=unknown>
...
Content-Type: application/sdp
v=0
o=CiscoSystemsSIP-GW-UserAgent 4629 354 IN IP4 55.1.1.42
s=SIP Call
c=IN IP4 55.1.1.42
t=0 0
m=audio 18978 RTP/AVP 0 100
c=IN IP4 10.1.1.42
a=rtpmap:0 PCMU/8000
a=rtpmap:100 X-NSE/8000

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-124


Examining the 200 OK Message

router# debug ccsip messages

SIP/2.0 200 OK
Via: SIP/2.0/UDP 166.34.245.230:55820
From: "3660110" <sip:3660110@166.34.245.230>
To: <sip:3660210@166.34.245.231;user=phone;phone-context=unknown>;tag=27DBC6D8-1357
Date: Mon, 08 Mar 1993 22:45:12 GMT
Call-ID: ABBAE7AF-823100E2-0-1CD274BC@172.18.192.194
Timestamp: 731427554
Server: Cisco VoIP Gateway/ IOS 12.x/ SIP enabled
Contact: <sip:3660210@166.34.245.231:5060;user=phone>
CSeq: 101 INVITE
Content-Type: application/sdp
Content-Length: 138

v=0
o=CiscoSystemsSIP-GW-UserAgent 1193 7927 IN IP4 166.34.245.231
s=SIP Call
t=0 0
c=IN IP4 166.34.245.231
m=audio 20224 RTP/AVP 0

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-125


Examining the BYE Message

router# debug ccsip messages

BYE sip:3660110@166.34.245.230:5060;user=phone SIP/2.0


Via: SIP/2.0/UDP 166.34.245.231:53600
From: <sip:3660210@166.34.245.231;user=phone;phone-
context=unknown>;tag=27DBC6D8-1357
To: "3660110" <sip:3660110@166.34.245.230>
Date: Mon, 08 Mar 1993 22:45:14 GMT
Call-ID: ABBAE7AF-823100E2-0-1CD274BC@172.18.192.194
User-Agent: Cisco VoIP Gateway/ IOS 12.x/ SIP enabled
Max-Forwards: 6
Timestamp: 731612717
CSeq: 101 BYE
Content-Length: 0

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-126


Summary

 SIP is a widely supported, still evolving signaling protocol.


 SIP has three call setup models: direct gateway-to-gateway, connect over
proxy server, and connect over redirect server.
 SIP address formats are: FQDN, E.164, and mixed.
 SIP early media starts RTP flows before the call is answered.
 Basic SIP configuration may include UA settings for communication over
a registrar or proxy server, and dial peers for direct gateway-to-gateway
calls.
 SIP ISDN support includes calling name display, blocking CLID when
privacy exists, and substituting the calling number for the display name,
if display name is unavailable.
 SIP security options relate to SIPS and SRST.
 SIP gateway can be configured to use UDP/TCP/TLS transport, a specific
IP address, and modified timers.
 SIP operations can be verified using show and debug commands.

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-127


© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-128
VoIP Call Legs

Explaining MGCP Signaling Protocol

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-129


Outline

 MGCP Architecture
 MGCP Call Flows
 MGCP Special Considerations
 Configuring MGCP Gateways
 Customizing MGCP Gateways
 Verifying MGCP Gateways

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-130


MGCP Architecture

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-131


Media Gateway Control Protocol Overview

 Centralized device control with simple endpoints for basic and


enhanced telephony services
 An extension of Simple Gateway Control Protocol (SGCP) and
supports SGCP functionality in addition to several enhancements
 Allows remote control of various devices
 Stimulus protocol
 Endpoints and gateways cannot function alone
 Uses IETF SDP
 Addressing by E.164 telephone number
 Defined in RFC 3435 and 2805

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-132


MGCP Key Features

 Alternative dial tone for VoIP environments (provider


competition)
 Simplified configuration for dial peers
 Simplified migration
 Centralized dial plan configuration on the Cisco Unified
Communications Manager
 Centralized gateway configuration on the Cisco Unified
Communications Manager
 Simplified Cisco IOS configuration
 Supports QSIG supplementary services with Cisco Unified
Communications Manager
 Uses UDP transport

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-133


MGCP Components

Cisco Voice
Gateways Call Agent (MGCP) Cisco Unified
Communications
Manager
FX
S*

PRI PRI
IP PSTN

Residential Gateway Trunking Gateway


 Connecting POTS phones  Connecting PSTN-bearer
to an IP network channels to an IP network

FXS = Foreign Exchange Station

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-134


MGCP Gateways

 Call processing is done by a call agent such as Cisco Unified


Communications Manager.
 MGCP uses endpoints and connections to construct a call.
– Endpoints:
 Sources of data or destinations for data
 Physical or logical locations in a device
– Connections:
 Point-to-point
 Multipoint

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-135


MGCP Endpoints
Slot 1 Subunit 1 Port 1

S1/SU1/DS1-1@gw1.domain.com

Endpoint type Hostname


S1/SU1/DS1-1@gw1.domain.com (T1/E1 trunk)

AALN/S2/SU1/1@gw1.domain.com
Slot 2 Subunit 1 Hostname

AALN/S2/SU1/1@gw1.domain.com

Endpoint type Port 1


(analog line)

T1/E1 VWIC
MGCP 1/1/1 PSTN/
PBX
FXS VWIC
2/1/1

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-136


MGCP Package Types

 Groups of event and signal definitions:


– Compatibility
– Modularity
 Enabled with the mgcp package-capability command:
– Trunk
– Line
– Dual-tone multifrequency (DTMF)
– Generic media
– Real-Time Transport Protocol (RTP)
– Announcement server
– Script

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-137


MGCP Call Flows

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-138


MGCP Messages

Command Description
AuditEndpoint (AUEP) Call agent requests the status of an endpoint
AuditConnection (AUCX) Call agent requests the status of a connection
EndpointConfiguration (EPCF) Call agent instructs the gateway about the coding characteristics
expected by the "line-side" of the endpoint
CreateConnection (CRCX) Call agent instructs the gateway to establish a connection with an
endpoint
ModifyConnection (MDCX) Call agent instructs the gateway to update its connection parameters
for a previously established connection
DeleteConnection (DLCX) Gateway or call agent reports that it no longer has the resources to
sustain the call and informs the recipient to delete connection
NotificationRequest (RQNT) Call agent instructs the gateway to watch for events on an endpoint
and the action to take when they occur
Notify (NTFY) Gateway informs the call agent of an event for which notification was
requested
RestartInProgress (RSIP) Gateway notifies the call agent that the gateway and its endpoints are
removed from service or are being placed back in service

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-139


MGCP Call Flows
Residential Gateway to Residential Gateway
Gateway Call Gateway
A Agent B
RQNT RQNT
RQNT Response RQNT Response

Off Hook and NTFY


Dialed 5551234
CRCX
CRCX (SDP,
CRCX Response Encapsulated
(SDP) RQNT) Ringing,
MDCX (Encapsulated Then Answer
CRCX
RQNT, SDP)
Response (SDP)
MDCX Response

RTP Stream
RTP Stream
On Hook RTCP Stream
NTFY

DLCX DLCX
DLCX Response DLCX Response

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-140


MGCP Call Flows (Cont.)
Trunking Gateway to Trunking Gateway
CO Switch
Gateway Call Gateway
A Agent B
CO switch Q931 Setup
CRCX
CRCX Response (SDP)
CRCX (SDP)

CRCX Response (SDP)


Q931 Setup Seize
MDCX (SDP)

MDCX Response Q931 Alerting


Ringing Q931 Alerting
Off Hook
MDCX Q931 Connect

MDCX Response

RTP/RTCP Streaming
Q931 Connect

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-141


MGCP Special
Considerations

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-142


PRI Backhaul

 D-channel call-setup signals Cisco Unified


need to be carried in their Communications
raw form back to the Cisco Manager Gateway PSTN CO
Unified Communications
Manager to be processed.
 Gateway terminates data ISDN
Q.931 Q.931
link layer and passes the Call Ctrl

rest of signals (Q.931 and


above) to Cisco Unified TCP TCP Q.921 Q.921

Communications Manager
via TCP port 2428. PRI
Backhaul
T1 PRI

 D-channel will be down


unless it can communicate
with Cisco Unified
Communications Manager.

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-143


Codec Negotiation (Residential
Gateway-to-Residential Gateway)
Call
Agent
RQNT RQNT
RQNT Response RQNT Response

Off Hook and NTFY


Dialed 5551234
CRCX
CRCX (SDP,
MGCP uses SDP to describe CRCX Response (SDP) Encapsulated
and negotiate media RQNT) Ringing,
parameters: RTP/RTCP ports MDCX (Encapsulated Then Answer
and codecs. RQNT, SDP)
Codec proposals are sent CRCX Response (SDP)
OGW -> CA -> TGW. MDCX Response MGCP supports
Codec confirmation is sent early media. If early
RTP Stream
TGW -> CA -> OGW. media is negotiated,
RTP Stream
On Hook RTCP Stream media channel is
NTFY established before
the call is accepted.
DLCX DLCX
DLCX Response DLCX Response

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-144


Digit Collection

Call
Agent
Notification Request (RQNT)
NTFY (Off-hook)
Notification Request (RQNT)
Off-hook NTFY (1) Call agent keeps
and dialed Notification Request (RQNT) requesting digits
1234 NTFY (2) until it finds a
dial plan match
Notification Request (RQNT)
NTFY (3)
Notification Request (RQNT)
NTFY (4)

Create Connection (CRCX)


CRCX Response

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-145


Configuring MGCP
Gateways

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-146


MGCP Gateway Configuration Overview

Two scenarios:
 Residential gateway
– Dial peer configuration
 Trunking gateway
– Controller configuration

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-147


MGCP Commands

router(config)#
mgcp [port]
 Starts the MGCP daemon on specified UDP port (default 2427)
 Allocates resources to MGCP processes
router(config)#
ccm-manager mgcp
 Enables MGCP communications with Unified CM*
 Enables redundancy when a backup Unified CM* is available
router(config)#
mgcp call-agent {host-name | ip-address} [port] [service-
type type [version protocol-version]]
 Defines the address and protocol of the call agent
 Service type set to mgcp

* Unified CM = Cisco Unified Communications Manager


© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-148
Customizing MGCP
Gateways

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-149


Configuration Download and Source Address

router(config)#
ccm-manager config server {ip-address | name}]
 Specifies the TFTP server address
 Downloads Cisco Unified Communications Manager XML
configuration files
router(config)#
mgcp bind {control | media} source-interface int-id
 Sets the source address for signaling and media packets to the
IP address of a specific interface
 If not configured, the IP layer selects the best address

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-150


Package Configuration

router(config)#
mgcp default-package package
 Configure the default package capability type
 Default for residential gateways: line-package
 Default for trunking gateways: trunk-package

router(config)#
mgcp package-capability package
 Configure additional package capability
– In addition to the default package
 Package should be supported by the specific call agent

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-151


Package Types
Package Description
line-package Package or residential lines; default for residential gateways
trunk-package Events and signals for trunk lines; default for trunking gateways
as-package Announcement server package
script-package Events and signals for script loading
srtp-package Secure RTP (SRTP) package; the default is disabled
dt-package Events and signals for immediate-start, DTMF and dial-pulse trunks
dtmf-package Events and signals for DTMF relay
fxr-package Events and signals for fax transmissions
gm-package Events and signals for several types of endpoints, such as trunking
gateways, access gateways, or residential gateways
md-package Provides support for Feature Group D (FGD) Exchange Access North
American (EANA) protocol signaling
ms-package Events and signals for wink-start and immediate-start DID and Direct
Outward Dialing (DOD), basic R1, and FGD Terminating Protocol

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-152


Residential Gateway Customization Example
Cisco Unified
Communications
Manager
Residential 10.1.1.1
Gateway
1/0/0

IP
ccm-manager mgcp
mgcp
mgcp call-agent 10.1.1.1
mgcp bind control source-interface Fastethernet0/0
mgcp bind media source-interface Fastethernet0/0
!

dial-peer voice 1 pots


service mgcpapp
port 1/0/0
!

mgcp package-capability dtmf-package


mgcp package-capability gm-package
mgcp package-capability line-package
mgcp default-package line-package

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-153


Trunking Gateway Customization Example
Cisco Unified
Communications WAN
Manager
10.1.1.1
T1 0/1/0 PSTN
IP Phones MGCP
Gateway

network-clock-participate wic 0
network-clock-select 1 e1 0/1/0
ccm-manager mgcp
mgcp
mgcp call-agent 10.1.1.1
mgcp bind control source-interface Fastethernet0/0
mgcp bind media source-interface Fastethernet0/0
!
controller t1 0/1/0
ds0-group 1 timeslots 1-24 service mgcp
!
mgcp default-package trunk-package
mgcp package-capability dt-package
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-154
Verifying MGCP
Gateways

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-155


show mgcp Commands

Command Description
show mgcp Displays MGCP status and parameters
show ccm-manager Displays the registration state with the
primary, secondary, and tertiary call agent
show mgcp endpoint Displays the MGCP endpoint names, related
voice ports, and administrative status
show mgcp statistics Shows MGCP packet statistics

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-156


show mgcp Command
router# show mgcp
MGCP Admin State ACTIVE, Oper State ACTIVE - Cause Code NONE
MGCP call-agent: 10.1.1.101 4000 Initial protocol service is
MGCP 0.1

MGCP media (RTP) dscp: ef, MGCP signaling dscp: af31
MGCP default package: trunk-package
MGCP supported packages: gm-package dtmf-package trunk-package
line-package hs-package atm-package ms-package dt-package mo-
package res-package mt-package fxr-package md-package
MGCP Digit Map matching order: shortest match
SGCP Digit Map matching order: always left-to-right

MGCP control bind :DISABLED
MGCP media bind :DISABLED
MGCP Upspeed payload type for G711ulaw: 0, G711alaw: 8
MGCP Dynamic payload type for G.726-16K codec
MGCP Dynamic payload type for G.726-24K codec
MGCP Dynamic payload type for G.Clear codec

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-157


show ccm-manager Command
router# show ccm-manager
MGCP Domain Name: cisco-voice-01
Priority Status Host
============================================================
Primary Registered 10.1.1.1
First Backup None
Second Backup None

Current active Call Manager: 10.1.1.1


Backhaul/Redundant link port: 2428
Failover Interval: 30 seconds
Keepalive Interval: 15 seconds
Last keepalive sent: 5w1d (elapsed time: 00:00:04)
Last MGCP traffic time: 5w1d (elapsed time: 00:00:04)
Last failover time: None
Switchback mode: Graceful

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-158


show mgcp endpoint Command
router# show mgcp endpoint

Interface T1 0/1/0

ENDPOINT-NAME V-PORT SIG-TYPE ADMIN


S0/SU1/ds1-0/1@HQ-1 0/1/0:1 none up
S0/SU1/ds1-0/2@HQ-1 0/1/0:1 none up
S0/SU1/ds1-0/3@HQ-1 0/1/0:1 none up
S0/SU1/ds1-0/4@HQ-1 0/1/0:1 none up
S0/SU1/ds1-0/5@HQ-1 0/1/0:1 none up
S0/SU1/ds1-0/6@HQ-1 0/1/0:1 none up
S0/SU1/ds1-0/7@HQ-1 0/1/0:1 none up
S0/SU1/ds1-0/8@HQ-1 0/1/0:1 none up
S0/SU1/ds1-0/9@HQ-1 0/1/0:1 none up
S0/SU1/ds1-0/10@HQ-1 0/1/0:1 none up

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-159


show mgcp statistics Command
router# show mgcp statistics
UDP pkts rx 8, tx 9
Unrecognized rx pkts 0, MGCP message parsing errors 0
Duplicate MGCP ack tx 0, Invalid versions count 0
CreateConn rx 4, successful 0, failed 0
DeleteConn rx 2, successful 2, failed 0
ModifyConn rx 4, successful 4, failed 0
DeleteConn tx 0, successful 0, failed 0
NotifyRequest rx 0, successful 4, failed 0
AuditConnection rx 0, successful 0, failed 0
AuditEndpoint rx 0, successful 0, failed 0
RestartInProgress tx 1, successful 1, failed 0
Notify tx 0, successful 0, failed 0
ACK tx 8, NACK tx 0
ACK rx 0, NACK rx 0
IP address based Call Agents statistics:
IP address 10.1.1.1, Total msg rx 8, successful 8, failed 0

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-160


Summary

 MGCP is a server/client signaling protocol that allows the call


agent to control the MGCP gateway.
 Call agent sends instructions to the MGCP gateway and the
gateway responds.
 MGCP codec selection is dictated by the call agent, and defined
on the Cisco Unified Communications Manager using the
regions approach.
 Two main types of MGCP gateways are residential and trunking.
 MGCP gateway loads packages to support events and signals.
 MGCP status, registration, endpoints, and statistics can be
viewed using appropriate show commands.

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-161


© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-162
VoIP Call Legs

Describing Requirements for VoIP


Call Legs

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-163


Outline

 Audio Clarity
 QoS Requirements
 Transporting Modulated Data over IP Networks
 Understanding Fax/Modem Pass-Through, Relay, and Store
and Forward
 Gateway Signaling Protocols and Fax/Modem Pass-Through
and Relay
 DTMF Support

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-164


Audio Clarity
Requirements

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-165


Audio Clarity Factors

 Delay: Time it takes for the signal to propagate from one end
to the other end of the conversation
 Jitter: Variation in the arrival of voice packets
 Fidelity: Audio accuracy or quality
 Echo: Usually due to impedance mismatch
 Packet loss: Loss of packets in the network
 Sidetone: Allows speakers to hear their own voice
 Background noise: Low-volume noise heard at the far end of
the conversation

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-166


Delay Sources

 All network components contribute to delay


 Variable delay creates jitter
Packet Flow
Serialization
Delay Serialization Serialization Delay
Delay
Gateway Serialization Delay
Router Gateway
Router Router

Propagation
DSP
Delay Prop. DSP
Delay
Delay Delay
Processing
Proc.
Delay
Prop. Delay
Process. Dejitter
Delay Delay Buffer
Queuing Queuing
Queuing Queuing
Delay Delay
Delay Delay

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-167


Delay Sources

 All network components contribute to delay


 Variable delay creates jitter

Serialization Delay

Processing Propagation
Delay Delay
Queuing
Delay

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-168


Delay Types

Delay type Description Affects Jitter Device


DSP delay Time required for sampling, encoding, No Originating and
packetization, and the reverse process (fixed delay) terminating gateways
Processing The time that it takes for a router to take the Yes Intermediate routers
delay packet from an input interface, examine it, (variable delay)
and put it into the output queue
Queuing The time that a packet resides in the output Yes Originating gateway
delay queue of a router (variable delay) and intermediate
routers
Serialization The time that it takes to transmit the “bits No Originating gateway
delay on the wire” (fixed delay) and intermediate
routers
Propagation The time that it takes to propagate a packet No Originating gateway
delay from one end of the link to another (fixed delay) and intermediate
routers
Dejitter Buffer to compensate for delay variation No Terminating gateway
buffer (fixed delay)

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-169


Acceptable Delay (G.114)

Delay in ms
Description
(one way)
0–150 Acceptable for most user applications
Acceptable, provided that administrators are aware of
150–400 the transmission time and its impact on the
transmission quality of user applications
Unacceptable for general network planning purposes
Above 400 (However, it is recognized that in some exceptional
cases, this limit will be exceeded.)

Values describe acceptable one-way delay

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-170


Jitter

 One-way jitter should be less than 30 milliseconds.


 Exact value depends on codec type.
– Codecs use different mechanisms to compensate jitter

Steady Stream of Packets

Time

Jitter is the Same Packet Stream with Jitter


variance in
delay.

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-171


Packet Loss

 Most codecs survive the loss of individual packets well.


 The loss of multiple packets in a row deteriorates audio quality.
 In general, acceptable packet loss is 1%.
 The exact value depends on codec type and number of lost packets
in a row.
– Codecs implement various methods to survive packet loss.

Lost Audio

Packet 1 Lost Packet 2 Packet 3


© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-172
Bandwidth Requirements

 Values do not include Layer 2 overhead


– Differs on a hop-by-hop basis

Bandwidth
Type of traffic Description
Requirement
Voice media 17–106 kb/s Per-call bandwidth including Layer 3+
overhead. Depends on the codec
type. The bandwidth should be
guaranteed end-to-end.
Signaling (SCCP) 150 b/s Approximate value per call, irregular
bandwidth usage.

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-173


QoS Requirements

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-174


QoS Mechanisms for VoIP

 Header compression
– Lowers the packet overhead
 FRF.12
– Splits large data packets into smaller fragments to allow timely voice transmission
 IP RTP Priority and Frame Relay IP RTP Priority
– Prioritization of voice media traffic
 Low Latency Queuing (LLQ)
– Voice prioritization over data packets
 Multilink PPP (MLP)
– Link aggregation
 Resource Reservation Protocol (RSVP)
– Method for Call Admission Control
 PSTN fallback
– Back up over PSTN if network service below required level

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-175


QoS Objectives

 Support dedicated bandwidth


 Improve loss characteristics
 Avoid and manage network congestion
 Shape network traffic
 Set traffic priorities across the network

VoIP
QoS

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-176


Transporting Modulated
Data over IP Networks

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-177


Transporting Modulated Data over IP Networks

 Fax and modem traffic consists of digital data modulated into


high-frequency tones.
 In contrast to voice, packet loss is much more critical for fax
and modem communications.
 VoIP compression algorithms are designed for voice, not for
fax or modem data frequencies.
 Methods to transmit fax and modem over IP networks:
– Terminating modulated signal and transmitting it as data
(fax relay)
– Sending the data in-band into the RTP stream
(fax pass-through)
– Receiving and converting faxes to files using T.37
(store-and-forward)

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-178


Understanding
FAX/Modem Pass-
Through, Relay, and
Store and Forward

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-179


Pass-Through and Relay
Overview

Pass-Through Relay
Available for fax or modem Available for fax or modem
Carries signal in-band, as RTP packets Carries signal out-of-band as Simple
Packet Relay Transport (SPRT)
packets, over UDP
If supported by both ends, switches to If supported by both ends, may apply
G.711 or clear channel, no VAD, no echo compression
canceller
Capability of the other end learned via Capability of the other end learned via
Network Signaling Events (NSE), upon Network Signaling Events (NSE), upon
fax or modem signal detection fax or modem signal detection
If not supported by the other end, falls If not supported by the other end, can
back to regular RTP with configured fall back to pass-through, or from T.38
codec fax relay to Cisco fax relay

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-180


Pass-Through Topology

0110011 0110011
G.711 64-kb/s G.711 64-kb/s
Encoding Decoding

IP Network

Digitized modulated data


Analog Data tunneled through 64-kb/s
Analog Data
VoIP

0110011 0110011
End-to-End Connection

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-181


Pass-Through
Fax
 Works only when the configured codec is G.711 or clear channel.
 Some gateways have limited port numbers for simultaneous use.
 VAD and echo cancellation are disabled.
 May issue redundant packets.
 Supported under the following call control protocols:
– H.323
– SIP
– MGCP

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-182


Pass-Through
Modem
 Works only when the configured codec is G.711 or clear-channel.
 VAD and echo cancellation need to be disabled.
 Modem pass-through over VoIP performs these functions:
– Represses processing functions
– May issues redundant packets
– Provides static jitter buffers
– Differentiates modem signals from voice and fax signals
– Reliably maintains a modem connection across the packet
network

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-183


Relay Topology

0110011 0110011
DSP DSP
Demodulates Modulates

IP Network

Simple Packet Relay


Analog Data Transport (SPRT)
Analog Data

0110011 0110011

Connection 1 Connection 2 Connection 3

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-184


Relay
Fax
 Two fax relay modes:
– Cisco proprietary
 Falls back to regular RTP
– T.38
 Standards-based
 Can fall back to Cisco fax relay, fax pass-through,
or regular RTP
 Both modes supported by H.323/SIP/MGCP
 Fax relay Packet Loss Concealment

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-185


Relay
Modem
 Cisco proprietary method
 Can fall back to modem pass-through
 Provides these features:
– Modem tone detection and signaling
– Optional payload redundancy
 Dynamic and static jitter buffers

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-186


Store-and-Forward Fax

 On-ramp receives faxes that are delivered as email attachments.

Fax Email

PSTN

 Off-ramp sends standard email messages that are delivered


as faxes.

Email Fax

PSTN

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-187


Gateway Signaling
Protocols, and Fax and
Modem Pass-Through
and Relay

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-188


Fax and Modem Pass-Through

G3 Fax Original Terminating G3 Fax


Initiates the Call Gateway Gateway

IP Network

VoIP Call

T.30

CED Tone

Call Control Issues NSE

NSE Accept

Change Codec Change Codec


VoIP Call

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-189


Cisco Fax Relay

G3 Fax Gateway Gateway G3 Fax


Initiates the Call

IP Network

T.30 VoIP Call T.30


CED Tone

DIS Message
Fax Relay Switchover (PT96)

Send Codec ACK (PT97)

Download Codec Download Codec


Codec Download Done (PT96)

Codec Download ACK (PT97)

Fax Relay Established

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-190


T.38 Fax Relay
H.323

G3 Fax T.38 T.38


G3 Fax
Initiates the Call Gateway Gateway

IP Network

T.30 VoIP Call T.30

CED Tone

DIS Message
Mode Request

Mode Request ACK

Close VoIP and Open T.38 Channels

T.38 UDP Packets

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-191


T.38 Fax Relay
SIP

G3 Fax T.38 T.38


G3 Fax
Initiates the Call Gateway Gateway

IP Network

T.30 VoIP Call T.30

CED Tone

DIS Message
INVITE (T.38 in SDP)

200 OK

ACK

T.38 UDP Packets

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-192


T.38 Fax Relay
MGCP
MGCP T.38 fax relay provides two modes of
implementation:
 Gateway-controlled mode:
– Gateways negotiate fax relay transmission by exchanging
data in SDP messages.
– Allows the use of MGCP-based T.38 fax without the
necessity of upgrading the call agent software.
 Call agent-controlled mode:
– Call agents instruct gateways to process fax traffic.
– Call agent can instruct gateways to revert to
gateway-controlled mode if it cannot manage fax control.

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-193


DTMF Support

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-194


DTMF Support Overview

 DTMF tones are distorted with most low-bandwidth codecs,


such as G.729 and G.723.
– Problems when accessing automated DTMF-based systems,
such as voice mail, menu-based automatic call distributor
(ACD), and automated banking
 DTMF relay sends DTMF tones with greater fidelity than is
possible in-band.

S0
256 G.729 Codec S1
kb/s Being Used 256
kb/s

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-195


DTMF Support
H.323
DTMF method Description
Cisco In-band. DTMF tones carried in the same RTP channel as voice.
proprietary DTMF tones are encoded differently from voice and are identified
as payload type 121. Requires Cisco gateways at both ends.
H.245 signal Out-of-band. DTMF sent through H.245 signaling instead of RTP.
Signals tone length.
H.245 Out-of-band. DTMF sent through H.245 signaling instead of RTP.
alphanumeric The tones are transported in H.245 User Input Indication
messages. This method does not send tone length information.
Support required for H.323v2 compliance.
RTP Named In-band. RFC-based DTMF transport in RTP. Special NTE RTP
Telephony formats exist for DTMF digits, hookflash, and other telephony
Events (NTEs) events. With the NTE method, the endpoints perform per-call
negotiation of the DTMF relay method.
None In-band. DTMF tones are left in the audio stream without any
marking. Default setting.

If multiple methods are supported, selection priority is as shown in the table.


© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-196
DTMF Support
SIP

DTMF method Description


SIP Notify Out-of-band. Forwards DTMF tones using SIP NOTIFY messages.
NOTIFY messages are exchanged bidirectionally between the
originating and terminating gateways for a DTMF event during a
call. SIP NOTIFY messages are advertised in an INVITE message
to the remote end only if this type of DTMF relay is negotiated.
RTP Named In-band. RFC-based DTMF transport in RTP. Special NTE RTP
Telephony formats exist for DTMF digits, hookflash, and other telephony
Events (NTEs) events. With the NTE method, the endpoints perform per-call
negotiation of the DTMF relay method.
None In-band. DTMF tones are left in the audio stream without any
marking. Default setting.

If multiple methods are supported, selection priority is as shown in the table.

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-197


DTMF Support
MGCP
DTMF method Description
Cisco In-band. DSPs on the gateways send and receive DTMF digits in-
proprietary band in the voice RTP stream but codes them differently so that
they can be identified by the receiver as DTMF tones.
RTP Named RFC-based in-band method. Transports DTMF tones using NTEs
Signaling Event in RTP packets.
(NSE)
RTP Named RFC-based in-band method. Two modes: gateway-controlled and
Telephony call agent-controlled. In gateway-controlled mode, the gateways
Events (NTE) negotiate DTMF transmission by exchanging capability information
in SDP messages. That transmission is transparent to the call
agent. In call agent-controlled mode, call agents use MGCP
messaging to instruct gateways to process DTMF traffic.
Out-of-band Sends the tones as signals to the call agent out-of-band over the
control channel.
None In-band. DTMF tones are left in the audio stream without any
marking. Default setting.

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-198


Summary

 Audio quality is affected by packet delay, jitter, packet loss,


distortion level, echo, sidetone, and background noise.
 QoS improves loss characteristics, avoids and manages network
congestion, and prioritizes voice traffic.
 Modulated data such as fax or modem is very vulnerable to
codec distortion.
 Fax transmission methods include pass-through, relay, and store-
and-forward. Modem transmission uses pass-through, or relay.
 Fax and modem pass-through, as well as Cisco proprietary and
T.38 fax relay are supported by H.323, SIP, and MGCP.
 DTMF tones can be carried in-band without any special handling,
in-band with special handling (Cisco proprietary, RTP-NTE, RTP-
NSE), and out-of-band (H.245 signal, H.245 alphanumeric, and
SIP-Notify).

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-199


© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-200
VoIP Call Legs

Configuring VoIP Call Legs

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-201


Outline

 Configuration Components of VoIP Dial Peer


 Configuring DTMF Relay
 Configuring FAX/Modem Support
 Configuring Codecs
 Limiting Concurrent Calls

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-202


Configuration
Components of VoIP
Dial Peer

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-203


VoIP Dial Peer Configuration Example
2001
R1 1/0/0
R2
10.1.1.1
10.2.1.1
IP WAN 1/0/1 2002

1/0/0
1001 2/1/0
PSTN
dial-peer voice 1 pots dial-peer voice 1 pots
incoming called-number . incoming called-number .
direct-inward-dial direct-inward-dial
! dial-peer voice 2 voip
dial-peer voice 2 voip incoming called-number .
incoming called-number . dial-peer voice 2001 pots
! destination-pattern 2001
dial-peer voice 1001 pots port 1/0/0
destination-pattern 1001 dial-peer voice 2002 pots
port 1/0/0 destination-pattern 2002
! port 1/0/1
dial-peer voice 2000 voip dial-peer voice 1000 voip
destination-pattern 200. destination-pattern 100.
session target ipv4:10.2.1.1 session target ipv4:10.1.1.1
© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-204
VoIP Dial Peer Characteristics

Criteria Description
Signaling protocol Default H.323. Can be changed with session protocol sipv2
command.
Source IP Outgoing interface address. Can be changed with h323-gateway
address voip bind srcaddr (interface mode) or bind (sip mode)
command.
Digit consumption No digits are consumed (equivalent to forward-digits all).
Session target IP address, DNS name, gatekeeper (RAS), or SIP server.
Configured with session target command.
Inbound dial peer Incoming called-number, answer-address, destination-pattern.
matching Default dial peer: any codec, no DTMF relay, IP precedence 0,
VAD enabled.
Outbound dial Most explicit match on destination-pattern.
peer matching
Direct Inward Dial Does not apply. Related only to inbound POTS dial peers.

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-205


Configuring DTMF Relay

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-206


DTMF Relay Configuration Options

router(config-dial-peer)#
dtmf-relay {[cisco-rtp] [h245-alphanumeric] [h245-signal]
[rtp-nte [digit-drop]] [sip-notify]}
 H.323 options (in priority order): cisco-rtp, h245-signal,
h245-alphanumeric, rtp-nte, none
 SIP options (in priority order): sip-notify, rtp-nte, none
 If no common dtmf-relay method is negotiated, the call is set
up with dtmf-relay none (DTMF tones left in the RTP
channel)
 Digit-drop option (available for RTP-NTE) is required for
Cisco Unified Border Element interworking with out-of-band
methods (H.245 and SIP-Notify)

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-207


DTMF Relay Configuration Example

 Common methods: h245-alphanumeric and rtp-nte


 Result: h245-alphanumeric selected as the higher priority choice

2001
R1 1/0/0
R2
1001 10.1.1.1
10.2.1.1
IP WAN 1/0/1 2002

1/0/0

dial-peer voice 1 voip


destination-pattern 200.
session target ipv4:10.2.1.1
dtmf-relay h245-alphanumeric h245-signal rtp-nte

dial-peer voice 4 voip


destination-pattern 100.
session target ipv4:10.1.1.1
dtmf-relay cisco-rtp h245-alphanumeric rtp-nte

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-208


Configuring FAX/Modem
Support

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-209


Cisco Fax Relay and Fax Pass-Through
Configuration

router(conf-voi-serv)
router(config-dial-peer)#
fax protocol {cisco | none | system | pass-through
{g711ulaw | g711alaw}}
 Enables Cisco fax relay and pass-through globally (voice
service voip) or in dial-peer mode
 System option exists in dial-peer mode and refers to global
setting
 Default for voice service voip: cisco
 Default for dial-peer: system

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-210


T.38 Fax Relay Configuration

router(conf-voi-serv)
router(config-dial-peer)#
fax protocol t38 [nse [force]] [ls-redundancy value [hs-
redundancy value]] [fallback {cisco | none | pass-through
{g711ulaw | g711alaw}}]
 Enables T.38 fax relay globally (voice service voip) or in dial-peer
 Overwrites fax protocol command (cisco, none, pass-through)
 Dial-peer setting takes precedence over global setting
 Optionally, can use named signaling events (NSEs) conditionally or
unconditionally (force) to switch to T.38
 Packet redundancy:
– Low-speed – from 0 (default, no redundancy) to 7 copies
– High-speed – from 0 (default, no redundancy) to 3 copies
 Fallback options: Cisco proprietary fax relay, none, fax pass-through

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-211


Fax Relay Speed Configuration

router(config-dial-peer)#
fax rate {2400 | 4800 | 7200 | 9600 | 12000 | 14400}
{disable | voice} [bytes milliseconds]
 Throttles down fax transmission speed in dial-peer mode
– Affects transmission length
 disable: Disables fax relay transmission capability
 voice: Highest possible transmission speed allowed by the voice
rate.
– Can monopolize bandwidth
 bytes: fax packetization rate, in milliseconds.
– Range is 20 to 48. Default is 20
 Fax relay transport is UDP, not RTP/UDP
– RTP header compression does not apply

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-212


Fax Relay SG3 Support Configuration

router(conf-voi-serv)
router(config-dial-peer)#
fax-relay {ans-disable | ecm disable | sg3-to-g3 [system]}
 Enables Super Group 3 (SG3) fax machines to negotiate down to
G3 speeds (from up to 33.6 kb/s to up to 14.4 kb/s)
 Applicable to Cisco proprietary and T.38 fax relay
 ans-disable: Disables ANS tones from originating in SG3 fax
machines so that these machines can operate at G3 speeds
 ecm disable: Suppresses Error Correction Mode
 SG3-to-G3: Allows SG3 machines to negotiate down to G3 speeds
 System option exists in dial-peer mode and refers to global setting
 Default: Not enabled—modem upspeed can occur when ANS tones
are detected, fax-relay ECM is enabled, and SG3-to-SG3 fax relay
communication is not supported and probably will fail

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-213


Fax Support Configuration Example

 Result: Cisco fax relay, fax rate 4800 b/s, SG3 support

R1 R2
1001 10.1.1.1 2001
10.2.1.1
IP WAN 1/0/1

1/0/0

dial-peer voice 1 voip dial-peer voice 4 voip


destination-pattern 200. destination-pattern 100.
session target ipv4:10.2.1.1 session target ipv4:10.1.1.1
fax rate 4800 fax-relay ecm disable
fax-relay ecm disable fax-relay sg3-to-g3
fax-relay sg3-to-g3 fax-relay ans-disable
fax-relay ans-disable fax rate 7200
fax rate 4800 fax protocol t38 ls-redundancy 2
hs-redundancy 2 fallback cisco

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-214


Configuring Modem Support
Modem Pass-Through
router(conf-voi-serv)
router(config-dial-peer)#
modem passthrough {system | nse [payload-type number]
codec {g711ulaw | g711alaw} [redundancy]
 Enables modem pass-through globally (voice-service VoIP
configuration mode) or in dial-peer mode
 Default: disabled
 Dial-peer setting takes precedence over global setting
 system: refers to global setting
 nse: NSE used to signal switchover to modem pass-through
 redundancy: single repetition of packets to protect against
packet loss

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-215


Configuring Modem Support
Modem Relay
router(conf-voi-serv)
router(config-dial-peer)#
modem relay {nse [payload-type number] codec {g711alaw |
g711ulaw} [redundancy] | system} gw-controlled
 Enables Cisco proprietary modem relay or pass-through, depending on
the negotiation
 Configured globally (voice-service VoIP configuration mode) or in dial-
peer mode
– Dial-peer setting takes precedence over global setting
 nse: NSE used to signal switchover to modem relay
 codec: For fallback to pass-through
 redundancy: Single repetition of packets
 system: Refers to global setting
 gw-controlled: Selects gateway-controlled method

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-216


Configuring Modem Support
Modem Relay Compression
router(conf-voi-serv)
router(config-dial-peer)#
modem relay gateway-xid [compress {backward | both |
forward | no}] [dictionary value] [string-length value]}
 compress: direction in which data is compressed
– Default: both
 dictionary value and string-length value: characteristics of the
compression algorithm
– Default: 1024 and 32, respectively
 Default: enabled when modem relay NSE is enabled

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-217


Modem Pass-Through and Modem
Relay Interaction

 Both gateways must be configured for Cisco modem relay.


– If one is configured for pass-through, pass-through is used.
 Cisco modem relay is not negotiated:
– Parameters are configured on the gateway (gateway-controlled).
– NSEs indicate switchover:
 From voice to modem pass-through (voiceband data)
 From modem pass-through to modem relay
 Upon detecting 2100-Hz tone, the terminating gateway sends:
– NSE 192 and switches over to modem pass-through
– NSE 199 to indicate modem relay:
 If recognized by the originating gateway, use modem relay
 If not recognized, use modem pass-through

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-218


Modem Support Configuration Example

 Result: modem pass-through, G.711 mu-law, one-way


redundancy

R1 R2
1001 10.1.1.1 2001
10.2.1.1
IP WAN 1/0/1

1/0/0

dial-peer voice 1 voip


destination-pattern 200.
session target ipv4:10.2.1.1
modem passthrough nse codec g711ulaw redundancy

dial-peer voice 4 voip


destination-pattern 100.
session target ipv4:10.1.1.1
modem relay nse codec g711ulaw gw-controlled

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-219


Configuring Codecs

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-220


Configuring Codec List

router(config)#
voice class codec class_tag
 Creates a codec voice class

router(config-class)#
codec preference value codec-type [mode frame-size][bytes
payload-size]
 Configures the codec voice class with codecs and their preferences
 Mode and frame size apply to iLBC:
– 20: 20-ms frames for 15.2 kb/s bit rate (default)
– 30: 30-ms frames for 13.33 kb/s bit rate
 Payload size: voice payload of each frame
– Values depend on the codec type
 Additional options exist for GSMAMR-NB codec

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-221


Codec-Related Dial Peer Configuration

router(config-dial-peer)#
voice-class codec class_tag
 Assigns codec voice class to dial peer (multiple codec option)

router(config-dial-peer)#
codec {codec [bytes payload-size] | transparent} [fixed-
bytes]
 Defines an individual codec on a dial peer
 payload size: voice payload of each frame
– Values depend on the codec type
 transparent: enables codec capabilities to be passed transparently
between endpoints in a Cisco Unified Border Element
 fixed-bytes: codec byte size is fixed and nonnegotiable
 Default: g729r8, 20-byte payload

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-222


Codec Configuration Example
R1 R2
1001 10.1.1.1 2001
10.2.1.1
IP WAN 1/0/1

1/0/0

voice class codec 100


codec preference 1 g711alaw
codec preference 2 g711ulaw bytes 80
codec preference 3 g723ar53
codec preference 4 g723ar63 bytes 144 dial-peer voice 4 voip
codec preference 5 g723r53 destination-pattern 100.
codec preference 6 g723r63 bytes 120 session target ipv4:10.1.1.1
codec preference 7 g726r16
codec preference 8 g726r24
codec preference 9 g726r32 bytes 80
codec preference 10 g728  Result: g729r8, 20 bytes
codec preference 11 g729br8
codec preference 12 g729r8
dial-peer voice 1 voip
destination-pattern 200.
session target ipv4:10.2.1.1
voice-class codec 100

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-223


Limiting Concurrent Calls

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-224


Limiting Concurrent Calls

router(config-dial-peer)#
max-conn number
 Specifies the maximum number of incoming or outgoing
connections for a particular dial peer
 Typically used to define the number of connections used
simultaneously to send or receive fax-mail, for off-ramp
store-and-forward fax functions
 Can be applied to these dial peer types: POTS, VoIP,
Multimedia Mail over IP (MMoIP), or Voice over Frame Relay
(VoFR)
 Number range: 1 to 2,147,483,647
 Default: no limit

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-225


Summary

 VoIP dial peers relate to voice call legs established over the
IP WAN.
 DTMF relay options (cisco-rtp, h245-alphanumeric, h245-
signal, rtp-nte, and sip-notify) are configured in the dial
peer, and are subject to negotiation.
 T.38 fax relay can fall back to Cisco proprietary fax relay or
fax pass-through, while Cisco proprietary modem relay may
fall back to modem pass-through, if not supported by the
peer gateway.
 Dial peers can be configured with a prioritized codec list or a
single codec.
 The number of calls can be limited in the dial peer.

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-226


© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-227
Module Summary

 VoIP transmission requires the sampling, encoding,


packetization, VoIP transmission in RTP or its variant,
decoding, and modulation.
 Gateways using peer-to-peer signaling protocols (H.323,
SIP) build the dial plan using the dial peers.
 SIP is an RFC-based signaling protocol with open
architecture that allows flexibility and extensibility.
 MGCP gateways forward calls by receiving instructions from
call agent and responding to its requests.
 Audio transmission quality depends on factors such as delay,
jitter, packet loss, and available bandwidth.
 VoIP dial peers can be configured to support fax/modem
pass-through, relay, and DTMF relay.

© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-228


© 2010 Cisco Systems, Inc. All rights reserved. CVOICE v8.0—2-229

You might also like