Showing posts with label ip telephony. Show all posts
Showing posts with label ip telephony. Show all posts

Sunday, July 31, 2011

The IP-Based Voice Network


Voice started out on analog phone lines. Each pair of copper wires was dedicated to one specific phone, and to nothing else. This notion of a dedicated circuit has its advantages. It provides complete isolation of whatever might be going on with that line from the circumstances and problems of other phones in the network. No amount of calls being placed on a neighbor's line can make the original line itself become busy. This isolation and invariance is necessary for voice networks to function when unexpected circumstances occur, and ensures that the voice network is reliable in the face of massive fluctuations in the system. Provisioning is simple, as well, with one line per phone at the edge.
The problem with the concept of the dedicated line is that it is extremely wasteful. When the phone is not in use, the line stays empty. No other calls can be placed on that line. Even when a call is in place, the copper wire is fully occupied with carrying the voice traffic, a small bandwidth application, and a tremendous amount of excess signal capacity exists. Dedicated wires might make sense for short distances between the phone and some next-level aggregation equipment, but these dedicated lines were used as trunks between the aggregators, causing tremendous waste from both idleness and lost bandwidth. But probably the property that caused the most complications with wireline networking was that the dedicated line is not robust. If network problems occur-the bundle of cables is cut, or some intermediate equipment fails and can't do its job-all lines that are attached along that path are brought down with it. Digital telephone networks started to eliminate some of the problems inherent to the oneline dedication of early circuit switching. By having digital processes encode and carry the voice, more voice calls could be multiplexed onto each line, better using the bandwidth available on the copper wire. Furthermore, by allowing for hop-by-hop switching with smarter switches between trunks, failures along one trunk could be accommodated. However, the network was still circuit-switched. A voice line could be used only for voice. Even where voice circuits were set aside for data links, the link is either fully in use or not at all. The granularity of the 64kbps audio line, the DS0, became a burden. Running applications that are not always on and have massive peak throughput but equally meek average throughput requirements meant that provisioning was always an expensive proposition: either dedicate enough lines to cover the peak requirement case, and pay for all of the unused capacity, or cap the capacity offered to the application. Furthermore, these circuits needed to be considered, managed, and monitored rather separately. The hard divisions between two circuits became a hard division between applications. Voice networks were famous for their reliability, strict clockwork operation—and complexity. They were not for easy-to-set-up, easy-to-move operations. The wires are drawn once and carefully, and the switches and intermediate equipment is set up by a team of dedicated and expensive experts who do nothing but voice all day. If you were serious about voice, you operated your own little phone company, complete with dedicated operators. If not, your only option was to have the phone company run your phone network for you.
Along came packet-switched networks. Sending small, self-contained messages between arbitrary endpoints on a network inherently made sense for computers. The idea of sending a message quickly, without tying up lines or going through cumbersome setup and teardown operations removed the restrictions on wasted lines. Although it was still true that lines could remain idle when not being used, the notion of allowing these packets of information into the line as the fundamental concept, rather than requiring continuous occupation and streaming, meant that lines that carried aggregated traffic from multiple users and multiple messages could be used more efficiently. If the messages were short enough, one line might do. No concerns about running out of lines and having the needed, or only, path to the receiver blocked. Instead, these messages could just be queued until space was available.
Along with this whole new way of thinking about occupying the resources came a different way of thinking about addressing and connecting the resources. In the early days, a phone number used to encode the exact topological location of the extension. Each exchange, or switch with switchboard operator, had a name and number, and calls were routed from exchange to exchange based on that number first. Changes to the structure or layout of the telephone system would require changes to the numbers. Packet-switching technologies changed that. Lines themselves lost their names and numbers. Instead, those names and numbers were moved to the equipment that glued the lines together. Every device itself now had the address. The binding of the addresses to the topology of the network remained, at some level. Devices could not be given any arbitrary address. Rather, they needed to have addresses that were similar to their neighbors. The notion of exchange-to-exchange routing was retained.
This notion, though, proved to be a burden. Changes to the network were quite possible, as either more devices needed addresses, or more new "exchanges" were added to the network. Either way, the problem of figuring out how to route messages through the network remained. The original design had each router know which lines needed to be used to send the messages along their way. The router might not know how the message should get to the final destination, but it always knew the next step, and could direct traffic along the right roads to the next intersection, where the next router took over. As the number of intersections increased, and the number of devices expanded, the complexity of maintaining these routing tables exploded. A way was needed for neighboring routers to find out about each other, and more importantly, to find out about what end devices they knew routes to. Thus, the routing protocol was born. These protocols spoke from router to router, exchanging information on a regular basis, ensuring that routers always had recent information on what destinations were valid and how to get there from here. But another thing happened. This idea of exchanging the routes had another benefit, in that it allowed the network itself to be restructured, or to fail in spots, and yet still be able to send traffic. Routers did not need to know the entire path to the destination, only the next hop. If a router knew two, different next hops for the same message, and one of the routes went down, the router could try the second one. If the router lost all of its paths to a particular set of destinations, the router before it could learn about that, and avoid using that path to get the messages through. If there was a way to get the message there, the network would find it, through the process of convergence, or agreement over time on the consistency of whether and how messages could be sent. The network became resilient, and point failures would not stop traffic from flowing.
This is the story of the Internet, and of all the protocols that make it work. Clearly, the story is simplified (and perhaps romanticized to highlight the point at hand), but the fundamentals are there. Circuit switching is difficult to manage, because it is incredibly wasteful and inflexible. Packet switching is much simpler to manage, and can recover from failures.
The Internet grew up on top of the lines offered by the circuit-switched technologies, but used a better way to dedicate the resources. It wasn't long before someone realized that voice itself could be put over these packet-switched lines. At first, that might sound wasteful, as using a digital line to carry a packet containing voice can never be more efficient than using that line to carry the same bits of voice directly because of the packet overhead. But packet networking technologies matured, and the throughputs offered on simple point-to-point links grew much faster than did the corresponding uses of the same copper line for digital voice-at least, in the enterprise. And the advantages of using amultipurpose technology allowed these voice over IP pioneers to use the network's flexibility and lack of dedication to one purpose to add to the voice over IP offerings quickly, without requiring retooling of physical wires. The ways in which provisioning was thought about changed, and the idea that voice and data networks can perhaps use the same resources became a compelling reason to try to save deployment and management costs.
There are a tremendous number of resources available for understanding the intricacies of how IP networks operate, including details on how to manage routing protocols and large trunk lines. Here, we will explore how voice fits into the packet-based IP network.

