Wednesday, June 9, 2010

VoIP Fundamentals

Voice over IP (VoIP) enables a voice-enabled router to carry voice traffic, such as telephone calls and faxes, over an IP network. This chapter introduces the fundamentals of VoIP, architecture types, and available voice-signaling protocols. Numbering plans, dial plans, and VoIP access to 911 emergency services are explained. The role of gateways and their use in integrating VoIP with traditional voice technologies is described. Traffic engineering and bandwidth calculations are discussed. Finally, the impact of security threats and the components required for a secure voice network are also explained.


Understanding VoIP Requirements

The increased efficiency of IP networks and the ability to statistically multiplex voice traffic with data packets allows companies to maximize their return on investment (ROI) in data network infrastructures. Decreased cost and an increase in the availability of differentiated services are two major reasons companies are evaluating the implementation of VoIP.

As demand for voice services in the IP network expands, it is important to understand the components and functionality that must be present for a successful implementation. Several protocols and tools are available for carrying voice in a data network. In defining the VoIP protocol stack, you must understand at which layer these tools and protocols reside and how they interact with other layers. When voice is packaged into IP packets, additional headers are created to carry voice-specific information. These headers can create significant additional overhead in the IP network.

Understanding which protocols to use and knowing how to limit overhead is crucial in carrying voice efficiently across an IP network.


VoIP Functional Components

In the traditional PSTN telephony network, all the elements that are required to complete the call are transparent to the end user. Migration to VoIP necessitates an awareness of these required elements and a thorough understanding of the protocols and components that provide the same functionality in an IP network.

Required VoIP functionality includes the following features:
  • Signaling
  • Database services
  • Bearer control
  • CODECs
The following sections describe each required functional component.


Signaling

Signaling is the ability to generate and exchange control information to establish, monitor, and release connections between two endpoints. Voice signaling requires the ability to provide supervisory, address, and alerting functionality between nodes. PSTN uses Signaling System 7 (SS7) to transport control messages in an out-of-band signaling network. VoIP presents several options for signaling, including H.323, Session Initiation Protocol (SIP), Megaco/H.248, and Media Gateway Control Protocol (MGCP). Some VoIP gateways are also capable of initiating SS7 signaling directly to the PSTN network.

Signaling protocols are classified either as peer-to-peer or client/server architectures. SIP and H.323 are examples of peer-to-peer signaling protocols where the end devices or gateways contain the intelligence to initiate and terminate calls and interpret call control messages. Megaco/H.248 and MGCP are examples of client/server protocols where the endpoints or gateways do not contain call control intelligence but send or receive event notifications to the server commonly referred to as the call agent. For example, when an MGCP gateway detects that a telephone has gone off hook, the gateway does not know to automatically provide a dial tone. The gateway sends an event notification to the call agent, telling the agent that an off-hook condition has been detected. The call agent then notifies the gateway to provide a dial tone.


Database Services

Access to services such as 1-800 numbers or caller ID requires the ability to query a database to determine whether the call can be placed or the information can be made available. Database services include access to billing information, calling name (CNAM) delivery, toll-free database services (1-8xx), and calling card services. VoIP service providers can differentiate their services by providing access to numerous and unique database services. For example, to simplify fax access to mobile users, a provider might build a service that converts fax to e-mail. Another example might be to provide a call notification service that places outbound calls with prerecorded messages at specific times to notify users of such events as school closures, wake-up calls, or appointment reminders.


Bearer Channel Control

Bearer channels are the channels that carry voice calls. Proper supervision of these channels requires that the appropriate call connect and call disconnect signaling be passed between end devices. Correct signaling ensures that the channel is allocated to the current voice call and that the channel is properly de-allocated when either side terminates the call. These connect and disconnect messages are carried in SS7 within the PSTN network, and in SIP, H.323, Megaco/H.248, or MGCP within an IP network.


CODECs

