ONT – Introduction to VoIP

Also available as a PDF here

Introduction to VoIP Networks

Benefits of Packet Telephony

  • More efficient bandwidth usage
  • Lower transmission and network costs/expenses
  • Improved productivity
  • Access to new communication devices

Packet Telephony Components

  • Phones
  • Gateways – Interconnect with other gateways and allow communication between devices that may not be accessible from the IP network. Also responsible for connecting PBX’s to IP networks
  • Multipoint Control Units (MCU) – conference calling device that combines the streams from participants and returns the result to each participant
  • Application & Database Servers
  • Gatekeepers – these provide call routing and call admission control (CAC) services. Call routing resolves a name or number to an IP address. CAC grants permission for a call setup
  • Call Agents – handles call routing, address translation, and call setup
  • Video End Points
  • Digital Signal Processors – convert analog signals to digital signals using different codes

Analog Interfaces

  • FXS (Foreign Exchange Station) – Meant for analog phones, fax machines, and modems. To these devices, the gateway acts like the PSTN CO switch
  • FXO (Foreign Exchange Office) – Connects to a regular phone jack to be connected to the PSTN
  • E&M – Ear and Mouth (or Earth and Magento) – Generally provide PBX to  PBX analog trunk connectivity

Digital Interfaces

  • Provides connection to PSTN CO and PBX switches
    • BRI or T1/E1 interface
  • BRI and PRI Interfaces use command channel signaling (CCS) – uses a dedicated D (Delta) channel for signaling
  • T1’s can be configured to use CAS – does not use a dedicated D channel (aka “robbed bit signaling” because each CAS channel gives up a few bits to perform signaling)

Stages of a Phone Call

  • Three most popular VoIP signaling protocols are:
    • H.323 – ITU standard
    • Media Gateway Control Protocol (MGCP) – IETF standard
    • Session Initiation Protocol (SIP) – IETF standard
  • Three stages of a phone call
    • Call setup
    • Call maintenance
    • Call teardown
  • Call Setup
    • Destination telephone number must be resolved to an IP address
      • Call request must be sent to this IP
      • Called “call routing”
    • Call admission control (CAC) – determines if enough bandwidth is available
      • If not enough bandwidth, CAC sends message to initiator advising of insufficient resources (fast busy signal)
    • If call routing and CAC succeed, a call request is sent towards destination IP
    • If call is accepted, the following parameters are negotiated:
      • Source and destination IP addresses to be used for the call
      • Source and destination UDP ports that the RTP uses
      • Compression algorithm
  • Call Maintenance
    • Collects statistics such as packets exchange, packets lost, delay, and jitter
    • End points can analyze this data and can provide call quality info upon request or they can send it to another device for analysis
  • Call Teardown
    • After an end point terminates the call, the call teardown process sends the appropriate notifications to all involved devices to free up resources

Distributed vs. Centralized Call Control

  • Distributed Model
    • Multiple devices are involved in setup, maintenance, and teardown, and other aspects of call control
    • H.323 and SIP are considered distributed call control protocols
  • Centralized Model
    • Relieves the gateways and endpoints for being responsible for call control tasks
    • MGCP end points not intelligent enough to perform call control tasks and must rely on a CA (call agent)
    • Analog voice digitization, encapsulation into IP, and transport still handled by DSP of the MGCP gateways and end points (basically, the phones and routers handle the “IP” part in “VoIP” – the CA handles the call control)
    • If call is terminated, the CA is notified and advises endpoints to release their resources
    • End points can monitor call quality and notify the CA if quality is unacceptable

Digitizing and Packetizing Voice

Basic Voice Encoding: Converting Analog to Digital

  • Four Major Steps
    • Sampling – the periodic capture and recording of voice
      • Result of sampling is called pulse amplitude modulation (PAM) signal
    • Quantization – the process of assigning numeric values to the amplitude of each sample on the PAM signal
    • Encoding – process of representing the quantization result for each PAM in binary
    • Compression (Optional) – reduces the number of bits that must be transmitted per second with the least possible amount of voice quality degradation (always less than 64Kbps)
  • Converting Digital Back to Analog
    • Decompression
    • Decoding and filtering
    • Reconstructing analog signal