Saturday, April 3, 2010

H.323 | IP Telephony-Related Standards



Add a Note HereTo many people, the very term H.323 has become a synonym for those of IP telephony and multimedia. Most products that implement the multimedia technologies—starting with PCs and extending to gatekeepers and media gateways—have implemented the set of standards commonly referred to as H.323. For this reason, the convergence products refer to H.323 systematically.
Add a Note HereITU-T Recommendation H.323 specifies an umbrella standard for real-time multimedia communications over packet networks. The standard refers extensively to other ITU-T Recommendations for certain specifics while defining the relevant system components and how these components interact with each other. Most important among the referred ITU-T Recommendations are H.225.0 and H.245, which specify the protocols used between the H.323 components for call and media control.
Add a Note HereH.323 was first developed by the ITU-T Study Group 15. As a result of the ITU-T reorganization in 1997 to consolidate multimedia-related work spread across multiple study groups, the work has been moved to newly formed Study Group 16 since then.
Add a Note HereThe initial H.323 Recommendation, entitled “Visual Telephone Systems and Equipment for Local Area Networks (LANs) that Do Not Provide Guaranteed Quality of Service (QoS),” was approved in 1996. As the title suggests, the Recommendation had a specific scope concerning a particular type of packet networks. Over the next two years, in response to the growing public interest in the Internet, the scope of H.323 was considerably extended to cover metropolitan area networks, intranetworks, and internetworks. Consequently, a new version (publicly know as version 2) of ITU-T Recommendation H.323 was approved in 1998. The Recommendation also received a new title—“Packet-Based Multimedia Communications Systems.” The rest of the section describes the major aspects of this Recommendation.