Coder-decoders (CODECs) provide the coding and decoding translation between analog and digital facilities. Each CODEC type defines the method of voice coding and the compression mechanism that is used to convert the voice stream. The PSTN uses TDM to carry each voice call. Each voice channel reserves 64 kbps of bandwidth and uses the G.711 CODEC to convert the analog voice wave to a TDM voice stream. G.711 creates a 64 kbps digitized voice stream. In VoIP design, CODECs often compress voice beyond the 64 kbps voice stream to allow more efficient use of network resources. The most widely used CODEC in the WAN environment is G.729, which compresses the voice stream (that is, the voice payload only) to 8 kbps.


VoIP Protocols

VoIP employs a variety of protocols to set up a call, tear down a call, and send information (for example, the actual spoken voice) during a call. The following are the major VoIP protocols:
  • H.323 An ITU standard protocol for interactive conferencing. H.323 was originally designed for multimedia in a connectionless environment, such as a LAN. H.323 serves as an umbrella of standards that define all aspects of synchronized voice, video, and data transmission. H.323 defines end-to-end call signaling.
  • Media Gateway Control Protocol (MGCP) A method for PSTN gateway control or thin device control. Specified in RFC 2705, MGCP defines a protocol to control VoIP gateways that are connected to external call-control devices, referred to as call agents. MGCP provides the signaling capability for less-expensive edge devices, such as gateways, that might not have implemented a full voice-signaling protocol such as H.323. For example, any time an event such as an off-hook condition occurs at the voice port of a gateway, the voice port reports that event to the call agent. The call agent then signals that device to provide a service, such as dial-tone signaling.
  • Megaco/H.248 A joint Internet Engineering Task Force (IETF) and ITU standard that is based on the original MGCP standard. Megaco defines a single gateway control approach that works with multiple gateway applications including PSTN gateways, ATM interfaces, analog-like and telephone interfaces, interactive voice response (IVR) servers, and others. Megaco provides full call control intelligence and implements call level features such as transfer, conference, call forward, and hold. The basic operation of Megaco is very similar in nature to MGCP. However, Megaco provides more flexibility by interfacing with a wider variety of applications and gateways.
  • Session Initiation Protocol (SIP) A detailed protocol that specifies the commands and responses to set up and tear down calls. SIP also details features such as security, proxy, and transport (TCP or User Datagram Protocol [UDP]) services. SIP and its partner protocols, Session Announcement Protocol (SAP) and Session Description Protocol (SDP), can provide announcements and information about multicast sessions to users on a network. SIP defines end-to-end call signaling between devices. SIP is a text-based protocol that borrows many elements of HTTP, using the same transaction request and response model, and similar header and response codes. It also adopts a modified form of the URL-addressing scheme used within e-mail that is based on Simple Mail Transfer Protocol (SMTP).
  • Real-Time Transport Protocol (RTP) An IETF standard media-streaming protocol. RTP carries the voice payload across the network. RTP provides sequence numbers and time stamps for the orderly processing of voice packets. In addition to voice packets, RTP can also carry streaming video packets.
  • RTP Control Protocol (RTCP) Provides out-of-band control information for an RTP flow. Every RTP flow has a corresponding RTCP flow that reports statistics on the call. RTCP is used for quality of service (QoS) reporting.

Successfully integrating connection-oriented voice traffic in a connectionless IP network requires enhancements to the signaling stack. In some ways, the user voice protocol must make the connectionless network appear more connection oriented through the use of sequence numbers. Table 5-1 provides examples of how various VoIP components and protocols map to the seven-layer OSI model.



VoIP Service Considerations

In traditional telephony networks, dedicated bandwidth for each voice stream provides voice with a guaranteed delay across the network. Because bandwidth is guaranteed in the TDM environment, there is no variable delay (jitter). Configuring voice in a data network requires network services with low delay, minimal jitter, and minimal packet loss. Bandwidth requirements must be properly calculated based on the CODEC that is used and the number of concurrent connections. QoS must be configured to minimize jitter and loss of voice packets. The PSTN offers uptime of 99.999 percent, also known as the five nines of availability. A system that is up 99.999 percent of the time experiences only five minutes of down time in an entire year. To match the availability of the PSTN, the IP network must be designed with redundancy and failover mechanisms. Additionally, security policies must be established to address both network stability and voice-stream security.

Table 5-2 lists the issues associated with implementing VoIP in a converged network and solutions that address these issues.