The Nyquist Theorem

  • A signal that is sampled at least 2x the highest frequency of that signal yields enough samples for accurate reconstruction of the signal at the receiving end

Quantization

  • The process of assigning numeric values to the amplitude of each of the samples on the PAM signal
  • Quantization error (Quantization Noise)– The difference due to “rounding” between the original signal and the signal received at the far end

Compression Bandwidth Requirements and Their Comparative Qualities

  • Several ITU compression standards exist and differ based on the following:
    • Bandwidth requirements
    • Quality degradation they cause
    • Delay they introduce
    • CPU overheard due to complexity
  • ITU standard for measuring quality of voice codecs is mean opinion score (MOS)
    • Range from 1 (worst) to 5 (best) (subjective)

Digital Signal Processors

  • Provide 3 Major Services
    • Voice termination
    • Transcoding – (when 2 parties use different codecs, the DSP converts one codec into the other)
    • Conferencing
      • If all parties use same codec, it’s called a single-mode conference
      • If parties use different codes, it’s called mixed-mode conference
        • The DSP must perform transcoding in this case

Encapsulating Voice Packets

Real-time Transport Protocol

  • Uses RTP (real-time transport protocol)
    • Runs over UDP on ports 16,384 to 32,767
    • Adds timestamps to the packets at the source, so that they can be replayed at the same rate as when it left the source
    • Also uses sequence numbers, reordering, and reassembly
  • VoIP Packets have the following headers
    • IP @ 20 bytes
    • UDP @ 8 bytes
    • RTP @ 12 bytes
    • Total: 40 bytes (of headers alone)
  • DSP usually puts10ms of voice in one package, and puts 2 packages in an IP packet
  • Resulting packet size depends on the codec used

Reducing Header Overhead

  • Compressed RTP (cRTP) aka RTP Header Compression
  • cRTP must be applied on both sides of a link
  • Sender and receive agree on a hash value for the 40 bytes of header data and only send the hash value once computed
  • If cRTP doesn’t account for the header checksum (UDP checksum) the headers are reduce to 2 bytes
    • If it considers the UDP checksum, the headers are reduce to 4 bytes
  • cRTP recommend for slow links only (less than 2Mb bandwidth) – and only if performed in hardware
  • cRTP adds delay due to extra calculations needed

Bandwidth Calculations

Consider the following in addition to the codec used

  • Packet rate and packetization size
    • Packet rate in packets per second (pps) – inversely proportionate to packetization size
    • Packetization size – amount of voice in each IP packet (Number of 10ms samples)
  • IP, UDP, RTP header overhead
  • Layer 2 overhead
  • Tunneling protocol overhead (GRE, IPSec, L2TP, etc.)

ITU Codec Standards

  • G.711 is PCM (pulse code modulation)
    • 8000 samples per second
    • 8 bits per sample
    • 64,000 bits per second (64Kbps)
    • No compression
  • G.726 – Adaptive Differential Pulse Code Modulation
    • Sends fewer bits per sample (instead of 8 per sample)
    • Bits describe the change from previous sample
    • 4 bits sent is G.726 r32 (32Kbps)
    • 3 bits sent is G.726 r24 (24Kbps)
    • 2 bits sent is G.726 r16 (16Kbps)
  • G.722 – Wideband Speech Encoding Standard
    • Divides signal into 2 sub-bands
    • Encodes each sub-band using a modified ADPCM
    • Bit rates of 64Kbps, 56Kbps, or 48Kbps
  • G.727 – Low Delay Exited Linear Prediction
    • Wave shapes of five samples are expressed with 10 bit codes
    • 16Kbps
  • G.729 – Conjugate Structure Algebraic Code Exited Linear Prediction
    • Similar to G.727 but uses 10 samples
    • 8Kbps

Data Link Overhead (L2)

  • Each L2 technology adds overhead to the overall packet
    • Ethernet – 18 bytes
    • Frame Relay – 6 bytes
    • Multilink PPP – 6 bytes
    • Dot1Q – 22 bytes
  • L2 overhead must be considered when calculating total bandwidth for a VoIP call