Add a Note HereCall and Channel
Add a Note HereH.323 draws on the constructs of calls and channels for modeling a communication session. A call is defined as point-to-point communications between two H.323 endpoints. (An endpoint can both call and be called. It can also send or receive—or both send and receive—media streams.) A typical call begins with a call initiation attempt issued by the calling endpoint to the called endpoint and ends with a termination request from either endpoint. Specifically, H.323 divides the life cycle of a call into the following phases:

§  Add a Note HerePhase A. Call setup (that is, initiation of a call).
§  Add a Note HerePhase B. Initial communication and capability exchange (that is, determination of capabilities supported by endpoints and the endpoint to serve as the master at times of conflicts).
§  Add a Note HerePhase C. Establishment of audiovisual communication.
§  Add a Note HerePhase D. Call services (for example, increase of bandwidth and addition of conferencing parties during the call).
§  Add a Note HerePhase E. Call termination.
Add a Note HereChannels are used as building blocks for calls: A collection of channels between two endpoints makes up a call. Conceptually, channels (normally unidirectional) are used to transmit signaling messages and media streams. Channels can be either reliable or unreliable. Reliable channels (for example, TCP connections) are used to carry signaling messages (for example, H.225.0 and H.245 messages), and unreliable channels (for example, RTP sessions) are used to carry media streams.

Add a Note HereSystem Components

Add a Note HereFigure 1Figure 1depicts an H.323 system consisting of typical H.323 components, including the terminal, multipoint control unit (MCU),gateway,and gatekeeper. With the exception of the gatekeeper, these components can serve as endpoints. Before getting into the detail of the components, we should point out an important H.323 requirement: Its components must interwork with multimedia communications terminals for other types of network connections.
Figure 1: H.323 system.
Source: ITU-T Recommendation H.323: Figure 1.

Add a Note HereThis interworking consideration resulted in adoption of the Q.931 access protocol as the basis for the protocols of Recommendations H.225.0 and H.245.
Terminal
Add a Note HereA terminal provides the real-time audio and, optionally, video and data communications capabilities for the direct use of users in a point-to-point call or multipoint conference. Figure 2 depicts the internals of a terminal. The H.323 Recommendation prescribes that a terminal include an audio codec unit, system control unit, H.225 layer, and network interface. It also defines each of those elements, with the exception of the network interface, which is noted as being out of the Recommendation’s scope. We briefly summarize the defined elements here.

Figure 2: H.323 terminal.
Source: ITU-T Recommendation H.323: Figure 4.

