Académique Documents
Professionnel Documents
Culture Documents
Author's Acknowledgments
We would like to thank ALLAH for helping us in our work and giving us patience till we finished. Then of course we would like to thank:
Prepared By
ADNAN ADEL AMIN MOHAMMAD INAS ADEL YOSEF ELTIJANI OSMAN MOHAMMAD HANAFY ALI AHMED REFAT TWFIQ MOHAMMAD ADEL MORSY MOHAMMAD ABD EL-MAKSOUD MOHAMMAD IBRAHIM MEDHAT IBRAHIM AMGAD EHAB SCANDAR
TABLE OF CONTENTS
Chapter1: Voip Overview.......7 1.1 Brief history..............................................................................................................8 1.2 Advantages and disadvantages of VOIP...................................................................8 1.3 IP Networking Overview..........................................................................................9 1.4 Real-Time Voice in a Best-Effort IP Internetwork.................................................10 1.5 Packet Loss, Delay, and Jitter.................................................................................11 1.6 Consistent Throughput............................................................................................14 1.7 Reordering of Voice Packets...................................................................................16 1.8 Reliability and Availability.....................................................................................18 Chapter2: Major Voip Protocols...21 2.1 Overview........................................................................................................22 2.2 RTP and RTCP......................................................................................................24 2.2.1 Introduction.....................................................................................................24 2.2.2 RTP functions..................................................................................................24 2.2.3 RTP Protocol Architecture (Protocol layering)...............................................24 2.2.4 RTP Concepts and Terms....................................................................25 2.2.4.1 Sessions.....................................................................................................25 2.2.4.2 Synchronization sources............................................................................27 2.2.4.3 Mixers................................................................................................27 2.2.5 RTP Protocol Definition..................................................................................28 2.2.5.1 Fixed RTP Header Format.........................................................................28 2.2.5.2 Extended RTP Header Format...................................................................31 2.3 Reducing Header Overhead with CRTP...........................................................31 2.4 RTCP Packet Structure..........................................................................................32 2.4.1 RTCP Packet Types.........................................................................................33 2.4.2 Message Encapsulation....................................................................................36 2.5 CRTP Packet Components...............................................................................38 2.6 When to Use RTP Header Compression..........................................................38 Chapter3: Sip Protocol...40 3.1 Overview.........................................................................................................41 3.2 Components of SIP..........................................................................................42 3.3 SIP Messages...................................................................................................44 3.4 Status Codes....................................................................................................46 3.5 SIP Addressing................................................................................................47 3.6 Call Setup Models............................................................................................49 4
The major advantage of VOIP is cost saving (although do not expect immediate cost savings due to the upgrading of existing infrastructure and systems implementation). In addition to the financial savings, there are a number of additional benefits; it is innately scalable, allowing the quick and easy addition of new terminals and connections. The voice data can be easily processed using a standard PC, allowing call monitoring, voicemail, and a range of other features to be implemented. 9
1.3 IP Networking Overview This topic provides an overview of IP networking and some of the inherent challenges when conveying voice over an IP network.
IP is a connectionless network protocol. Connectionless networks generally do not participate in signaling. The concept of session establishment exists between end systems, although the connectionless network remains unaware of the virtual circuit (VC). IP resides at the network layer of the Open System Interconnection (OSI) protocol stack. Ther efore, it can transport IP packets over deterministic and nondeterministic Layer 2 protocols, such as Frame Relay or ATM. IP can be used to communicate across any set of interconnected networks and is equally suited to both LAN and WAN communication. 10
The IP network was originally designed to carry data. Data networks were not designed to carry voice traffic. Although data traffic is best-effort traffic and can with stand some amount of delay, jitter, and loss, voice traffic is real-time traffic that requires a certain quality of service (QoS). In the absence of any special QoS parameters, a voice packet is treated as just another data packet. The user must have a well-engineered network, end to end, when running delay-sensitive applications such as VoIP. Fine-tuning the network to adequately support VoIP involves a series of protocols and features geared toward QoS. Example: Real-Time Voice Delivery Issues
11
In traditional telephony networks, voice has a guaranteed delay across the network by strict bandwidth a ssociation with each voice stream. Configuring voice in a data network environment requires network services with low delay, minimal jitter, and minimal packet loss. Over the long term, packet loss, delay, and jitter will all affect voice quality, as follows:
12
Delay: End-to-end delay is the time that it takes the sending endpoint to send the packet to the receiving endpoint. End-to-end delay consists of the following two components: Fixed network delay: You should examine fixed network delay during the initial design of the VoIP network. The International Telecommunication Union (ITU) standard G.114 states that a oneway delay budget of 150 ms is acceptable for high- quality voice. Research at Cisco Systems has shown that there is a negligible difference in voice quality scores using networks built with 200-ms delay budgets. Examples of fixed network delay include propagation delay of signals between the sending and receiving endpoints, voice encoding delay, and voice packetization time for various VoIP codecs. Variable network delay: Congested egress queues and serialization delays on network interfaces can cause variable packet delays. Serialization delay is a constant function of link speed and packet size. The larger the packet and the slower the link clocking speed, the greater the serialization delay. Although this ratio is known, it can be considered variable because a larger data packet can enter the egress queue at any time before a voice packet. If the voice packet must wait for the data packet to serialize, the delay incurred by the voice packet is its own serialization delay, plus the serialization delay of the data packet in front of it. 13
14
Example: Packet Loss, Delay, and Jitter Problems The effect of end-to-end packet loss, delay, and jitter can be heard as follows: The calling party says, .Good morning, how are you? With end-to-end delay, the called party hears, ...Good morning, how are you? With jitter, the called party hears, .Good..morning, how..are you? With packet loss, the called party hears, .Good m..ning, w are you? 1.6 Consistent Throughput This topic describes the methods that you can use to ensure consistent delivery and throughput of voice packets in an IP internetwork. Throughput is the actual amount of useful data that is transmitted from a source to a destination. The amount of data that is placed in the pipe at the originating end is not necessarily the same amount of data that comes out at the destination. The data stream may be affected by error conditions in the network; for 15
In the traditional telephony network, voice had guaranteed bandwidth associated with each voice stream. Cisco IOS software uses a number of techniques to reliably deliver real-time voice traffic across the modern data network. These techniques, which all work together to ensure consistent delivery and throughput of voice packets, include the following: Queuing: The act of holding packets so that they can be handled with a specific priority when lea ving the router interface. Queuing enables routers and switches to handle bursts of traffic, measure network congestion, prioritize traffic, and allocate bandwidth. Cisco routers offer several different queuing mechanisms that can be implemented based on traffic requirements. Low Latency Queuing (LLQ) is one of the newest Cisco queuing mechanisms. Congestion avoidance: Congestion avoidance techniques monitor network traffic loads. The aim is to anticipate and avoid congestion at common network and internetwork bottlenecks before it becomes a problem. These techniques provide preferential treatment under congestion situations for premium (priority) class traffic, such as voice. At the same time, these techniques maximize network throughput and capacity use and minimize packet loss and delay. Weighted random early detection (WRED) is one of the QoS congestion avoidance mechanisms used in Cisco IOS software. Header compression: In the IP environment, voice is carried in Real-Time Transport Protocol (RTP), which is carried in User Datagram Protocol (UDP), which is then put inside an IP packet. This constitutes 40 bytes of RTP/UDP/IP header. This header size is large when compared to the typical voice payload of 20 bytes. Compressed RTP (CRTP) reduces the headers to 2 bytes in most cases, thus saving considerable bandwidth and providing for better throughput. 16
There are many QoS tools that can be used to ensure consistent throughput. When these mechanisms are employed, voice traffic on the network is assured priority and its delivery is more consistent. 1.7 Reordering of Voice Packets This topic describes how RTP ensures consistent delivery order of voice packets in an IP internetwork. In traditional telephony networks, voice samples are carried in an orderly manner through the use of timedivision multiplexing (TDM). Because the path is circuit-switched, the path between the source and destination is reserved for the duration of the call. All of the voice samples stay in order as they are transmitted across the wire. Because IP provides connectionless transport with the possibility of multiple paths between sites, voice packets cannot arrive out of order at the destination. Because voice rides in UDP/IP packets, there is no automatic reordering of packets.
17
RTP provides end-to-end delivery services for data that require real-time support, such as interactive voice and video. According to RFC 1889, the services provided by RTP include payload-type identification, sequence numbering, time stamping, and delivery monitoring.
18
Example: Reordering Voice Packets In the figure, RTP reorders the voice packets through the use of sequence numbers before playing them out to the user. The table illustrates the various stages of packet reordering by RTP.
19
To provide telephony users the same or close to the same level of service as they experience with traditional telephony, the reliability and availability of the data network takes on new importance. Reliability is a measure of how resilient a network can be. Efforts to ensure reliability may include choosing hardware and software with a low mean time between failure, or installing redundant hardware and links. Availability is a measure of how accessible the network is to the users. When a user wants to make a call, for example, the network should be accessible to that user at any time a call is required. Efforts to ensure availability may include installing proactive network management to predict failures before they happen, and taking steps to correct problems in design of the network as it grows. When the data network goes down, it may not come back up for minutes or even hours. This delay is una cceptable for telephony users. Local users with network equipment, such as voice enabled routers, gateways, or switches for IP Phones, now find that their connectivity is terminated. Administrators must, therefore, provide an uninterruptible power supply (UPS) to these devices in addition to providing network availability. Previously, depending on the type of connection the user had, they received their power directly from the telephone company central office (CO) or through a UPS that was connected to their key switch or PBX in the event of a power outage. Now the network devices must have protected power to continue to function and provide power to the end devices. Network reliability comes from incorporating redundancy into the network design. In traditional telephony, switches have multiple redundant connections to other switches. If either a link or a switch becomes unavailable, the telephone company can route the call in different ways. This is why telephone companies can claim a high availability rate. High availability encompasses many areas of the network. In a fully redundant network, the 20
21
22
The major VoIP protocols include the following: H.323: An ITU standard protocol for interactive conferencing. The ITU standard protocol was originally designed for multimedia in a connectionless environment, such as a LAN. The H.323 is an umbrella of standards that defines all aspects of synchronized voice, video, and data transmission. H.323 defines end-to-end call signaling.
MGCP: An emerging standard for PSTN gateway control or thin device control. Specified in RFC 2705, MGCP defines a protocol to control VoIP gateways 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 may not contain a full voice-signaling stack, such as H.323. In essence, any time an event such as off hook 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. SIP: A detailed protocol that specifies the commands and responses to set up and tear down calls. It also details features such as security, proxy, and transport (TCP or UDP) services. SIP and its partner protocols, Session Announcement Protocol (SAP) and Session Description Protocol (SDP), provide announcements and information about multicast sessions to users on a network. SIP defines end-toend 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
23
24
2.2.1 Introduction RTP is defined in IETF RFC 1889, along with a profile for carrying audio and video over RTP in RFC 1890. RTP provides end-to-end delivery services, but it does not provide all of the functionality that is typically provided by a transport protocol. In fact, RTP typically runs on top of UDP to utilize its multiplexing and checksum services. Other transport protocols besides UDP can carry RTP as well. RTP does not: Provide any mechanism to guarantee quality-of-service, but relies on lower-layer services to do so. Guarantee delivery or prevent out-of-order delivery. 2.2.2 RTP functions Segmentation/reassembly done by UDP (or similar). Resequencing (if needed). Loss detection for quality estimation, recovery. Intra-media synchronization: remove delay jitter through playout buffer. Intra-media synchronization: drifting sampling clocks. Inter-media synchronization (lip sync between audio and video). Quality-of-service feedback and rate adaptation. Source identification. 2.2.3 RTP Protocol Architecture (Protocol layering)
25
2.2.4 RTP Concepts and Terms 2.2.4.1 Sessions An RTP session is the sending and receiving of RTP data by a group of participants. For each participant a session is a (pair of) transport addresses used by a participant to communicate with the group. If multiple media types are communicated by the group, the transmission of each medium constitutes a session.
26
27
A basic RTP message consists of Synchronization source identifier of sender. Sequence number. Timestamp. Media data unit(s).
2.2.4.3 Mixers An RTP mixer is an intermediate system that receives & combines packets of one or more RTP sessions into a new packet. Streams may be transcoded, special effects may be performed. A mixer will typically have to define synchronization relationships between streams. Resulting stream is multicast to a new group address.
28
Mixers are synchronization sources. Sources that are mixed together become contributing sources (CSRC).
2.2.5.1 Fixed RTP Header Format The RTP header provides the timing information necessary to synchronize and display audio and video data and to determine whether packets have been lost or have arrived out of order. In addition, the header specifies the payload type, thus allowing multiple data and compression types. RTP is tailored to a specific application via auxiliary profile and payload format specifications. As an example, a payload format might specify what type of audio or video encoding is carried in the RTP packet. Encoded data can be compressed before delivery. 29
The first twelve octets are present in every RTP packet. The fields have the following meaning: Version (V): 2 bits This field identifies the version of RTP. The version defined by this specification is two (2). (The value 1 is used by the first draft version of RTP and the value 0 is used by the protocol initially implemented in the "vat" audio tool). Padding (P): 1 bit If the padding bit is set, the packet contains one or more additional padding octets at the end which are not part of the payload. The last octet of the padding contains a count of how many padding octets should be ignored. Padding may be needed by some encryption algorithms with fixed block sizes or for carrying several RTP packets in a lower-layer protocol data unit. Extension (X): 1 bit: If the extension bit is set, the fixed header is followed by exactly one header extension. CSRC count (CS cnt): 4 bits The CSRC count contains the number of CSRC identifiers that follow the fixed header. Marker (M): 1 bit For voice packets, the marker bit indicates the beginning of a talk spurt. Beginning of talk spurts are good opportunities to adjust the play out delay at the receiver to compensate for differences between the sender and receiver clock rates as well as changes in the network delay jitter. Packets during a talk spurt need to be played out continuously, while listeners generally are not sensitive to slight variations in the durations of a pause.
30
Payload type (PT): 7 bits This field identifies the format of the RTP payload and determines its interpretation by the application. A profile specifies a default static mapping of payload type codes to payload formats. Additional payload type codes may be defined dynamically through non-RTP means. An RTP sender emits a single RTP payload type at any given time; this field is not intended for multiplexing separate media streams. Sequence number: 16 bits The sequence number increments by one for each RTP data packet sent, and may be used by the receiver to detect packet loss and to restore packet sequence. The initial value of the sequence number is random (unpredictable) to make known-plaintext attacks on encryption more difficult, even if the source itself does not encrypt, because the packets may flow through a translator that does. Timestamp: 32 bits The timestamp reflects the sampling instant of the first octet in the RTP data packet. The sampling instant must be derived from a clock that increments monotonically and linearly in time to allow synchronization and jitter calculations. The clock frequency is dependent on the format of data carried as payload and is specified statically in the profile or payload format specification that defines the format. SSRC: 32 bits
31
CSRC list: 0 to 15 items, 32 bits each The CSRC list identifies the contributing sources for the payload contained in this packet. The number of identifiers is given by the CC field. If there are more than 15 contributing sources, only 15 may be identified. CSRC identifiers are inserted by mixers, using the SSRC identifiers of contributing sources. For example, for audio packets the SSRC identifiers of all sources that were mixed together to create packets are listed, allowing correct talker indication at the receiver. 2.3 Reducing Header Overhead with CRTP RTCP is the control protocol that works in conjunction with RTP. Each participant in an RTP session periodically transmits RTCP control packets to all other participants. Feedback of information to the application can be used to control performance and for diagnostic purposes. RTCP performs the following four functions. Provide information to application: The primary function is to provide information to an application regarding the quality of data distribution. Each RTCP packet contains sender and/or receiver reports that report statistics useful to the application. These statistics include number of packets sent, nu m-
32
33
2.4.1 RTCP Packet Types RFC 1889 defines several RTCP packet types to carry a variety of control information:
34
35
36
37
Given the number of protocols that are necessary to transport voice over an IP network, the packet header can be large. You can use CRTP headers on a link-by-link basis to save bandwidth. Using CRTP compresses the IP/UDP/RTP header from 40 bytes to 2 bytes without UDP checksums and from 40 bytes to 4 bytes with UDP checksums. RTP header compression is especially beneficial when the RTP payload size is small; for example, with compressed audio payloads between 20 and 50 bytes. In addition, CRTP works on the premise that most of the fields in the IP/UDP/RTP header do not change, or that the change is predictable. Static fields include source and destination IP address, source and destination UDP port numbers, as well as many other fields in all three headers. For those fields where the change is predictable, the CRTP process is illustrated in the following table:
38
Compression works on a link-by-link basis and must be enabled for each link that fits these requirements. You must enable compression on both sides of the link for proper results. Enabling compression on both 39
40
41
SIP uses other IETF protocols to define other aspects of VoIP and multimedia sessions; for example, URLs for addressing, DNS for service location, and Telephony Routing over IP (TRIP) for call routing. SIP supports personal mobility and other Intelligent Network (IN) telephony subscriber services through name mapping and redirection services. Personal mobility allows a potential participant in a session to be identified by a unique personal number or name.
42
SIP is a peer-to-peer protocol. The peers in a session are called UAs. A UA consists of two functional components: 43
Typically, a SIP UA can function as a UAC or a UAS during a session, but not both in the same session. Whether the endpoint functions as a UAC or a UAS depends on the UA that initiated the request: the initiating UA uses a UAC and the terminating UA uses a UAS. From an architectural standpoint, the physical components of a SIP network are grouped into the following two categories: User agents: SIP user agents include the following devices: IP telephone: Acts as a UAS or UAC on a session-by-session basis. Software telephones and Cisco Systems SIP IP Phones initiate SIP requests and respond to requests. Gateway: Acts as a UAS or UAC and provides call control support. Gateways provide many services, the most common being a translation function between SIP user agents and other terminal types. This function includes translation between transmission formats and between communications procedures. A gateway translates between audio and video signals and performs call setup and clearing on both the IP side and the SCN side.
SIP servers: SIP servers include the following types: Proxy server: Intermediate component that receives SIP requests from a client, then forwards the requests on behalf of the client to the next SIP server in the network. The next server can be another proxy server or a UAS. Proxy servers can provide functions such as authentication, authorization, network access control, routing, reliable request transmissions, and security. Redirect server: Provides a UA with information about the next server that the UA should contact. The server can be another network server or a UA. The UA redirects the invitation to the server identified by the redirect server. Registrar server: Requests from UACs for registration of their current location. Registrar servers are often located near or even collocated with other network servers, most often a location server. Location server: An abstraction of a service providing address resolution services to SIP proxy or redirect servers. A location server embodies mechanisms to resolve addresses. These mechanisms can include a database of registrations or access to commonly used resolution tools such as finger, rwhois, Lightweight Directory Access Protocol (LDAP), or operating-systemdependent mechanisms. A registrar server can be modeled as one subcomponent of a location server; the registrar server is partly responsible for populating a database associated with the location server.
44
SIP communication involves the following two messages: Request from a client to a server: Consists of a request line, header lines, and a message body Response from a server to a client: Consists of a status line, header lines, and a message body
45
In the request line, SIP uses a .method. to indicate the action to be taken by the responding component (usually a server). The following request methods indicate the action that the responding component should take: INVITE: A client originates the INVITE method to indicate that the server is invited to participate in a session. An invitation includes a description of the session parameters. ACK: A client originates the ACK method to indicate that the client has received a response to its earlier invitation. BYE: A client or server originates the BYE method to initiate call termination. CANCEL: A client or server originates the CANCEL method to interrupt any requests currently in progress. CANCEL is not used to terminate active sessions.
46
SIP response messages are sent in response to a request and indicate the outcome of request interpretation and execution. Responses take one of three basic positions: success, failure, or provisional. A status code reflects the outcome of the request. 3.4 Status Codes The following response messages indicate the status of a request: 1xx.Informational: Provisional response. Indicates that the request is still being processed. 2xx.Successful: Indicates that the requested action is complete and successful. 3xx.Redirection: Indicates that the requestor requires further action; for example, a redirect server responds with .moved. to advise the client to redirect its invitation.
47
3.5 SIP Addressing To obtain the IP address of a SIP UAS or a network server, a UAC performs address resolution of a user identifier. This topic describes address formats, address registration, and address resolution.
An address in SIP is defined in the syntax for a URL with sip: or sips: (for secure SIP connections) as the URL type. SIP URLs are used in SIP messages to identify the originator, the current destination, the final recipient, and any contact party. When two UAs communicate directly with each other, the current destination and final recipient URLs are the same. However, the current destination and the final recipient are different if a proxy or redirect server is used. An address consists of an optional user ID, a host description, and optional parameters to qualify the a ddress more precisely. The host description may be a domain name or an IP address. A password is associated with the user ID, and a port number is associated with the host description. Example: SIP Addressing Variants
48
A SIP address is acquired in several ways: by interacting with a user, by caching information from an earlier session, or by interacting with a network server. For a network server to assist, it must recognize the endpoints in the network. This knowledge is abstracted to reside in a location server and is dynamically acquired by its registrar server.
49
To contribute to this dynamic knowledge, an endpoint registers its user addresses with a registrar server. The figure illustrates a REGISTER mode request to a registrar server. To resolve an address, a UA uses a variety of internal mechanisms such as a local host table, DNS lookup, finger, rwhois, or LDAP, or it leaves that responsibility to a network server. A network server uses any of the tools available to a UA or interacts through a nonstandard interface with a location server. The figure illustrates a SIP proxy server resolving the address by using the services of a location server. 3.6 Call Setup Models If a UAC recognizes the destination UAS, the client communicates directly with the server. In situations in which the client is unable to establish a direct relationship, the client solicits the assistance of a network server. This topic illustrates three interworking models for call setup: direct, using a proxy server, and u sing a redirect server.
50
When a UA recognizes the address of a terminating endpoint from cached information, or has the capacity to resolve it by some internal mechanism, the UAC may initiate direct (UAC-to- UAS) call setup procedures. Direct setup is the fastest and most efficient of the call setup procedures. However, direct setup has some disadvantages. It relies on cached information or internal mechanisms to resolve addresses, which can become outdated if the destination is mobile. In addition, if the UA must keep information on a large number of destinations, management of the data can become prohibitive. This makes the direct method nonscalable. Direct call setup proceeds as follows: The originating UAC sends an invitation (INVITE) to the UAS of the recipient. The message i ncludes an endpoint description of the UAC and SDP. If the UAS of the recipient determines that the call parameters are acceptable, it responds positively to the originator UAC. The originating UAC issues an ACK. At this point, the UAC and UAS have all the information that is required to establish RTP sessions between them.
51
The proxy server procedure is transparent to a UA. The proxy server intercepts and forwards an invitation to the destination UA on behalf of the originator. llac fo tnemeganam dna lortnoc gnizilartnec yb dohtem tcerid eht fo seussi eht ot sdnopser revres yxorp A si AU eht ot tifeneb ehT . ytilibapac noitulos er sserdda etad -ot -pu dna cimanyd erom a gnidivorp dna putes eht htiw etacinummoc llits nac tey , AU noitanitsed eht fo setanidrooc eht nrael ot deen ton seod ti taht gnigassem erom seriuqer revres yxorp a gnisu taht era dohtem siht fo segatnavdasid ehT . AU noitanitsed gnihsilbatse fo elbapacni si AU eht , sliaf revres yxorp eht fI . revres yxorp eht no ycnedneped a setaerc d na . snoisses nwo sti When a proxy server is used, the call setup procedure is as follows: The originating UAC sends an invitation (INVITE) to the proxy server. The proxy server, if required, consults the location server to determine the path to the recipient and its IP address. The proxy server sends the invitation to the UAS of the recipient. If the UAS of the recipient determines that the call parameters are acceptable, it responds positively to the proxy server. The proxy server responds to the originating UAC. The originating UAC issues an ACK. The proxy server forwards the ACK to the recipient UAS. The UAC and UAS now have all the information required to establish RTP sessions. 52
A redirect server is programmed to discover a path to the destination. Instead of forwarding the invitation to the destination, the redirect server reports back to a UA with the destination coordinates that the UA should try next. A redirect server offers many of the advantages of the proxy server. However, the number of messages involved in redirection is fewer than with the proxy server procedure. The UA has a heavier workload because it must initiate the subsequent invitation. When a redirect server is used, the call setup procedure is as follows: 1. The originating UAC sends an invitation (INVITE) to the redirect server. 2. The redirect server, if required, consults the location server to determine the path to the recipient and its IP address. 3. The redirect server returns a .moved. response to the originating UAC with the IP address obtained from the location server. 4. The originating UAC acknowledges the redirection. 5. The originating UAC sends an invitation to the remote UAS. 6. If the UAS of the recipient determines that the call parameters are acceptable, it responds positively to the UAC. 7. The originating UAC issues an acknowledgment. The UAC and UAS now have all the information required to establish RTP sessions between them.
53
54
It is important to remember the order of the layers in the OSI model. Doing so creates a better understanding of the network data flow. It is also needed to pass an exam. Many acrostics can be used to remember the order, but possibly the most common is Each layer is separated, or encapsulated, from each other layer. This means that each layer can function on its own. Each layer thinks it is talking
directly to the same layer on the remote computer (see Figure 12) through a virtual link. Furthermore, each layer can only communicate with the layers above and below it. In fact, the layer doesnt know that
56
Finally, the flow of data starts at the Application layer of the sending computer, flows down the layers, across the wire to the receiving computer, and then back up the layers to the Application layer (see Figure 4).
57
58
Data Encapsulation Using the OSI Model As we read through the description of the OSI layers, a question may arise: Since there may be more than one application using more than one communication partner using more than one protocol, how does the data get to its destination correctly?
4.3 The TCP/IP Protocol Suite The TCP/IP protocol suite, also referred to as the Internet protocol suite, is the set of communications protocols that implements the protocol stack on which the Internet and most commercial networks run. It is named after the two most important protocols in the suite: the Transmission Control Protocol (TCP) and the Internet Protocol (IP). The TCP/IP protocol suitelike the OSI reference modelis defined as a set of layers. Upper layers are logically closer to the user and deal with more abstract data, relying on lower layer protocols to translate data into forms that are transmitted physically over the network. From the above figure, it is clear that: The Application layer in TCP/IP roughly corresponds to the Application, Presentation and Session layers (i.e. Layers 7, 6 and 5 respectively) in OSI. The Transport layer in TCP/IP corresponds to the Transport layer (i.e. Layer 4) in OSI. The Internet layer in TCP/IP corresponds to the Network layer (i.e. Layer 3) in OSI. The Network Interface layer in TCP/IP corresponds to the Data Link layer (i.e. Layers 2) in OSI. The Hardware layer in TCP/IP corresponds to the Physical layer (i.e. Layers 1) in OSI.
59
Some people combine the Network Interface and Hardware layers when talking about TCP/IP, and therefore TCP/IP has only four layers in that case. Also, be aware that networking people tend to use terms like Layer 2 and Layer 3 instead of Data Link layer and Network layer respectively. So when they talk about a Layer 3 protocol, what they mean is a protocol that functions at the Network layer in OSI.
Application Layer The application layer of the TCP/IP model corresponds to the application layer of the OSI reference model. Some well known examples of application level entities within the TCP/IP domain are: FTP/Telnet/SSH HTTP/Secure HTTP (SHTTP) POP3/SMTP SNMP Transport Layer The transport layer of the TCP/IP model maps fairly closely to the transport layer of the OSI model. Two commonly used transport layer entities are TCP and User Datagram Protocol (UDP) Internet Layer 60
61
Addressing. IP headers contain 32-bit addresses which identify the sending and receiving hosts. These addresses are used by intermediate routers to select a path through the network for the packet. Fragmentation. IP packets may be split, or fragmented, into smaller packets. This permits a large packet to travel across a network which can only handle smaller packets. IP fragments and reassembles packets transparently. Packet timeouts. Each IP packet contains a Time to Live (TTL) field, which is decremented every time a router handles the packet. If TTL reaches zero, the packet is discarded, preventing packets from running in circles forever and flooding a network. Type of Service. IP supports traffic prioritization by allowing packets to be labeled with an abstract type of service. Options. IP provides several optional features, allowing a packet's sender to set requirements on the path it takes through the network (source routing), trace the route a packet takes (record route), and label packets with security features.
IP defines the format of the packets and how to handle them when sending or receiving. The form of the packets is called an IP datagram as shown in the following figure.
Version: 4 bits The Version field indicates the format of the internet header. This course describes version 4. IHL: 4 bits Internet Header Length is the length of the internet header in 32 bit words, and thus points to the beginning of the data. Note that the minimum value for a correct header is 5.
62
first byte specifies the network portion remaining bytes specify the host portion the highest order bit of the network byte is always 0 network values of 0 and 127 are reserved there are 126 class A networks there are more than 16 million host values for each class A network
64
Class B Addressing
the first two bytes specify the network portion the last two bytes specify the host portion the highest order bits 6 and 7 of the network portion are 10 there are more than 16 thousand class B networks there are 65 thousand nodes in each class B network
Class C Addressing
the first three bytes specify the network portion the last byte specifies the host portion the highest order bits 5, 6 and 7 of the network portion are 110 there are more than 2 million class C networks there are 254 nodes in each class C network
Reserved IP Addresses The following IP addresses are reserved for special purposes, and must NOT be assigned to any host.
Network Addresses : The host portion is set to all zero's (129.47.0.0) Broadcast Address : The host portion is set to all one's (129.47.255.255) Loop back Addresses : 127.0.0.0 and 127.0.0.1
Private IP Addresses
65
4.6 Transport Layer protocols Within the TCP/IP protocol suite, the two most common transport layer entities are the UDP and the TCP. 4.6.1 User Datagram Protocol (UDP) The User Datagram Protocol is very simple. The PDU used by UDP is called a datagram. Datagrams are considered unreliable, in that there is no guarantee datagrams will be received in the correct order, if at all. If reliability of the information transmitted is needed, UDP should not be used. While UDP is unreliable, the lack of error checking and correction make UDP fast and efficient for many less data intensive or time sensitive applications, such as the Domain Name Service (DNS), the Simple Network Management Protocol (SNMP), and the Dynamic Host Configuration Protocol (DHCP) and the Routing Information Protocol (RIP). UDP is also well suited for streaming video. Basic Protocol Operation The UPD protocol is simple in operation. When invoked by the application layer, the UDP protocol performs the following operations: 1. Encapsulates the user data into UDP datagrams 2. Passes the datagram to the IP layer for transmission At the opposite end, the UDP datagram is passed up to UDP from the IP layer. UDP then removes the user data from the datagram and presents it upward to the application layer. Ports A port is a number that identifies the application using the UDP service. It can be thought of as an address for applications. For example, the application level protocols used for e-mail, POP3 and SMTP, are assigned standard port numbers. The port number is used by the UDP client on the receiving end to know what application to pass user data to. The UDP Packet Structure The UDP packet structure is illustrated in Figure. It consists of 5 fields, some of which are optional:
66
4.6.2 Transmission Control Protocol (TCP) In the TCP/IP protocol suite, TCP is the intermediate layer between IP below it, and an application above it. Using TCP, applications on networked hosts can establish reliable connections to one another. The pr otocol guarantees in-order delivery of data from the sender to the receiver. Basic Protocol Operation The Transmission Control Protocol is connection-oriented, meaning user data is not exchanged between TCP peers until a connection is established between the two end points. This connection exists for the duration of the data transmission. TCP connections have three phases: 1. Connection establishment 2. Data transfer 3. Connection termination Connection Establishment To establish a connection, TCP uses a 3-way handshake. Before a client attempts to connect with a server, the server must first bind to a port to open it up for connections. This is called a passive open. Once the passive open is established, a client may initiate an active open. The server then sends an acknowledgement to the client. At this point, both the client and server have received an acknowledgement of the connection. Data Transfer A few key features set TCP apart from UDP: Error-free data transfer Ordered-data transfer Retransmission of lost packets Discarding of duplicate packets 67
Error Free Data Transfer Error-free data transfer is guaranteed by TCP. It does this by calculating a 16-bit checksum over the TCP packet (header and data). At the receiving end, if the checksum does not match the contents of the packet, it is discarded. Because the sending side does not receive an acknowledgement of the discarded packet, it is retransmitted. Ordered-Data Transfer Streams of data called segments are used by TCP peers to speak to each other. The segments can be quite large, so TCP breaks up the segments into smaller units of data. These units are encapsulated in the TCP packet that is passed to the IP protocol. Each unit of data is assigned a sequence number, which becomes part of the TCP packet. At the receiving end, the TCP module uses the sequence numbers in the packet to reconstruct the user data in the correct order. Retransmission of Lost Packets When transmitting large amounts of data, it is not unusual for some information to get lost along the way. In order to guarantee reliable transfer of data, TCP requires an acknowledgement of each packet it sends. This acknowledgement is sent by the TCP module at the receiving host. If an acknowledgement is not received within a specified time period, it will be retransmitted. Discarding Duplicate Packets The TCP client retransmits packets that it determines to be lost. The TCP module at the receive side may eventually receive packets that were considered to be lost after the sending side has retransmitted the data. This may result in the receiving end receiving two or more copies of the same packet. The receiving end TCP module uses the unique sequence numbers in the packet to determine if data duplication has occurred and discards any packets it determines to be duplicates. Congestion Throttling The final property of TCP is congestion throttling or flow control. The goal is for TCP to be able to send data to the receiving end at the fastest rate possible, without overwhelming it. When TCP first begins transmitting data to the far end, it sets a timer. The timer determines how long the sender should wait for a packet to be acknowledged before retransmitting it. If all packets are received well before the timer expires, TCP will incrementally increase the transmission speed, until packets begin to become unacknowledged during the time out period. When a significant number of packets have to be retransmitted, TCP slows down the rate at which it sends data to the other end. Connection Termination The connection termination phase uses, at most, a four-way handshake, with each side of the connection terminating independently. When an end point wishes to stop its half of the connection, it transmits a special packet with a flag indicating it is finished. The other end acknowledges the flag. A typical connection termination includes this two-phase handshake from both ends of the connection.
68
69
4.7 Ethernet Ethernet is a family of network access layer frame-based computer networking technologies. As a network access layer standard, it defines: A common addressing format A means of accessing and sharing the network media Several wiring and signaling standards Ethernet at the MAC Sub layer At the MAC sub layer, Ethernet peers communicate by exchanging frames, which encapsulate the Internet layer datagram. Ethernet frames are transmitted in the network using globally unique 48-bit physical layer addresses. The MAC address, as it is known, typically comes programmed into an Ethernet device by the manufacturer. A portion of the MAC address is a manufacturer identifier, assigned by the IEE E registration authority. The remaining portion is assigned by the manufacturer. Generally speaking, any device directly connected to an Ethernet LAN must have a MAC address, particularly if it operates above the physical sub layer. This includes computers, routers, network printers, network attached storage devices, and so forth. Accessing the Physical Medium Originally, Ethernet used a single shared coax attached to every device on a network. A scheme known as Carrier Sense Multiple Access with Collision Detection (CSMA/CD) was developed to govern the way the computers on the network shared the channel. CSMA/CD makes the following assumptions: 70
71
Header Preamble7-bit sequence used for synchronizing receiver to transmitter. (10Mb/s Ethernet). Start Frame Delimiter8-bit sequence (10101011). Destination AddressDestination MAC address. Source AddressSource MAC address. Typeindicates the protocol sending the frame (DIX only). LengthIndicates the length of data field (number of LLC data bytes) (IEEE 802.3 only). Payload Logical Link Control (LLC)governs the assembly of data at the data link (Layer 2) level. DataPayload contained in a field between 46 bytes to just over 1500 bytes in length. Pad0 bits added to the data field if there are fewer than 46 bytes of data in that field.
Trailer Cyclical Redundancy Check (CRC)Detects DIXonly transmission errors. Frame Check Sequence (FCS)Detects transmission errors and provides quality of service at receiving end. Ethernet Versions Ethernet has evolved significantly since the original thick-coax 10 Mb/s network of the 1980s. Several different versions of the Ethernet standard are in use today. Fast Ethernet IEEE 802.3u is commonly referred to as Fast Ethernet or 100Base-T. Because Fast Ethernet offers a choice of 10 or 100 Mb/s bandwidth, the standard also allows for equipment that can auto negotiate the two speeds. Fast Ethernet can be cabled over either twisted-pair or fiber optic cables. Gigabit Ethernet Gigabit Ethernet works much the same way as 10 Mb/s and100 Mb/s Ethernet, only faster. It uses the same frame format, full duplex, and flow control methods. Additionally, it takes advantage of CSMA/CD when in half-duplex mode, and it supports Simple Network Management Protocol (SNMP) tools. Gigabit Ethernet takes advantage of jumbo frames to reduce the frame rate to the end host. Jumbo frames are between 64 and 9215 bytes. Gigabit Ethernet can be transmitted over twisted pair cables or optical fiber. 10 Gigabit Ethernet The operation of 10 Gigabit Ethernet (IEE 802.3ae) is similar to that of lower speed Ethernet networks. It maintains the IEEE 802.3 Ethernet frame size and format which preserves layer 3 and higher protocols. 72
When the PCs transmit data frames, the switch record the source MAC address and port number in a table called the MAC address table. The MAC address table on the switch in Figure 2 may look like this:
73
74
When the router receives a packet for the 192.168.0.0 network, it would route the packet to the companys LAN via Ethernet Interface 1. Similarly when the router receives a packet for the 10.0.0.0 network, it would route the packet to the trusted partners network via Serial Interface 2. When the router receives a packet for a network other than 192.168.0.0 and 10.0.0.0, it would route the packet to the Internet via Serial Interface 1. Layer 3 routing is generally performed by microprocessor-based engines, which require CPU cycles to examine each packets Layer 3 header. This can become a bottleneck due to a latency of packet examination and processing.
75
76
5.4.3 PBX functions: Functionally, the PBX performs four main call processing duties: Establishing connections (circuits) between the telephone sets of two users (e.g. mapping a dialed number to a physical phone, ensuring the phone isn't already busy) Maintaining such connections as long as the users require them (i.e. channeling voice signals between the users) Disconnecting those connections as per the user's requirement Providing information for accounting purposes (e.g. metering calls) In addition to these basic functions, PBXs offer many other calling features and capabilities, with different manufacturers : Auto dialing. Automatic ring back. Call forwarding on busy or absence. Call waiting. Conference call. Music on hold. Voice mail. Welcome Message. Speed Dialing. 5.4.4 Hosted PBX systems: A hosted PBX system delivers PBX functionality as a service, available over the Public Switched Telephone Network (PSTN) and/or the internet Hosted PBXs are typically provided by the telephone company, using equipment located in the premises of the telephone company's exchange. This means the customer organization doesn't need to buy or install PBX equipment and the telephone company can use the same switching equipment to service multiple PBX hosting accounts. Instead of buying PBX equipment, users contract for PBX services from a hosted PBX service pr ovider. The first hosted PBX service was very feature-rich compared to most premise-based systems of the time. In fact, some PBX functions, such as follow-me calling, appeared in a hosted service before they became available in hardware PBX equipment Today, it is possible to get hosted PBX service that includes far more features than were available from the first systems of this class, or to contract with companies that provide less functionality for simple needs. 78
79
80
5.10 COU(central office unit): Public telephone lines connected to traditional PBX systems are commonly referred to as "CO-lines". Over the years that PBX systems have been used. The cou includes many basic circuits for the telephone exchange system which are: Ring detector circuit Hook switch (dial pulse) circuit. Melody player and holding circuit. 5.10.1 Ring Detector: This stage converts the incoming bell signals into pulses. These pulses are counted by Timer1 in the micro controller. The system hold the (Outer) call after two bells, two bells have 37 pulses. The ring circuit must provide electrical isolation between telephone line and modem electronics. This ring isolation is usually done using one optoisolator circuit, The optoisolator output can be easily connected to digital electronics, but the optoisolator input side needs more electronics: one capacitor for not letting DC to pass through optoisolator, one resistor to limit the current passing through optoisolator LED and one reverse connected diode in parallel with optoisolator LED to prevent negative voltages from damaging the LED. This is the basic ring detection circuit. 5.10.2 Ring detector Circuit Schematic:
5.10.5 Melody Player : This circuit is used to record a special short msg or melody to be played if the hold circuit is to be used ,then the melody is transmitted to holding circuit through C10. 5.10.6 Melody player Circuit Schematic:
5.11 SLIC (subscriber line interface card ): The slic is the interface unit between the PBX unit and the extensions. this unit is required to detect every status from an usual telephone set for the Controlling circuit ( telephone exchange ) also it provides the ringing control to the extensions.
82
5.12 Switching Unit: the function of the switching unit is to organize the calls handling between subscribers whatever the calling party was from extension to extension(intercom) or from extension to external call and vice versa. In our case the switching unit is computized and integrated at the microcontroller chip . The microcontroller is the basic and only controller for all the exchange operations at that may occur in the PBX. It controls many functions such as: Intercom calls. Call transfer. call forwarding Msg or music in hold. 5.13 Tone Generator: Tone generator is responsible for producing the different required tones at different cases such as dial tone which means that the telephone is ready to make a call and the busy tone which means that the called party is not available for making a connection now. this stage is based on the CD4093 NAND chip where gate A oscillates at high frequency and gate B oscillates at a different low frequency then a third gate say C AND the output of A or B to produce different tones . One for dial and other for busy. 5.13.1 Tone generator Circuit Schematic: 83
5.14 Ring Generator: Ring generator is the part of the system that is used to provide ringing for any telephone instrument. The circuit rings the phone in a completely realistic manner until someone answers. The problem is the ringer needs a high AC voltage to make a satisfactory ring which is done by the bell voltage transformer which Boost up the signal to the desired output signal depending on the transformer voltage. 5.15 DTMF Receiver (decoder): DTMF acronym stands for dual tone multi frequency. The DTMF decoder recognizes sequences of DTMF tones from a standard touch tone phone. 5.15.1 How does it work? When you press the buttons on the keypad, a connection is made that generates two tones at the same time. A "Row" tone and a "Column" tone. These two tones identify the key you pressed to any equipment you are controlling.
84
When you press the digit 1 on the keypad, you generate the tones 1209 Hz and 697 Hz. Pressing the digit 2 will generate the tones 1336 Hz and 697 Hz. Sure, the tone 697 is the same for both digits, but it take two tones to make a digit. 5.15.2 Dtmf decoder Circuit Schematic:
5.16 Power Supply : Power supply unit is a unit that provides different supply voltages for all different electronics in the system where there is the microcontroller which needs 5v DC supply ,also 12v DC required for all analog electronics and relays. And the 55v AC for the ringing voltage. 5.16.1 Power supply circuit schematic:
85
5.17 Software PBX: An IP-PBX can exist as physical hardware, or can carry out its functions virtually, performing the callrouting activities of the traditional PBX or key system as a software system. The virtual version is also called a "Soft PBX". 5.18 Different Software Used as SoftPBX: There are alot of companies that provides software pbx , they are almost the same .it defers only in the system requirements such as operating system (windows , Linux,...) , VOIP used protocol and some extra not basic pbx features such as voice mail , call recording ....etc. This software are: 3CX. Trixbox. Axon. Pbxnsip. Brekeke.
5.19 Why using trixbox: Key Features: . Support for many Call features such as Call Recording, Call Transfer, Call Waiting and Caller ID Contains many codecs supported such as ADPCM, G.711 , G.726 and iLBC Includes most of Protocols such as H.323, SIP, MGCP, and IAX (Inter-Asterisk Exchange) Purchase cost dramatically lower than a traditional hardware PBX Scaleable - Unlimited extensions and phone lines. No proprietary expansion modules needed! Web based configuration & status indication - Easy phone system management! Reduce long distance and inter office call costs No more expensive proprietary system phones - Use standard SIP phones Eliminate the phone wiring and make moving offices easier
86
So now you have the measures that make you able to decide which one to use dependant on your needs.
87
88
Press the Enter key to start the installation. After initial system detection, you will be asked to select the type of keyboard that you will be using. Use your cursor keys to navigate the keyboard types and use the Tab key to move the focus to the OK or BACK option. Select the appropriate keyboard.Selected US and move the focus to OK and hit [Enter].
89
After system hardware probing is completed, you will be asked to select the Time Zone you are in.
Use your cursor arrow keys to navigate to the appropriate time zone. Use the TAB key to move the focus to OK and hit [Enter] to accept . Next you will be asked to enter your root password (remember this password).
90
After entering and confirming your password, installation will now commence by first formatting the Hard Disk/s. From this point it will take about 30-45 minutes for the installation to be completed and ready for the configuration stage. During this stage, you will see screens similar to the following. Linux and the required files are being installed. All you do is, wait for it to finish.
After Linux is loaded the CD will eject. Take the CD out and wait for the system to reboot. When it reboots, you will be presented with the following screen.
91
After a moment, it will continue and you will see lots of lines of codes. This process will take a while because it is building Asterisk. When Asterisk build is complete, it will reboot itself. Once rebooted, Trixbox is ready for you to continue configuring and make changes to the system default.
92
Create Extensions To create extensions, select the type of trunk e.g. SIP, IAX2, ZAP or Custom, is done from the Create Extension menu illustrated below:
We need to create a few SIP extensions. Therefore you should select Generic SIP Device from the device drop-down list then click Submit. The illustration below is where you create the extension. You will notice a few fields that you will need to populate. The important ones are: User Extension: 100 (thats the extension number I gave for reception) Secret: 100 (for simplicity, I used the extension number as the secret password)
93
94
Click on the red bar on the top of the screen after every time you have submitted a new extension.
95
You will be presented with a log in dialog box. Leave this box blank and select OK to proceed to the DPH-120s web configuration interface.
Select SIP SETTINGS on the left menu. Enter the Registrar Server Domain Name/IP address as 10.0.0.156 Change the Authentication expire time from 3600 >> 240. Select Submit at the bottom of the screen to save this setting.
96
Select SIP ACCOUNT SETTINGS from the menu on the left The Default Account should be set as Account 1 Enter your log in details with your go talk VoIP account details Similarly enter your password Select Submit at the bottom of the screen to save this setting. At this point the DPH-120s will register and show the go talk VOIP username on the display screen of the phone. If all settings are correctly entered, registration will take around 10-30 seconds
97
98
99
Click on the Add button to open the Properties screen. Enter the following fields:
100
101
102
103
Appendix
104
105
106
107
108
110
111
112
113
114
115
116
117
118
Applying and Selection Students from each team should go to the registration page and fill the competition application form then submit the application electronically. The MIE Committee will select the team who will continue in the competition phases based on the info included in the application form. Summer Training The selected 350 students will attended a summer training camp in Cairo or Tanta with accommodation support. The training will include soft skills, business skills and technical training. The training represents an orientation phase for teams to help in enhancing their entrepreneurial skills to take their innovations into market. The training topics are: ## 1 Training Topics
Communication and Presentation Skills Learn how to communicate and show your ideas professionally with different stakeholders in 1-to-1 and Panel situations (sponsors, judgesetc). 2 Teamwork Create a team that can work together effectively, understand each others, handle conflicts and survive united to the end. Negotiation Skills Negotiate with sponsors and different stakeholders targeting a Win-Win deal. 6 Thinking Hats Utilizing a variety of approaches within thinking and problem solving, thus servicing the needs of all individuals concerned. Entrepreneurship Get the vision and spirit of Entrepreneurship and know how to be an entrepreneur.
120
10
11
12
Market Research and Sponsor Engagement Phase Teams should study the market and make a market research with the target of having a project idea that satisfies real need, put an initial technical design and get a sponsor for this idea. At the end of this phase every team must have a sponsor and apply a full proposal containing project details, company information and sponsorship deal to continue to next MIE phases. You have 2 scenarios to get a sponsor for your project; either to contact sponsors on your own or send to one or more of the companies in contact with MIE. In both cases, the sponsor should send to MIE sponsorship confirmation email with the final proposal attached. Submit Final Idea (1st Filtration Point) The final proposal consists of:
121
5 Entrepreneurship and Business Networks There will be also an evaluation meeting at the same time as: o Teams will present their projects, the progress they have achieved, problems that they overcame and problems that still exist to the committee and to other teams. o You will be evaluated by the committee and get advised for the problems either in the team management or in the project progress. Submit 1st Report This is mainly concentrating on the market research phase. It represents a very informative and useful source for you during this period. It's very important to read the Product Design and Development Book
122
ADNAN ADEL AMIN MOHAMMAD ENAS ADEL YOSEF EL TIGANY OTHMAN MOHAMMAD HANAFY ALI
123
124
References [1] Trixbox made easy by Barrie Dempster and Kerry Garrison [2] Trixbox without tears by Ben Sharif [3] Cisco press at Cisco.com [4] Triple a Training Company [5] VoIP for Dummies by Timothy Kelly [5]www.wikipedia.com
125