Security and Tunneling Overhead

  • IPSec in tunnel mode adds another 20 byte header
    • Original IP packet is encrypted within another IP packet
  • IPSec also adds additional delay due to time taken to decrypt packets
  • Must also consider other tunneling protocols for BW calculation

Six Major Steps for Calculating the Total Bandwidth for a VoIP Call

  1. Determine the codec and packetization period
  2. Determine the link-specific information
    • Is cRTP being used
    • Type of L2 encapsulation
    • Security or tunneling protocols in use
  3. Calculate the packetization size (size of the voice payload)
    • (Codec bw in bits x Packetization Period in seconds) / 8 = size of voice payload in bytes)
      • NOTE: Packetization period usually given in ms – must divide by 1000 to arrive at seconds
  4. Calculate the total frame size
    • Consider all overhead involved (L2, security, tunneling, etc.)
  5. Calculate the packet rate
    • Packet rate = 1 / Packetization period in seconds
  6. Calculate total bandwidth
    • Multiply frame size from step 4 (in bits) x packet rate from step 5 = total bandwidth
    • Example: Frame size of 66 bytes x 50 pps = 528 bits x 50 = 26,400 bits or 26.4Kbps
  • VAD – saves bandwidth by detecting silence and 1 way audio (Such as music on hold – data only flows in 1 direction)
    • Dependent on:
      • Type of audio
      • Background noise level
      • Other factors such as differences in language and culture
    • Can save up to 35% of bandwidth
    • Heavily depended on above factors – most bw estimates don’t take VAD into consideration

Implementing VoIP Support in an Enterprise Network

Main components consist of:

  • Gateway – provide connectivity between analog, digital, and IP devices
  • Gatekeeper – H.323 device that provides call routing or CAC
  • CUCM – acts as IP PBX
  • IP Phones

SRST – survivable remote site telephony

  • If WAN or other link to call manager goes down, an SRST enabled device can route those calls over the PSTN
  • Provides intra-office calling, hold, and transfer

Cisco Unified Call Manager Functions

  • Cisco Call Manager  is call processing software and is the main component of CUCM
    • Supports MGCP, H.323, SIP, and SCCP IP signaling
  • Provides the following services
    • Call processing
    • Dial plan administration
    • Signaling and device control
    • Phone feature administration
    • Directory and XML services
    • Programming interface to external applications

Deployment Models

  • Single site
  • Multisite with centralized call processing
    • CUCM placed at main site
    • All IP devices are under control of CUCM at main site
    • DSP resources can be distributed
    • Signaling and call control go through main site, but intra-site calls stay local (the actual voice traffic)
    • Each site has PSTN connection
    • CAC can deny calls if WAN link is saturated
      • Can reroute those calls through PSTN if needed
  • If WAN is down, SRST can reroute calls over PSTN
  • Multisite with distributed call processing
    • Each site has its own CUCM
    • All intrasite traffic including call control stays at local site
  • Clustering over WAN
    • Servers in a cluster dispersed throughout various sites
    • Servers need to communicate over the WAN for database synch and replication
    • Maximum RTT between sites must be < 40ms

Identifying Voice Commands in IOS Configurations

  • Terminology:
    • Dial peer: IOS configuration that links/binds a telephone number to a local POTS interface (FXS) or a remote IP
      • One POTS dial peer and one VoIP dial peer exist

Example (R1 and R2 are connected over an IP network)

R1 Configuration
Dial-peer voice 1 pots ! configure dial-peer 1 as POTS
destination-pattern 11 ! set the dial pattern
port 1/1/1 ! device is on port 1/1/1 (FXS)

Dial-peer voice 2 voip
destination-pattern 22
session target ipv4: 192.168.2.2

R2 Configuration
Dial-peer voice 1 pots
destination-pattern 22
port 2/0/0

Dial-peer voice 2 voip
destination-pattern 11
session target ipv4: 192.168.1.1

Call Admission Control (CAC)

  • Limits the number of concurrent calls
  • Compliments QoS configurations
  • Prevents oversubscription of the WAN by VoIP calls

Leave a Reply