Add a Note HereAs shown in Figure 2, several audio codec standards are specified in H.323. In particular, the G.711 codec must be supported by any H.323 audio device. This support is prescribed for a good reason: G.711 is the coding scheme used in the PSTN for digitizing voice; it is considered the benchmark voice codec. Other coding schemes (such as G.723.1 and G.729) are optional, however.
Add a Note HereThe system control unit performs signaling operations that concern the communications between the terminal and other endpoints or gatekeepers. It provides for call control, capability exchange, logical channel control, and signaling of command and indications. As shown in Figure 2, these functions must use the mechanisms defined in Recommendations H.225.0 and H.245, which we discuss later in this section.
Add a Note HereFinally comes the H.225.0 layer, which packs the media (a combination of audio, data, and video) streams and control messages for transmission and unpacks the received packets through the network interface. As the name of the layer implies, the specifics of packaging are defined in H.225.0. An important prescription is that RTP must be used to carry audio and video streams over unreliable logical channels. Another is that there must be no fragmentation of H.225.0 and H.245 signaling or control messages across transport packet data units.
Gateway
Add a Note HereThe gateway provides the functions that are required for interworking between an H.323 terminal on a packet network and an ISDN terminal or POTS telephone of the PSTN (as depicted in Figure 1). Through gateways, IP-based telephones are connected with a billion or so PSTN telephones. Specifically, the gateway provides a conversion function for the transmission format, as well as call control and logical channel control messages. It may have the characteristics of a terminal or an MCU, but the choice (terminal or MCU) is left to the manufacturer. The gateway communicates with other H.323 endpoints or gatekeepers using the same means as H.323 terminals. Its communications with PSTN terminals are beyond the scope of the H.323 Recommendation.
Add a Note HereBecause it has an important role in IP telephony, the gateway issue is tackled by various standards bodies. Several new interfaces and protocols are being developed to support large-scale deployment of IP telephony services.
Gatekeeper
Add a Note HereThe gatekeeper is optional in an H.323 system. Yet, when present, it plays an important role—as its name implies. The gatekeeper provides the following services:
§  Add a Note HereAddress translation. Translates an alias address (for example, a telephone number or an e-mail address) to a network address (for example, an IP address). This function is particularly important in scenarios where a telephone on the PSTN is attempting to call a PC on an IP network. It is also important when determining the location of a gateway to the PSTN.
§  Add a Note HereAdmission control. Authorizes network access using the registration, admission, and status (RAS) messages defined in H.225.0. The rules or policies for authorization are unspecified, however, so that they can be customized for a given situation. Examples: (1) admit all requests or (2) admit only requests from subscribers.
§  Add a Note HereBandwidth control. Handles bandwidth change requests from an endpoint. The requests and responses must use the corresponding RAS messages. The H.323 Recommendation leaves open how bandwidth requests should be handled.
§  Add a Note HereZone management. Manages a zone, the collection of all endpoints registered with and managed by one and only one gatekeeper. The gatekeeper, in turn, must support the registration and management of all endpoints registered in the zone. The H.323 Recommendation does not specify the rules governing the geographic or logical composition of a zone, nor does it specify how two gatekeepers communicate with each other across zones. Related methods for communications between administrative domains can be found in a separate Recommendation—H.225.0 Annex G.
Add a Note HereIn addition, the gatekeeper may optionally provide the following services:
§  Add a Note HereCall control signaling. Call signaling messages between endpoints may be passed with or without the involvement of the gatekeeper, as illustrated in Figures 3 and 4. If the gatekeeper is involved (this case is called gatekeeper-routed call signaling), the call signaling messages are routed through the gatekeeper; otherwise, they are passed directly between the endpoints (this case is known as direct endpoint call signaling). The choice of the call signaling method belongs to the gatekeeper. In the response to an endpoint’s admission request, the gatekeeper must indicate the call signaling method. Note that gatekeeper-routed call signaling is of particular relevance to service providers and enterprise network managers. The routing method supports collection of calling activities at a central place and provides an entry point for additional policy enforcement and service processing during a call, thereby enabling advanced resource management and services.

Figure 3: Gatekeeper-routed call signaling.
Source: ITU-T Recommendation H.323: Figure 9.

Figure 4: Direct endpoint call signaling.
Source: ITU-T Recommendation H.323: Figure 10.

§  Add a Note HereCall authorization. The authorization policy (unspecified by the Recommendation) can be based on, for example, restricted access to a gateway, time of day, type of service subscription, and bandwidth availability.
§  Add a Note HereBandwidth management. A call request or bandwidth request may be rejected because of bandwidth limitations. Theoretically, the gatekeeper could also instruct an ongoing call to reduce its bandwidth usage. The criteria for determining whether there is bandwidth available are outside the scope of H.323.
§  Add a Note HereCall management. The gatekeeper may maintain a list of ongoing H.323 calls and provide call management based on the information. For example, for a call to a busy terminal, the gatekeeper can redirect the call or simply not make an attempt to establish the call.
Multipoint Control Unit (MCU)
Add a Note HereThe MCU provides control functions to support conferences of three or more endpoints. It manages conference resources and negotiates with the endpoints the modes of communications. Optionally, the MCU may also provide functions, such as mixing and switching, for processing the media streams it receives before distributing them to endpoints. Mixing is the operation for combining multiple-input media streams into one single output stream; switching is the operation for selecting an input media stream for output to an endpoint. The MCU uses H.245 messages and procedures for establishing multipoint communications between the endpoints.

Add a Note HereSignaling Procedures
Add a Note HereH.323 also stipulates the procedures the communicating endpoints should follow when exchanging signaling messages throughout a call. It specifies the sequencing of relevant H.225.0 (including RAS) and H.245 messages for every phase of a call in various scenarios. In particular, the call setup procedures cover the following scenarios concerning the role of gatekeepers:
§  Add a Note HereNeither of the endpoints is registered with a gatekeeper
§  Add a Note HereBoth endpoints are registered with the same gatekeeper
§  Add a Note HereEach endpoint is registered with a different gatekeeper
§  Add a Note HereOnly the calling endpoint is registered with a gatekeeper
§  Add a Note HereOnly the called endpoint is registered with a gatekeeper
Add a Note HereNote that the call setup procedures support a signaling method known as fast connect, which allows the establishment of media channels without the use of H.245 signaling. As a result, media channels can be opened for sending and receiving media information with as few as one round-trip signaling message exchange.

Tuesday, March 30, 2010

Real-Time Transport | IP Telephony-Related Standards

Deals with the standards that are pertinent to the mechanisms of carrying voice and video over IP networks. These standards are essential to interworking with the PSTN because IP telephony gateways need to convert the IP voice and video payload into a form that is accepted by the PSTN and, conversely, translate the PSTN voice and video payload into a form that is accepted by IP networks. The gateways also need to reconstruct the original voice or video stream to be as close to the original as possible. Naturally, such reconstruction should retain the real-time properties of the original stream. In addition, an interactive application—such as a two-person voice call—also requires that the transport service itself be fast, reliable, and perceived as “free” of jitter (that is, high variation in delay) to maintain the perception of a real-time interaction.

These real-time transport requirements explain why the protocol suite, developed by the Audio/Video Transport (avt) IETF working group (see www.ietf.org/html.charters/avt-charter.html) has been called Real-Time Transport Protocol (RTP) in RFC 1889 (Schulzrinne et al., 1996). RTP has been designed for multicast, as well as point-to-point, transmission and is accompanied by its quality control component, Real-Time Control Protocol (RTCP). Both protocols are carried by the User Datagram Protocol (UDP).

RTP specifies the header of the packets that carry streams of encoded audio or video samples. This encoding is performed by a device (or software module) called a coder; the subsequent decoding is performed by a decoder, but for full-duplex communications, both are usually combined in a codec. RTP specifies the payload format, which, in turn, identifies a specific codec. (The avt working group has also developed a number of RFCs that deal with payload formats.) The codec header, which is appended to the RTP header, determines the format of the attached encoded data unit (called a frame).

Since UDP does not guarantee sequencing (that is, arrival of packets in the order they were sent), this function is assisted by RTP, which stipulates the inclusion of sequence numbers in packets. Sequence numbers are used at the receiver not only to reconstruct the original sequence, but also to keep count of lost packets (one of the quality of service statistics fed back to the sender via RTCP).

RTP deals with any jitter by time-stamping packets. At the receiving end, the play-out devices buffer the packets and then reconstruct the stream at the original rate. Another synchronization mechanism is the marker bit of the header, which, according to RFC 1889, “is intended to allow significant events such as frame boundaries to be marked in the packet stream.”

The RTCP packets are sent to exactly the same addresses as the RTP ones, but on different ports. The primary function of RTCP is to carry, from receivers to senders, the statistics on the number of lost packets, jitter, and round-trip delays. RTCP carries sender reports in the opposite direction. The statistics are used by senders to adjust encoding rates (and, possibly, the choice of codecs) in order to use less bandwidth. In addition, the statistics are useful for network management as the mechanism to detect the type and location of network problems (such as congestion). In addition to supporting quality control, RTCP performs the following functions:

·         Synchronization of video and audio streams
·         Identification of session participants (by their full names, telephone numbers, and e-mail addresses)
·         Session control (through indication that a user is leaving the session and user-to-user control messages)

Real-Time Streaming Protocol (RTSP), developed in the Multiparty Multimedia Session Control (mmusic) working group, is a network remote control for multimedia services, as defined in RFC 2326 (Schulzrinne et al., 1998). The main purpose of the protocol is to control a device for so-called stored media [for example, a compact disc (CD) player, tape recorder, and so on]. But the control here actually encompasses playing the device, which evolves the transfer of the stream across the network. The applicability of this protocol to the task of integrating the PSTN and the Internet can be found in the areas of voice and video messaging. Like SIP, RTSP is also a descendant of HTTP, but unlike SIP, RTSP maintains a virtual connection identifier by assigning a session identifier in the beginning of the session and then keeping it in all messages relevant to the session. RTSP defines its own URL in reference to the media servers. RTSP can also interwork with SIP, as explained in Schulzrinne and Rosenberg (1999).