Voip Technologies: Study & Implementation , Laboratoire SUPINFO des Technologies Cisco http://www.supinfo.com Voip Technologies: Study & Implementation by Voip Technologies: Study & Implementation This program will speak about http://www.supinfo.com VoIP technologies. Chapter 1. Introduction to VoIP Course Objectives: Discover the VoIP Know the advantages and Drawbacks of VoIP Know the different kind of use of VoIP 1. Course 1.1. VoIP, ToIP and the traditional Telephony Sometimes called VoIP (Voice over IP) or ToIP (Telephony over IP), the voice transmission over IT networks is the result of combined permanent needs in communication of our society, and democratization of these data networks. These ones offer an improved reliability for data transport and Internet connection offers increasingly more accessible and interesting. There is a notable difference between VoIP and ToIP. VoIP means real-time flow transport, especially voice, on data networks. VoIP becomes ToIP when it is linked to the traditional telephony network. Thus, ToIP is like a subset of the VoIP, with some constraints imposed by the world of traditional telephony, in particular to respect phone number’s nomenclature. The objective of VoIP is replace, at least for a part, the traditional telephony often expensive, mainly for international calls, by using data networks deployed around the world. The IT networks being built for the data transmission; the voice is thus digitized, through the use of a codec, and then encapsulated into a packet before being transported. The codec used for IP telephony don’t really depend on the protocol used, but rather of the support on software and network devices. The voice transportation on a digital form can be from end to end or more generally partial. In this last case, the international telephone calls might be reduced to local communication cost. Corporation like Skype have widely contributed to demonstrate this real interest on cost killing. The voice digitalization exists for a very long time, and vocal exchanges through computers are not rare since instant messaging for example. There was a too large barrier between the IT world and the world of traditional telephony. The VoIP has really appeared when we began to make the link between data-processing and traditional telephony, jointly to the development and ratification of specific norms and protocols. VoIP exists since many years within companies, depending on existing technology and financial means. A good example is the Cisco Systems company, which has placed from the beginning their own products and services for internal use. Besides, some providers sell their Voice on IP services for more than 10 years. Just like any other new technologies, VoIP increases in popularity when the prices of products had been significantly reduced. The ISP (Internet Service Provider) offer including telephony service has also greatly contributed to cut out VoIP marginalization for personal use. 1.2. Advantages and Drawbacks 1.2.1. Advantages The growing of IP telephony is obvious. This is mainly due to advantages that this technology provides iii http://www.supinfo.com compared to traditional telephony. Among these advantages, we can see the followings: Mobility Unique architecture Economies Added services Mobility: Unfortunately, traditional office telephones can only be present in one location at a time. IP telephones can follow the user whatever he goes, the only real constraint being to have access to the data network. In addition, it is possible to possess multiple IP terminals for the same user (one IP telephone on the office and one Softphone with VPN access when traveling for example), a protocol working on background to manage the current location of the user and the call redirection to the good terminal. Unique architecture: One of the objectives of the IP telephony is to integrate the telephone network to the data network, in order to form a single and unique network. Moreover, it is possible to use only one link to a service provider to transport data (Internet connection), whereas before a traditional telephone link was mandatory. Economies: Another advantage is the cost of the calls. Indeed, a well designed VoIP infrastructure provides lower communication costs, even null in certain cases, whether they are local or international. The possibility of not subscribing to a traditional telephone link permits to do substantial economies. Added services: The most important advantage of VoIP, except the costs, is the virtually unlimited list of services that can be added to it. We can quickly list these ones: Voice Mail: Answering machine synchronized with mail servers, to receive voice messages on emails. Click-to-Dial: Telephone call initiation through an email client (example: Microsoft Outlook). Presence management: Automatic redirection to the nearest terminal from the user. Contact synchronization: Centralization of postal addresses, emails and telephone numbers inside a single directory. 1.2.2. Drawbacks Some advantages may also appear as drawbacks, depending of the case. Thus, we can list the following drawbacks: Unique architecture Cost of the VoIP Quality and reliability Unique architecture: Combining networks together can create problems that shouldn’t exist before. Indeed, the iv http://www.supinfo.com VoIP is an application deployed on a standard network infrastructure just like any other application. Some details must then be taken in account (like QoS, security of transmissions, availability, and strength against network strikes, etc.), in order to guarantee the telephone service. Cost of the VoIP: Unfortunately, the cost of VoIP is mainly linked to the infrastructure and devices used. That’s why some corporations wouldn’t gain something when migrating to VoIP. In general, corporations choose for a progressive transition to VoIP in order to replace, in the long term, the traditional telephones and PABX. This progressive transition is done by using adapters, mainly FXS and FXO. Consequently, except some exceptions, only the brand new corporations or branches choose a complete IP solution, because the data network can be correctly built to support VoIP from the beginning. The other corporations would rather prefer a progressive transition. Quality and reliability: The IP telephony using the data networks, Internet included, to transport the flows, the calls may then undergo some disagreements (packet loss, delay, etc.) harming the general quality of the communication. For example, it is generally well known that a delay below 150 ms is required for an optimal quality. However,it is unfortunately current on certain connections to exceed this delay (medium delay observed on a satellite link is around 500 ms). Moreover, the VoIP being an application traveling across the network, it is then as sensitive as any other application to problems that can happen on this network, like denial of services (DoS and DDoS) or more simply to congestion. 1.3. Kinds of use of VoIP 1.3.1. VoIP at Home More and more, ISP provides a VoIP connection at home. Most of the time, the VoIP is invisible for the customers, they don’t see any changes, they continue to use their analogical phone. But in fact, they use VoIP. They just plug their phone into the router provide by Internet Service Provider (ISP) . With this way, the customers can reduce his cost without any change. Some provider begins to supply a VoIP WiFi channel to allow your mobile phone to use your house phone by WiFi. The goal of that is to increase the roaming of the VoIP. You are at home; you don’t need to care about it, all your communication will be through your internet connection, if you leave your house, you will use your GSM (or the 3G). 1.3.2. VoIP for professionals As you know a company can’t work without communication, for most of them the phone is their principal tool. To reduce cost and increase the potential of this one, they use more and more VoIP. They can provide a phone (virtual or not) for all employees, and allow them to use it to communicate between them. i.e. We have two branch in a company, one in Paris, the other one in Beijing. The employees of this two branch can communicate between them. They reduce the cost of the company, and also increase the communication efficient. 1.4. Providers, devices and services The IP telephony market is quite wide. Numerous corporations have invested on this market, by proposing their solutions. The actual well known names in the VoIP world are: Alcatel Audiocode v http://www.supinfo.com Cirpack Cisco Linksys Quintum RAD Moreover, multiple providers offer their services linked to VoIP. To draw up a list these providers should be impossible, taking into account their number. On the other hand, we can differentiate them in several categories: ISP providing VoIP services: All or nearly almost, the classical Internet providers now offer VoIP services to their clients. We can for example list Telecom Italia, or any other ISP that provides telephone service through boxes. Dedicated VoIP providers for corporations: These providers, sometimes quite new on the VoIP market, are dedicated to offer VoIP solutions to corporations (like Verizon). Dedicated VoIP providers for personal use: These providers (Skype, Vonage, VoIP Buster, etc.) generally only provide access to the VoIP infrastructure, the flow transiting across a classical Internet connection. These solutions are thus limited in functionality and quality of service. They are reserved for personal use. 1.5. The next step of the VoIP VoIP will be able to profit of capacities and virtually unlimited features, as additional services to the simple call, provided by IT networks. The only limit to these services is the imagination of software developers. The future of VoIP is clearly oriented to centralization and multiplication of offered services (IP Centrex platforms), but also to the increased mobility and interoperability with 3G/Wi-Fi systems (« dual mode » smartphones). The IP Centrex solutions begin to be widely available, through multiples platforms. IP Centrex globally corresponds to a centralized service offer based on a single platform, hosted at the provider’s datacenter. The protocols actually in place allow a great flexibility in their use. So, it is theorically possible to let any kind of real-time flow travel on the VoIP network, the limit is on implementation of the corresponding features into softwares and service platforms. Moreover, the new smartphones, having a Wi-Fi interface, allow « dual mode » communications. This system provides the best way to communicate whatever the available environment. If a Wi-Fi hot-spot is near, the VoIP client can then be used. If not, the telephone can automatically switch to the GSM network. vi http://www.supinfo.com Chapter 2. Protocols Course Objectives: Know the different protocols used in VoIP Know the different architectures 1. Course 1.1. Signaling and Flow Transport Lots of protocols are, or were, used to transmit real-time flows over IP networks. It is possible to distinguish two kind protocol families: Signaling protocols Used for call establishment and control. These protocols can be then divided by their working process: Client / Server (asymmetric) Peer-to-Peer (symmetric) Table 2.1. Comparative of protocols Protocol Client/Server Cisco SCCP X MGCP X Peer-to-Peer SIP X H.323 X Flow transport protocols Permit flow traval across the IP network 1.1.1. Signaling Protocols: Client / Server 1.1.1.1. MGCP protocol MGCP (Media Gateway Control Protocol) is a signaling protocol specified in January 2003 by the RFC 3435, and is based on the RFC 3015. It has been developed jointly by the MEGACO work group of the IETF and the ITU-T (International Telecommunication Union – Telecom standardization). MGCP is generally encapsulated in UDP segments, on port number 2427. It uses SDP to describe the media and RTP to transport the flows. Figure 2.1. MGCP architecture 7 Created by XMLmind XSL-FO Converter. MGCP is a client/server architecture composed by the following elements: Call Agent It’s the softswitch of the VoIP network with MGCP. Its main purpose is to coordinate MG and SG, by indicating them which one has to accomplish the required functions. It is the Call Agent that receives the notifications and redirects the functions of the VoIP infrastructure. Media Gateway (MG) At least one MG has to be present in the MGCP architecture. It mainly focuses on flow conversion between circuits (TDM) and packets (IP). More generally, it works on the flows. Signaling Gateway (SG) At least one SG has to be present in the MGCP architecture if there is a connection with another telephone network. It permits to convert signaling information (calls, etc.) from and to another network. Endpoint It is the source of signal. This can be a telephone, a conference server or an interactive voice response (IVR) server for example. It can have multiple Call Agents in a single infrastructure, thus guaranteeing availability through redundancy and load balancing of call management. Then, the different functions of the VoIP network are delegated to one or more MGCP gateways (MG and/or SG). It’s possible to centralize multiple functions in a single network device. So, it’s not rare to see servers that integrate a Call Agent, a MG, a SG, and an endpoint (like a conferencing server). 1.1.1.2. Cisco SCCP protocol SCCP is a Cisco protocol employed for the communications in real time as well as the conferences. It’s used by its CallManager platform and its IP phones. The protocol is built around a server, that can be a cluster, and that centralize the entire processing, thus simplifying functions managed by terminals (telephones and IP/TDM gateways). The centralized functions come from simple call processing, to updates of terminal firmwares, through providing multiple services. 8 Created by XMLmind XSL-FO Converter. The advantages of protocol SCCP rest on its weak requirements in memory and load processor. The protocol can be employed within the framework of a made safe LAN, with a quality of sufficient band-width. One of the disadvantages of SCCP is the management of QoS as that of the bandwidth which aren’t taken into account by the protocol. In the same way, protocol CRTP (Compressed Real-time Protocol Transport) is not supported. SCCP has its limits and does not allow either to authenticate distant users, out of the LAN of CME. Figure 2.2. SCCP protocol In spite of the use of a connection VPN, protocol SCCP remains unable to manage the distant users. Each site must have a router Cisco CME to authenticate phones IP locally. Operation through WAN between several routers CME is carried out then by the means of the H.323 protocol. 1.1.2. Signaling Protocols: Peer-to-Peer 1.1.2.1. SIP protocol SIP (Session Initiation Protocol) is a protocol at the application layer (layer 7) of the OSI model. It has been drafted by the MMUSIC (Multiparty Multimedia Session Control) group of the IETF (Internet Engineering Task Force) in March 1999. The guideline was to conceive an easy to implement, scalable and adaptable signaling protocol. In June 2002, a new version of the norm, the RFC 3261, is published. It represents today the fundamentals of the SIPv2 protocol. The purpose of SIP is to establish, modify and terminate multimedia sessions with one or multiple participants, independently to transport layer protocols and without dependencies on the type of established session. A participant can also be invited into a pre-established session. In the same way, a data would be added or deleted from an existing session. A session is a subset of callers and callees that communicate together. Multimedia conferences and phone calls through Internet are examples of sessions. However, SIP is not the only protocol required by communication devices. Indeed, its goal is to make the communication possible, the communication by itself has to be done via another way. This implies that SIP has to be combined with other protocols to obtain a complete multimedia platform. Typically, following the RFC 3261, this implies the following protocols: RTP (Real-time Transport Protocol) To ensure the transport of real-time flows. It encodes and divides data into packets, and then transports them across the IP network. SDP (Session Description Protocol) To describe multimedia session parameters. RTSP (Real-Time Streaming Protocol) To control delivery of streamed flows. 9 Created by XMLmind XSL-FO Converter. MGCP (Media Gateway Control Protocol) For gateways used to control access to the public telephone network (POTS). RTP and SDP are the most often used protocols with SIP. SIP is based on the HTTP protocol, which is also considered as a signaling protocol because it permits to request a specific resource to a server. SIP profits of the tested value of the protocol undoubtedly the most used and recognized in the world. SIP can be transported into TCP or UDP segments. The default port number is 5060, except when using TLS (Transport Layer Security) which use de default port number 5061. 1.1.2.2. H.323 protocol H.323 is a protocol suite worked out by the ITU-T, defining standards for the multimedia communications. The first draft was done in 1996, and the actual version (version H.323v6) arrived in June 2006. The described protocols are grouped in seven categories: Call control and signaling H.225.0 Call signaling protocols and packetization of multimedia flows (uses a subset of Q.931 signaling) H.225.0 / RAS Registration, Admission and Status H.245 Control protocol for multimedia communication Audio codecs G.711 G.722 G.723.1 G.728 G.729 Video codecs H.261 10 Created by XMLmind XSL-FO Converter. H.263 Data transmission T.120 Protocol suite for data transmission (used by real-time collaboration applications) Transportation on the media RTC RTCP Security H.235 Security and encryption for multimedia terminals (H series) Additional services H.450.1: Generic functions for additional services H.450.2: Call transfer H.450.3: Call diversion H.450.4: Call hold H.450.5: Call park and pick-up H.450.6: Call waiting H.450.7: Message waiting indication H.450.8: Name identification services H.450.9: Call completion services for H.323 networks The H.323 communications don’t necessary need a central point. We are in a Peer-to-Peer way of working. So, an H.323 terminal can directly communicate with another H.323 terminal without going across a server. 11 Created by XMLmind XSL-FO Converter. Figure 2.3. H.323 architecture The H.323 architecture is composed by: Terminals Describes the endpoint for each link. It provides two methods for real-time communication with another H.323 terminal, a gateway or a MCU. This communication is composed by a combination of dialogs, data and/or videos. Gateways They establish the connection between H.323 terminals, as well as with terminals using other protocols like POTS, SIP or MGCP. Gatekeepers Provide registering and authentication mechanisms to terminals, permits bandwidth control, ensure translation between telephone number and IP address, and also call transfer for example. MCUs (Multipoint Control Unit) They establish conferences and are composed by: Multipoint Control elected to ensure call signalization and conference control. Multipoint Processor that provides communication and flow mixing. Sometimes, it ensures transcribing of received audio and video flows. 1.1.3. Flow transport protocols 1.1.3.1. RTP protocol RTP, for Real-Time Transport Protocol, has been developed in January 1996. The last version is written in the RFC 3550 published in July 2003. RTP provides end-to-end transport functions adapted to real-time data applications, like audio, video or data simulation flows, across unicast or multicast delivery services. RTP works with RTCP, which is in charge of the QoS and information transportation about participants in a current session. 12 Created by XMLmind XSL-FO Converter. The RTP data is typically transported into UDP segments, application using RTP being generally very few sensitive to packet loss but more on latency. There is no default port number, except for a detail: the RTP flow uses a pair port number and the associated RTCP flow uses the odd port number that follows (RTCP port = RTP port + 1). The services proposed by RTP are the followings: Identification of the load type Sequance numbering Time stamping Delivery monitoring The convenient delivery mechanisms and other QoS guarantees are not done by RTP, but by lower layer protocols. Consequently, RTP believes that the network is reliable. Numerous applications are built to use RTP. Here are some examples: Multimedia conferencing with multiple participants Continuous data storage Distributed interactive simulation Active badge for room access Control and measurements applications 1.1.3.2. RTCP protocol RTCP (Real-Time Transport Control Protocol) is an integral part of the RFC 3550 which also define RTP. This protocol provides different periodic, out-of-band control services for RTP flows. It’s an out-of-band flow because RTP and RTCP packets are distinct. RTCP provides four main functions: Feedback about transmission quality: This is done by using source reports (SR) and receiver reports (RR). Transportation of the source RTP flow identifier (CNAME): Quite useful for example when a receiver has to associate 2 different RTP flows for the same session (voice and video flows of a visioconference). RTCP packets sent by all the participants: This feature permits to all the participants to observe the number of participants in a multimedia session. This also permits to calculate the frequency of sending reports (SR and/or RR) to adapt itself to any number of participants. 13 Created by XMLmind XSL-FO Converter. Minimal control information for a session (optional): This information provides details about the arrival and departure of participants in a conference. It’s then possible, for example, to maintain a real-time list of participants in this conference. Using RTCP is not mandatory but strongly recommended for any session, especially for the ones in a multicast environment (multiple participants). 1.1.3.3. SRTP protocol The SRTP protocol, for Secure RTP, is an evolution of the RFC 3550 answering to authentication confidentiality and integrity problems of transported flows. It’s defined jointly to SRTCP (Secure RTCP) in the RFC 3711 published in March 2004. The confidentiality is ensured by the AES algorithm, which can be implemented via different cipher modes. The authentication and integrity as well as replay protection are ensured by the HMAC-SHA1 algorithm (160 bits fingerprint). The functions of RTP and RTCP are the same in the secured versions. 1.2. Codecs A codec is a compression/decompression algorithm used to represent a signal, generally audio or video, in a digital environment. It exist multiple codecs, each one having differences mainly on the quality of the compressed signal, represented by a MOS (Mean Opinion Score) index, and the calculation load to process the signals. These codecs have multiple criteria in common: Bit rate Sample size (typically 20 or 30 ms) Latency due to sampling (equal to the sample size) Compression/decompression time for the signal (variable latency depending of the algorithm) Number of frames per second Here is a table grouping the most used codecs in the VoIP world, their bit rate, and their used bandwidth on an Ethernet network (believing that 40 bytes are necessary for the sum of UDP, IP and Ethernet headers): Table 2.2. Used bandwidth for different codecs Codec Codect Bit Rate Bandwidth on an Ethernet network G.711 64 Kbps 87.2 Kbps G.723.1 5.3 Kbps 20.8 Kbps G.723.1 6.4 Kbps 21.9 Kbps G.726 24 Kbps 47.2 Kbps G.726 32 Kbps 55.2 Kbps G.728 16 Kbps 31.5 Kbps G.729 8 Kbps 31.2 Kbps 14 Created by XMLmind XSL-FO Converter. So, we can estimate the maximum number of simultaneous calls that can be managed on a link. A bandwidth calculator is available at this URL: http://www.bandcalc.com The throughput from the previous table is for one flow. A telephone communication generally uses two flows, the sending and the receiving, and then we have to take a great care on consequent link choice. 15 Created by XMLmind XSL-FO Converter. Chapter 3. Equipment Course Objectives: Discover the several equipment use in VoIP Know the differences between them Know what is a Gateway and a Gatekeeper 1. Course 1.1. IP Phones An IP phone is a telephone terminal that connects to a network device in place of on a standard telephone jack. Thus, all the telephone communications will no longer travel on a standard telephone line but on a data network. However, it exist two types of IP phones: Wired IP phones Wireless IP phones Figure 3.1. Cisco IP Phone 7970G and Zyxel P2000W 1.2. IP Telephony Softwares The IP telephony softwares, also called « Softphones », permit to call via a computer provided with a headset and microphone, just like if it is a physical telephone with the same features. It exist numerous IP telephony softwares, among the most popular we find: Skype, Live Messenger, Counterpath eyeBeam, and many more. The features and supported protocols depend on the software. So, we have to choose the software based on the platform used. Figure 3.2. CounterPath eyeBeam 16 Created by XMLmind XSL-FO Converter. 1.3. Analog Telephone Adapter (ATA) In order to permit a progressive change to a VoIP infrastructure, FXS type adapters have arrived to connect standard telephones on an IPBX, or conversely to plug a standard telephone architecture (telephones and PABX) to an IP network. Figure 3.3. Cisco ATA 186 and Linksys PAP2 The FXO ports are generally located on IP/TDM gateways. The FXS (Foreign eXchange Subscriber) and FXO (Foreign eXchange Office) ports are the interfaces on a standard telephone network. The FXO port is the downstream interface (going from the telephone to the PABX for example), whereas the FXS port is the upstream interface (going from the PABX to the telephone). Figure 3.4. Exhibit of FXO and FXS at the customer side The FXS port provides to the subscriber tone and electric power supply services. It’s the port that goes to the subscriber. The FXO port mainly provides the local loop termination service by indicating if the headset is hung up or not (on-hook/off-hook). It’s the port that goes to the provider (Telco). 1.4. PABX and IPBX A PABX (Private Automatic Branch eXchange), or PBX (Private Branch eXchange), is a standard telephone switch. This device interconnects multiple standard telephone terminals of a corporation. It provides multiple services like call forward and standby music. It also exists virtual PABX, also called IPBX (Intranet Private Branch eXchange), which are mainly the same than PABX but for a VoIP use. These IPBX are used for example by IP Centrex platforms. 17 Created by XMLmind XSL-FO Converter. 1.5. Cisco Call Manager Express (CCME) CCME (Cisco CallManger Express train) is a solution developed by Cisco for the routers. It allows them to manage the calls and offer different customer services of the network. It is integrated into the router IOS. This solution makes possible to set up an economic VoIP solution with high reliability and without the complexity of deployment of a solution based on servers in a small structure. By this way, it offers the VoIP services for approximately 300 users and 120 IP Phones. Also this solution is compatible with most of management solutions for networks, and theirs materials like routers, switches, gateways, etc... 1.6. Gateways A gateway is a device. It allows converting classic telephony traffic into VoIP. Gateways are used in 2 ways: To convert incoming telephony traffic to the VoIP line, and to internet-connect VoIP networks. Optional features can be added to a gateway such as Gatekeepers, billing systems, Softswitches, and network management systems. A Gatekeeper is use to manage Gateways and MCU’s (multipoint control units) and also to make the routing. The gatekeeper can implement security policies on gateways, improve the QoS (Quality of Service) and finally make a call path between gateways and PSTN (Public Switched Telephone Network). It manages the bandwidth. Allocate a certain amount of bandwidth for a call and select codec to use. It acts as a regulator of bandwidth to protect the network against bottlenecks (congestion). The gatekeeper is responsible of routing function. It must redirect calls to right person by the proper bridge. Also, is able to handle many other functions such as conference call. Finally, it can supervise several gateways. The gatekeeper, by its features routing and security, is able to manage gateways to ensure that any appeal reaches its destination with the best quality service possible. It assures redundancies bridges in order to bring about any call. It knows at any moment the status of each bridge and route calls to accessible gateways. Security is very important on a Gateway, it must be considered like a server. If your gateway is attack by DoS (Denial of Service), it can alter the process of your VoIP network. Also, an intrusion can be dangerous for the confidentiality of VoIP communication. Figure 3.5. Exhibit of a Gateway at the customer Side 1.6.1. Comparative of Cisco Gateway Hardware 18 Created by XMLmind XSL-FO Converter. Table 3.1. Cisco AS5300 Processor Type 150-MHz R4700 Memory 64 MB DRAM Ethernet (RJ-45) Two (one 10 MB, one 10/100 MB) Wan Interface Options Quad T1/PRI (RJ-45); Quad E1/PRI (RJ-45) Table 3.2. Cisco AS5300 Processor Type 250-MHz RISC processor Memory 256-MB (default) to 512-MB (maximum) Ethernet (RJ-45) Two (one 10 MB, one 10/100 MB) Wan Interface Options Eight-port CT1, CE1, PRI termination Table 3.3. Cisco AS5850 Processor Type 650-MHz Broadcom 1250 dual core RISC processor Memory 1.0-GB synchronous dynamic RAM (SDRAM) with Error Correction Code (ECC) Ethernet (RJ-45) Dual gigabit load-balanced redundant Ethernet ports with gigabit interface controller (GBIC) interfaces for user traffic; Dual 10/100-Mbps Ethernet port with RJ45 connector for management traffic or call agent or softswitch control traffic Wan Interface Options One CT3 and 216 DSP feature boards; 24 CE1/CT1 feature boards; One STM-1 feature board 19 Created by XMLmind XSL-FO Converter. Chapter 4. Communication between SIP and Asterisk Course Objectives: Know the SIP protocol funtionning Install Asterisk Configure some options 1. Course 1.1. Definitions Dialog: Exchange between two User Agents for a given time. A dialog is a group of transactions. Caller: The entity that initiate a session with an INVITE request. Invitation: INVITE request. Callee: The receiver of an INVITE request. Message: Request or response exchanged by SIP elements. Method: Indicates the type of request sent to a server. For example, the INVITE and BYE requests. UAC (User Agent Client): An UAC is a logical entity that acts as the client in a client/server application. It’s in charge of sending requests and receiving responses. UAS (User Agent Server): An UAS is a logical entity that acts as the server in a client/server application. It’s in charge of receiving requests and sending responses. URI (Uniform Resource Identifier): An URI identifies an entity by using syntax, similar to the one used for emails, in this form « sip:identifier@domain » (for example sip:john@sip.labo-voip.com). Proxy Server: Intermediate entity, at the same time client and server, which provides routing service to clients that try to reach other clients. Consequently, the Proxy server does requests by the name of other clients. Redirect Server: UAS that redirects to a set of alternative URIs by generating 3xx responses to requests it 20 Created by XMLmind XSL-FO Converter. receives. Registrar Server: Server that accepts REGISTER requests it receives and stores the information. It’s used to identify/authenticate users. Request: Sent by a client to a server, this SIP message permits to call upon a particular operation. Response: Sent by a server to a client, this SIP message indicates the status of a previously sent request by a client to the server. Session: Multimedia flow exchanged between a set of callers and callees. Transaction: Is composed of all the exchanged messages between a client and a server, from the first request to the final response. Stateful Proxy: Maintains the state for transactions between client and server. Stateless Proxy: Transmits each request and response it receives without maintaining the state of the transaction. 1.2. SIP functionality 1.2.1. User Agents They are logical entities that use SIP to find another destination entity. The User Agents can be (non exhaustive list): Softphones (software applications) IP phones (wired or Wi-Fi) Smartphones and PDAs IPBX IP/TDM gateways Figure 4.1. Simple example of a basic SIP architecture 21 Created by XMLmind XSL-FO Converter. Each User Agent has an UAS and an UAC. It’s these logical entities that permit to send responses and receive requests for the first one, send requests and receive responses for the second one. It’s important to remember that the client or server state is only for the transaction duration. Thus, a User Agent is in turn client and server. 1.2.2. Proxy server Important piece of the SIP architecture, it provides routing service to messages sent by a client, and by maintaining certain important functions like: The actual location of the callee The accounting (for billing) Etc. The messages can travel across a set of Proxy servers, until reach the one who knows the callee location. Figure 4.2. Transfer between Proxy servers to reach the destination It exist two types of Proxy server explained just below: Stateless Server Simple and quicker than the Stateful server, it transmits messages independently from the others without keeping in mind the state of the transaction. This fact, the Stateless Server doesn’t provide message 22 Created by XMLmind XSL-FO Converter. retransmission mechanisms. However, it’s used for load balancing, message translation and routing. Basically, a Stateless Proxy only forward messages as it receives then. So, it will not generate its own temporary response messages for example. Stateful Server Contrary to Stateless Server, it maintains the state of the transaction, from the first request to the final response. This feature includes an additional process time that make it slower, but offers very advantageous functions: The forking is a good example; it permits to redistribute a request to multiple destinations (session initiation with multiple callees). The message retransmission, because it knows the content of the transaction. The user’s location, it’s then possible to redirect a call to he cellular phone of a user when the call was initially transmitted to the office telephone. The accounting. Some help to NAT translation. In general, the users of VoIP/ToIP networks use the corporation domain name for the network part of the URI. The SIP Proxy servers are then identified via SRV type DNS entries, just like email servers are identified by MX type entries. This permits to have a single URI, whatever the corporate SIP proxy in use. The SRV type DNS entries are written by following the RFC 2782 form: {_Service. Protocol} SRV {Priority} {Port} {Server name/IP} Entries for a corporate DNS domain may look like this: _sip._udp SRV 0 5060 sip.a.com _sip._udp SRV 1 5060 backupsip.a.com Thus, the entire user’s URI for this network may be written like this: Without SRV type DNS entry With SRV type DNS entry user@sip.a.com user@a.com 1.2.3. Registrar server It’s a server that provides a way to localize the users. For that, the users register themselves by sending register requests (REGISTER) to the server. This one extracts information about the current user’s location, like IP address, port number and username. Then, it stores this information on a database. Figure 4.3. Simple registration scheme on a SIP Registrar server 23 Created by XMLmind XSL-FO Converter. The Registrar server can accomplish a simple identification, minimum process to localize the users on the IP network. It’s also possible to implement authentication, to control the users connecting to the VoIP network. It’s possible to identify or authenticate the caller and/or the callee. 1.2.4. Redirect server The Redirect server permits to retrieve a list of current locations of a specific user. The database created by a Registrar server is the source of information used by the Redirect server to create this list, which is sent on a 3xx class of response. By this way, the caller can have a list of possible locations of the callee. Figure 4.4. Simple redirect scheme on a SIP Redirect server 1.2.5. Other types of SIP servers It exist multiple SIP servers, each one answering to a specific feature. We can list the following servers (non exhaustive list): Conference server This server will proceed to RTP flow mixing coming from different participants, and provides functions related to these conferences management. Voice Mail server It centralize vocal message functions. The vocal messages can then be managed via a vocal interface, a HTML interface, or through the use of emails when a link is configured between this Voice Mail server and a corporate email server (Microsoft Exchange for example). IVR (Interactive Voice Response) server The interactive voice servers permit to create vocal menus to process the calls. This kind of service is especially used by help desks. All the SIP servers can be separate network entities, or even mutualized in a single computer. It’s also possible 24 Created by XMLmind XSL-FO Converter. to multiplicate some servers, for different reasons going from redundancy to load balancing. 1.3. SIP methods 1.3.1. SIP messages The SIP communications are done through the use of a messages’ series that can be of two types: Requests Permits to call upon a particular operation. Responses Permits to inform the caller that his request has been received, processed, and even the result of this process. Each message is composed by a first line indicating the type of message, the message header (SIP header) and optionally a message body. The two last ones are separated by an empty line. The message body can be of multiple types. The most common is a SDP message included into an INVITE request. The great flexibility of the SIP protocol comes from the liberty to create personalized requests and/or responses. It’s then possible to create additional services. 1.3.2. SIP header The SIP header is described by a list of fields. Here are the main ones: Table 4.1. Main fields of the SIP header Fields Description Via Indicate the path taken by the message (typically the UAC address that has just sent the message) From To Indicates the source of the message Indicates the destination of the message Contact Provides the URIs to reach the caller for future communications Call-ID Unique identifier that permits to distinguish a communication CSeq Content-Type User-Agent Content-Length (Command Sequence) Unique transaction identifier for a specific session Indicates the type of media of the message body Character string describing the terminal used to send this message Indicates the size of the message body Here is an example of INVITE message sent: INVITE sip:luc@sip.b.com SIP/2.0 Via: SIP/2.0/UDP 10.1.16.170:5060;rport;branch=C4BF7BAD282A1EA948DFA From: John <sip:john@sip.a.com>;tag=3580587940 To: <sip:luc@sip.b.com> Contact: <sip:john@10.1.16.170:5060> Call-ID: FC9C664C-8134-47F2-877B-2ACBF60DB1B9@10.1.16.170 CSeq: 47647 INVITE Max-Forwards: 70 Content-Type: application/sdp User-Agent: X-Lite release 1105x Content-Length: 254 1.3.3. SDP header 25 Created by XMLmind XSL-FO Converter. The SDP message, as the SIP message body, contains multiple fields classified in three categories: Session description Temporal description Media description It exist 20 different fields classified in the three categories from above. It’s useless to introduce all of them, but it’s quite interesting to know the main ones: Table 4.2. Main fields of the SDP header Fields Meaning v Version SDP protocol version (v=0) Description o Origin Provides information about session origin (<username> <session id> <version> <network type> <address type> <address>) c Connection Data Indicates connection data (<network type> <address type> <connection address>) t Times Provides information about session times (<start time> <stop time>) m Media Announcements Specifies transport details of flows on the network, the last parameter indicating used codecs (described by « a=rtpmap » fields) (<media> <port> <transport> <fmt list>) a Attributes Different session attributes, serving here to enumerate the different codecs that can be used for the communication (rtpmap:<payload type> <encoding name>/<clock rate>) RTP/AVP = Real-Time Transport Protocol using the Audio/Video profile carried over UDP Here is an example of SDP header sent in an INVITE message: v=0 o=john 16742548 16742652 IN IP4 10.1.16.170 s=X-Lite c=IN IP4 10.1.16.170 t=0 0 m=audio 8000 RTP/AVP 3 98 97 101 a=rtpmap:3 gsm/8000 a=rtpmap:98 iLBC/8000 a=rtpmap:97 speex/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv 1.3.4. SIP requests It exist multiple SIP requests. Nevertheless, the most important ones are described just below: INVITE Permits to initiate a multimedia session. REGISTER 26 Created by XMLmind XSL-FO Converter. Contains information about the current location of the user, his IP address and port number. This request is sent to a Registrar server. BYE Terminates an established session. ACK Acknowledges the final response of an INVITE request. The establishment time of a session, using a three steps method, is random. Indeed, it depends on the time that a callee takes to accept or reject the call. Thus, the callee periodically resends the response until receipt of the acknowledgement. CANCEL Cancel the session when being established. For example, when the callee take too much time to provide a response. 1.3.5. SIP responses The responses are identified by a code defined in the version 2 of the SIP protocol. The code can have a value from 100 to 699, these values being classified in 6 categories: 1xx provisional response: The request processing can be quick or long. Thus, the 1xx responses inform the caller that the request has been received and is currently being processed. This avoids the caller to resend the request. The number 100 (TRYING) is used after INVITE requests, and the number 180 (RINGING) to indicate it’s ringing on the other side. 2xx final positive responses: Indicates that a request has been processed and accepted. 200 (OK) is the final positive response to an INVITE request for example. 3xx redirection: When a Proxy server can’t satisfy a call, it redirects the caller to an alternative service that will be able to establish the call. This service can be another Proxy server or the new user’s location. 4xx final negative response (client error): Indicates that a request can’t be processed or the request uses a wrong syntax and the problem comes from the caller. 5xx final negative response (server error): Indicates that the server can’t process the request although it’s valid. The caller will send again the request later. 6xx final negative response (global failure): Indicates that the request can’t be processed by any server. In general, the callee declines its participation to a session with a 603 response. The first line contains a message in human language to explain the reason of the transmitted response by the destination User Agent. 1.3.6. List of predefined SIP responses It exist multiple predefined responses. The codes and their meaning are presented in this table: Table 4.3. SIP responses 27 Created by XMLmind XSL-FO Converter. Code (Message) Meaning 100 Trying 180 Ringing 181 Call Is Being Forwarded 182 Queued 183 Session Progress 200 OK 202 Accepted 300 Multiple Choices 301 Moved Permanently 302 Moved Temporarily 305 Use Proxy 380 Alternative Service 400 Bad Request 401 Unauthorized 402 Payment Required 403 Forbidden 404 Not Found 405 Method Not Allowed 406 Not Acceptable 407 Proxy Authentication Required 408 Request Timeout 410 Gone 412 Conditional Request Failed 413 Request Entity Too Large 414 Request-URI Too Long 415 Unsupported Media Type 416 Unsupported URI Scheme 420 Bad Extension 421 Extension Required 422 Session Interval Too Small 423 Interval Too Brief 429 Provide Referrer Identity 480 Temporarily Unavailable 481 Call/Transaction Does Not Exist 482 Loop Detected 483 Too Many Hops 484 Address Incomplete 485 Ambiguous 486 Busy Here 487 Request Terminated 488 Not Acceptable Here 489 Bad Event 491 Request Pending 493 Undecipherable 28 Created by XMLmind XSL-FO Converter. Code (Message) Meaning 494 Security Agreement Required 500 Server Internal Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Server Time-out 505 Version Not Supported 513 Message Too Large 580 Precondition Failure 600 Busy Everywhere 603 Decline 604 Does Not Exist Anywhere 606 Not Acceptable 1.4. Description of an SIP session 1.4.1. SIP transactions SIP is a transactional protocol; this implies that a request and all the associated responses have to be grouped in transactions. The transactions are easily identified, because all the SIP messages will use the same sequence number (CSeq). However, there is an exception with ACK. Indeed, the ACK is not considered to be part of the transaction when receiving a final positive response to a request because, even if there is only one request, multiple participants can answer positively to it. On the other hand, the ACK is considered part of the transaction when receiving a final negative response. Figure 4.5. Transaction for call establishment Figure 4.6. Transaction for call termination 1.4.2. SIP dialogs 29 Created by XMLmind XSL-FO Converter. A SIP Dialog is an exchange of transactions between two User Agents in time. In addition, it eases scheduling and routing of messages between SIP endpoints. From a pragmatic point of view, a dialog is a logical suit of transactions. The following fields of a SIP message permit to identify a dialog: Call Id: Identifies a call composed of one or multiple dialogs. It also permits to distinguish the dialogs. From: Identifies the dialog from the caller side. To: The opposite, by identifying the dialog from the callee side. CSeq: Orders the messages into the dialog and permits to identify a transaction. Indeed, a dialog, and then the corresponding transactions, is composed of messages that chare the same identification parameters. The dialog identification permits to two User Agents to keep their relationship by using a Proxy server only once, when the two peers know their location. Moreover, certain messages establish a dialog, others not. The best example is a BYE request, which takes place in a pre-established dialog with an INVITE request. Figure 4.7. Example of dialog cut in two transactions 1.4.3. Register The registration of a client onto a SIP Registrar server is done via a REGISTER request. The server can be configured for a simple identification, to pick up information about the location of the client, or for authentication, in order to ensure the identity of the client. Figure 4.8. Registration with identification 30 Created by XMLmind XSL-FO Converter. Figure 4.9. Registration with authentication 1.4.4. Invite The way INVITE requests are processed depends on the type of Proxy server used. A Stateless Proxy will only redirect received messages to a destination, whereas a Stateful Proxy will be able to keep state of transactions, and then to generate its own responses. A Stateful Proxy can activate the Record Routing, in order to force all the following messages to travel across it. For this, the Proxy adds a « Record-Route » field in the SIP header for all the requests sent. Each Proxy using the Record Routing will add its « Record-Route » field. Figure 4.10. Call establishment with a Stateful Proxy Figure 4.11. Call establishment with a Stateless Proxy 31 Created by XMLmind XSL-FO Converter. 1.4.5. Session termination The call termination is directly done between the two User Agents, unless if Record Routing is activated by the Proxy. In this case, all the messages will go through the Proxy. Figure 4.12. Call termination (without Record Routing) Figure 4.13. Call termination (with Record Routing) 1.4.6. Example This example is composing of 2 terminals, and 2 proxies. The User 1 want call the User 2, and will terminate it later. The proxy A is a stateful proxy with record routing and authentication, and the proxy B is a stateless proxy without record routing. Figure 4.14. Example 32 Created by XMLmind XSL-FO Converter. 1.5. Asterisk 1.5.1. Introduction to TrixBox Trixbox is the world's most popular Asterisk-based distribution. Even if you are novice user you can use configure quicky a VoIP System to allow your IP phone and Softphone to work in your network TrixBox is a package combining all the required software to install and use of an IPBX: Operating System: GNU/Linux CentOS IPBX: Asterisk Database: MySQL Administration interface: FreePBX The TrixBox is use in small and medium company to provide a powerful solution of VoIP. 1.5.2. Installation 1.5.2.1. Installation in a virtual machine 33 Created by XMLmind XSL-FO Converter. The following process has been writing on the version 2.6.1.13 of Trixbox, and using on Microsoft Virtual PC 2007. The ISO image can be directly downloaded here: \\labs\LABS\CISCO\VoIP or at http://www.trixbox.org/downloads. This is the first screen you will see, so to begin the installation press the key <ENTER>. Now, you need to select your keyboard type, for example for QWERTY you can select “us”. After press the key <TAB>, and you can press <ENTER>. 34 Created by XMLmind XSL-FO Converter. In this part, you must select your time zone. Next, you have to choose a passport for the root user (during a practice,we recommend you to use “password” as the root’ password). Now, it is the time of installation, wait it will take 5 minutes... (It depends of your hardware.) When the Trixbox will restart, you must release the ISO (and in a real case, eject the CD-ROM). In a case of virtualization check you have select the good network card interfaces (it depend if you use WiFi or Ethernet). 35 Created by XMLmind XSL-FO Converter. This screen show you what is happen during the start. It show you several things, make attention in the part of eth0, it represent your network card. If you have failed, that mean you don’t have select the good network card in your virtualization software. It is start now; you must enter the login “root” and the password you have chosen before. It shows you the URL you can use to connect to the HTML interface (here: http://192.168.0.141). If you have some trouble with your network you can use the command “ifconfig” to show you network parameters, and the command “dhclient” to initialize DHCP. 36 Created by XMLmind XSL-FO Converter. For example, if you want modify the password of the main account, you can type “passwd-maint” to change it. 1.5.2.2. Upgrade the TrixBox In this part, you will learn the help command and how to upgrade your TrixBox. You can type the command “help-trixbox” to know about all command you can use. You can use the command “yum –y update” to upgrade the TrixBox. This screen show you what is happen during an upgrade: it download packages, and install them. 1.5.3. Configuration 1.5.3.1. Manage with the HTML Interface The Trixbox provide a powerful HTML Interface, this one is very simple to use. You just need read and fill the different fields. You can enable module, create user, configure the music on hold, create conferences, etc… 37 Created by XMLmind XSL-FO Converter. 1.5.3.2. Connect to the admin panel To connect to this interface, you need to enter the URL of your TrixBox on your Web Browser (i.e. http://192.168.0.140 in the example), after you will have the following screen: Now click on the link “switch”, the following screen appear. If you have never configured an administrator account you can use the main account (login “maint”). The following screen appears: 38 Created by XMLmind XSL-FO Converter. Presentation of the menu 1. System Status: This menu is a report your system status, for example network usage, memory usage, how many users are online, etc... 2. Packages: This menu concerns all packages you can use on your systems. For example if you want make a PERL script to automate jobs on the server... 3. PBX: In this menu you configure your PBX (User configuration, conferences, module enabled, etc...). 4. System: This menu provides you more details of your system. 5. Settings: This menu is dedicate to the TrixBox configuration; Which SMTP server you will use, which reposities you will use for upgrade, or the information about your registration for subscribe to the official support desk. 6. Help: In this menu, you will find the official manual and support of the TrixBox. When you click on PBX, then PBX Settings from the admin menu, you will have this following screen: 39 Created by XMLmind XSL-FO Converter. As you can see you have the menu at the left, you can configure all part of your PBX. Note Be careful, after any modification, you must click on “Apply Configuration Changes” to be able to see your alteration. 1.5.3.3. Introduce of Asterisk CLI Also on a PBX, you can manage it with command line we call it Asterisk CLI. On a TrixBox to access it, you must enter the command “asterisk –r” on your server. The Asterisk CLI is very similar than a Cisco IOS, for example you can use TAB completion and the key “?” or you can use the command “help” to see all command and their descriptions. 1.5.3.4. Extensions An Extension is a logical representation of a user account. First step to create a new user, you need to click on “Extension” from the PBX menu. After, you must select the type of your device (for example “Generic SIP Device”). Finally, fill the required fields: User Extension 40 Created by XMLmind XSL-FO Converter. This number corresponds to your telephone number, as well as your identifier to authenticate against the SIP Registrar server. Display Name It’s the alphanumeric string that is displayed on the user’s terminal. Secret This alphanumeric string is the password used to authenticate against the SIP Registrar server (it’s recommended to use only digital numbers to provide full compatibly with old devices). Also, you can fill optional fields like the email address. 1.5.3.5. Conference A conference is a logical room, who allow several users to be in the same discussion. First step to create a conference, you must click on “Conferences” from the PBX menu. After, fill the required fields: Conference Number This number corresponds to the dial number for this conference. Conference Name It’s the alphanumeric string that is displayed on the user’s terminal. You can fill optional fields: User PIN This is password who users need to enter to access to this conference. Admin PIN 41 Created by XMLmind XSL-FO Converter. This is password that users need to manage this conference. Allow Menu This option provide a menu when admin press the key “*” (i.e. kick a user; mute a user; etc…). 1.5.3.6. Voice Mail The voice mail allows you to receive a voice message in your mail box. When you are absent, your callers can be allowed to let you a voice message. To setup it, you need to select a user extension, scroll down until the section “Voicemail & Directory” and fill the following fields: Status The statement of the voicemail for this user. Voicemail password This is password the user need to enter to access to the voicemail interface. Email Address The email address where is sent the notification of a new message. Email Attachment This option provides the voice message attached to the email sent. 42 Created by XMLmind XSL-FO Converter. In VoIP context a voicemail interface is called “ARI Interface”. To access it in the Trixbox your need to go at the following URL and enter the login and the password of the user: http://192.168.0.141/user/index.php?vmrecs (replace “192.168.0.141” by the IP address or his domain name of your server.). 1.5.3.7. Ring group A ring group is a group of extension with a ring policy. For example, you want allow user to call the sales services, you can make a group with all extension of this services. The particularity of this group is you can set a strategy on the ring; call everyone, call the first available, etc… To configure it, you need to select “Ring groups” from the PBX Menu, and fill the following fields: Ring group Number The dial number of your group. Ring Strategy The ring policy you want use for this group. Extension List The lists of extensions are member of this group. Destination of no answer Is the destination use if nobody answers. 43 Created by XMLmind XSL-FO Converter. 1.5.3.8. Queue A queue is a FIFO (First In First Out) list of caller. That mean, if a new caller enter in the queue, he need to wait people who enter before him be processed. To setup it, you need to select “Queue” from the PBX Menu, and fill the following fields: Queue Number The dial number of your queue. Queue Name The name of your queue. Static Agents The lists of extensions who are able to answer to this queue. You can fill optional “Caller Position Announcements” fields to announce the user position. 44 Created by XMLmind XSL-FO Converter. 1.5.3.9. IVR An IVR (Interactive Voice Response systems) automates interactions with callers. It used pre-recorded voice prompts to make menu to help users to select the category who correspond to their needs. More and more this technology is used by company to provide a powerful hotline. This one is able to manage queue and redirect to the good. When you want create an IVR, you must imagine first all points (the start to the end), because you use reverse engineering to configure it. That mean, to be able to setup one IVR, you must start by end points, and finish by the start point. We want for example creates this IVR: The first step we need to create is the end points. The order you must use to setup this IVR is: 7. Create the Voice mail for the Billings services 8. Create the Voice mail for the Sales services 9. Create the Queue for the Support services 10. Create the Rings Group for the Sales services 11. Check or create the extension 7102. 12. Create the announce message FAQ. 13. Create the announce message Start. 14. Setup on your IVR user can access to the directory server with the key #. 15. Create your IVR. 16. Setup the inbound routes to access to your IVR. 45 Created by XMLmind XSL-FO Converter. 1.5.3.10. Trunks A Trunk is interfaces that allow make an interconnection between your TrixBox, POTS (Plain Old Telephone Service) equipment, and VoIP network. In the TrixBox you can setup several type of Trunk. For example, if you configure an SIP Trunk. This one allows your Trixbox to be interconnected to another SIP networks. Also, to define witch way will be use by your users, you must configure dial rules (i.e. all number begin by a “0”). 46 Created by XMLmind XSL-FO Converter. Chapter 5. Communication with SCCP and Call Manager Express Course Objectives: Understand the aim and the mechanis of CCME Know how to configure CCME 1. Course 1.1. Generalities 1.1.1. Introduction SCCP is a Cisco proprietary protocol used for real-time communications and conferences. The benefits of SCCP protocol based on its low memory requirements and CPU load. This protocol can be used in a secure LAN with a qualify bandwidth sufficient. One disadvantage of SCCP is the management of the QOS and bandwidth. Likewise, the PRTC protocol (Compressed Real-Time Transport Protocol) is not supported. SCCP doesn’t authenticate remote users outside the CME LAN. Despite, the use of VPN connection, SCCP remains unable to manage remote users. Each site must have a Cisco CME to authenticate local IP phones. The operation through the WAN between several CME routers is done through the H.323 protocol. 1.1.2. Call Establishment The calls are centralized around the routers. When an incoming call arrives on a router, it is treated separately until the destination is decided. As soon as the destination is known, an outgoing call is established. Then, the connection between these two terminals is established. Figure 5.1. This exhibit describes the logical way a connection is made between two terminals. 1.1.3. Aim and Mechanism of CCME Cisco Call Manager Express (CCME) is a call management solution based on Cisco routers that provide a telephone services for about 300 users. 47 Created by XMLmind XSL-FO Converter. Cisco CME is part of Cisco IP Communications solution and works in conjunction with Cisco System products, including routers, switches, gateways, gatekeepers who translate a phone number into an IP address in the H.323 solution, a messaging service (Cisco Unity voice mail), ATA adapters (Analog Terminal Adapters), as well access to public switched telephone network (PSTN : Public Switched Telephone Network). Cisco CME support about 120 IP phones and offers lot of services and benefits of IP Telephony without the high cost and complexity of deploying a solution based on servers. The routers must first be equipped with IOS 12.3(7)T IP-Voice at least to manage the CME in the form of a package to download on the router’s flash memory. The package includes, among the CME software, firmwares for IP Phone and other files. Figure 5.2. Cisco 1700, Cisco 2600XM, Cisco 3700 The CME system offers the PBX functionalities, and others dedicated on the IP Phones. All are centralized on the Cisco CME router, who control all calls made and receive. The IP Phones register themselves on the Cisco CME at startup, then they are able to receive and send calls. The IP Phone and the CME communicate using the SCCP protocol (Skinny Client Control Protocol). When a call is made from an IP Phone to another, it must go through a control phase of CME, the SCCP protocol is used here. The SCCP protocol does not transfer from one phone to another directly, but between an IP Phone and CME. Once the call is accepted, the protocol RTP (Realtime Transport Protocol) take over and convert the voice into IP packets in UDP. If Cisco CME needs to make a call to an IP phone managed by another CME, the H.323 protocol will be use to make the connection between the two CME. The function of PSTN gateway (Public Switched Telephone Network) can be enabling on the CME router or separate bridges. In this case, the IP-to-IP function will be activated to enable the translation between H.323 protocol and SIP. 1.2. Cisco IP Phone 1.2.1. Topologies There are 3 methods to install a VoIP infrastructure in the company network : Figure 5.3. Single cable 48 Created by XMLmind XSL-FO Converter. This method is the best, because there is only one cable per user. The problem is you must to have Cisco switches, or switches with Voice capability. You just have to configure VLANs and Trunk protocol. Figure 5.4. Multiple This second method is good, but you must install 2 cables per users. The installation is more expensive and you might have to buy and install others switches. It’s easy to configure VLAN and Trunk to separate the range ports for Voice Network and other range for the Data Network. Figure 5.5. Multiple Switch For this method, the infrastructure is completely doubled, but the cost of the install is very expensive. However you have two networks, which is more secure. If your Data Backbone and your Telephony backbone are physically remote, it is more easy to install your Voice Network. 1.2.2. Register Steps This process is divided into steps: Step 1: The switch send a special tone called « Fast Link Pulse » (FLP) from his interface. The FLP will be forwarded to the Powered Device (PD) in this case represented by an Ip Phone. Step 2: When the Powered Device is not supplied, it creates a link between the incoming interface and outgoing interface, creating a loop. So this loop can refer the FLP to the switch. In the end, if the FLP not return the switch, no power will be sent on this interface. Step 3: After the return of FLP, the switch will sent the power on this interface. Step 4: The line is activated within 5 seconds “link up”. Step 5: The IP Phone startup. Step 6: With the Cisco Discovery Protocol (CDP), the IP Phone announce at the switch the amount of power is needed. 49 Created by XMLmind XSL-FO Converter. Step 7: With again CDP, the switch inform the IP Phone the list of available Voice VLAN “Auxiliary VLAN”. Step 8: The IP Phone registers with a DHCP server with DHCP-Discover request on broadcast to obtain an IP address in the VLAN voice pool. Step 9: The DHCP server send all IP parameters to the IP Phone. The IP address of TFTP server is the CME IP. Step 10: The IP Phone apply the configuration. Step 11: The IP Phone connect to the TFTP server and download the XML configuration file «SEP00112FD21239.cnf.xml » (00112FD21239 represent the MAC address of IP Phone). This file contains the register information’s for the Cisco CME, IP address, the language, the port and the firmware. If the IP Phone have the good firmware, is register and receive the configuration. Note, that the XML SEP file does not contain the extension number. Step 12: If the firmware is obsolete or different, the IP Phone will download the new firmware from the TFTP server. Step 13: The IP Phone reboot after the firmware download. Step 14: If no SEP XML file exist with MAC address of device, is that a new added IP Phone. The IP phone will download from TFTP server a file named XMLDefault.cnf.xml who indicates IP Address, port number and the firmware to use by the IP Phone. The process is the same as above: Download Firmware, and reboot if necessary. Step 15: The IP Phone will register at the Cisco CME using SCCP messages type. If “auto assign” option is activate, the IP Phone will receive automatically an extension from Cisco CME. If “auto assign” option is not activate, the IP phone has no extension and will be unable to send and receive calls 1.3. Switches configuration 1.3.1. The flow separation One of the bases about VoIP is the voice and data transmission on the same media. The flow separation will be done by VLAN: One Voice VLAN and One Data VLAN. Don’t forget, the VLAN1 is used for the management, so you must create 2 VLANs on each router. The CISCO IP Phones can be considered as Layer 3 switches, so they support the Trunking The 3 ports of IP Phone allow: A connection 10/100 on Ethernet to the switch, A connection 10/100 on Ethernet to the computer, 50 Created by XMLmind XSL-FO Converter. An internal port for the Audio stream. The 10/100 Ethernet port connected on the switch send the 802.1Q protocol (trunking). That permit to connect the IP Phone at the Voice VLAN (auxiliary VLAN) and connect Computer at the Data VLAN. The 1st pattern represent an IP Phone connected on one side to one switch, and the other side on the computer. All IP addresses are on the same subnet. The 2nd pattern represents the different subnet for the Computer and IP Phone. In this case, it’s preferable to used on the Voice VLAN the VoIP QoS different than a classical LAN. Other architecture is possible. It’s based on each equipments (Computer and IP Phone) are directly connected on the switch. The problem is the wires number. Because, we need 2 more cables. Packets from IP Phone pass on the other VLAN than others packets. This separation allows simplify the deployment process, because, when a new IP Phone as connected, he is automatically configured on the good VLAN. The IP Phones and switches communicate with CDP protocol. So on the startup the switch give the configuration at the IP Phone: VLAN ID (VVID), Port VLAN ID (PVID). Figure 5.6. One port is associated at 2 VLAN: Voice for IP Phone and Native for Computer. 1.3.2. Connect IP Phone at the Network Two methods exist to connect IP Phone on the Network: With a Single cable: 51 Created by XMLmind XSL-FO Converter. Lot of Company used this architecture, because they don’t need to setup more cables, more switches… so is less expensive. With two cables: This architecture is based on the cables separation. It’s easier to configure the priority (QoS), but is more expensive. 1.3.3. VLAN configuration Two VLAN will be necessary for the functioning of the IP phone and Computer. Computer is connected at the DATA VLAN, and IP Phone is connected at the VOICE VLAN. The trunking will be required to allow the flow of information of these two VLAN, between the IP phone and the switch The commands are identical to thoses of a typical VLAN configuration on the Catalyst switch, with the exception of creating a Voice VLAN Switch(config-if)#switchport voice vlan {number} Interface configuration Mode Assign one port of the voice vlan. Console(config)#interface FastEthernet0/1 Console(config-if)#switchport trunk encapsulation dot1q Console(config-if)#switchport trunk native vlan 1 Console(config-if)#switchport access vlan 12 Console(config-if)#switchport mode trunk Console(config-if)#switchport voice vlan 112 Console(config-if)#spanning-tree portfast The “Access VLAN” is used between the Computer and the LAN. The Voice VLAN is used by the IP Phone for communicate an audio stream. Don’t forget the native VLAN, BLAN 1, where the positions of Computers have not received a specific VLAN. Switch# show interface fa0/17 switchport Name: Fa0/17 Switchport: Enabled Administrative mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Negotiation of Trunking: Disabled Access Mode VLAN: 0 ((Inactive)) Trunking Native Mode VLAN: 12 (VLAN0012) Trunking VLANs Enabled: ALL Trunking VLANs Active: 1-3,5,10,12 Pruning VLANs Enabled: 2-1001 Priority for untagged frames: 0 Override vlan tag priority: FALSE Voice VLAN: 122 Appliance trust: none The inter-VLAN routing done by the Layer 3, and requires a router to make this connection. IP phones are 52 Created by XMLmind XSL-FO Converter. presents on the Voice VLAN and Computers on the Data VLAN. The Trunk used on the port connected at the switch. 1.3.4. DHCP configuration Router(dhcp-config)# option {option-number} ip {IP-address} DHCP configuration Mode Set the specific value option of DHCP Router(config)#ip dhcp exluded-address 10.90.0.1 10.90.0.10 Router(config)#ip dhcp pool mypool Router(dhcp-config)#network 10.90.0.0 255.255.255.0 Router(dhcp-config)#option 150 ip 10.90.0.1 Router(dhcp-config)#default-router 10.90.0.1 Router(dhcp-config)#dns-server 10.100.0.1 10.100.0.2 Router(dhcp-config)#exit Option 150 is the IP address of TFTP server. In this case is the IP address of CME router. Don’t forget to exclude the IP range of router (dhcp excluded-address), to indicate a default gateway (default-router) and DNS server (dns-server), one a minimum. 1.3.5. Routers configuration 1.3.5.1. Ephone and CME configuration Router(config)# ephone {phone-tag} Global Configuration Create an ephone Router(config-ephone)# mac-adress {mac-adress} Ephone configuration mode Associate MAC address at the ephone Router(config-ephone)# button {button-number} {separator} {dn-tag} Ephone configuration Mode Assign a number to call ephone-dn to a button on the ephone {separator} is a unique character that defined the properties button and extension number: « : » : Standard ringtone. « b » : The tone is off, but the beep of call waiting is allowed. 53 Created by XMLmind XSL-FO Converter. « f » : Ring, to differentiate calls for a line over another. The Ring is three pulses instead of a pulse for calls and two calls for external. « m » : Monitor mode for the sahred-line wich indicates which lines are used or not. « o » : Several lines ephone-dn share a button (10 lines max). The field dn-tag contains dn-tag separated by comas. « s » : Ringtone silent, only the icon (flashes on the phone to report a call). This command can be repeat several times : Router(config-ephone)# button {button-number} {separator} {dntag} {button-number} {separator} {dn-tag} Router(config-ephone)# type {7940 | 7960} addon 1 7914 [2 7914] Ephone configuration Mode Configure one or several modules 7914 for ephone type 7940 or 7960.This command is obligatory if we use the extension module 7914. 1.3.5.2. Example of basic configuration CMERouter(Config)#ephone-dn 7 CMERouter(Config-ephone-dn)#number 1001 CMERouter(Config)#ephone 1 CMERouter(config-ephone)#mac-address 000F.2470.F8F8 CMERouter(config-ephone)#button 1:7 One ephone-dn 7 is created and associated at the Ephone 1. The ephone-dn is configured on single-line and is attributed at the button 1 on the IP phone with MAC address associated. Each Ephone will be one or several ephone-dn assigned at the buttons on the physical equipment. 1.3.5.3. Example of configuration with several Ephone 54 Created by XMLmind XSL-FO Converter. CMERouter(config)#ephone-dn 10 dual-line CMERouter(config-ephone-dn)#number 1004 CMERouter(config)#ephone-dn 11 dua-line CMERouter(config-ephone-dn)#number 1005 CMERouter(config)#ephone-dn 12 dua-line CMERouter(config-ephone-dn)#number 1006 CMERouter(config)#ephone-dn 13 dua-line CMERouter(config-ephone-dn)#number 1007 CMERouter(config)#ephone 1 CMERouter(config-ephone)#mac-address 000F.2470.F8F1 CMERouter(config-ephone)#button 1:10 CMERouter(config)#ephone 2 CMERouter(config-ephone)#mac-address 000F.2470.A302 CMERouter(config-ephone)#button 1:11 CMERouter(config)#ephone 3 CMERouter(config-ephone)#mac-address 000F.2470.66F6 CMERouter(config-ephone)#button 1:12 CMERouter(config)#ephone 4 CMERouter(config-ephone)#mac-address 000F.2470.7B54 CMERouter(config-ephone)#type ata CMERouter(config-ephone)#button 1:13 Each Ephone will be one or several ephone-dn assigned at the buttons on the physical equipment. 1.3.5.4. Example of configuration with several buttons on several Ephone CMERouter(config)#ephone-dn 14 dual-line CMERouter(config-ephone-dn)#number 1008 CMERouter(config)#ephone-dn 15 dual-line CMERouter(config-ephone-dn)#number 1009 CMERouter(config)#ephone-dn 16 dual-line CMERouter(config-ephone-dn)#number 1010 CMERouter(config)#ephone-dn 17 dual-line CMERouter(config-ephone-dn)#number 1011 CMERouter(config)#ephone 5 55 Created by XMLmind XSL-FO Converter. CMERouter(config-ephone)#mac-address 000F.2470.FAA1 CMERouter(config-ephone)#button 1:14 2:15 CMERouter(config)#ephone 6 CMERouter(config-ephone)#mac-address 000F.2470.A7E2 CMERouter(config-ephone)#button 1:16 6:17 In this example, there are two ephone configured with multiple lines on each. Each button is assigned to an ephone-dn. 1.3.5.5. Phones Installation You can used three methods for to install yours phones. Router(config)# telephony-service Global configuration mode Enter on the Telephony configuration mode Router(config-telephony-service)# max-ephones {number} Telephony Configuration mode The max number of phones is supported by the router. Manual installation : Router(config-telephony-service)# max-directory-numbers {number} Telephony Configuration mode The max number of the dns on the router Router(config-telephony-service)# load {modele}-[modele] {firmware} Telephony Configuration mode The type of the IP phone used (7902, 7905, 7910, 7912, 7914, 7920, 7935, 7936, 7960-7940) with firmware (ex: P00303020214). Router(config-telephony-service)# ip source-address { ip-address} {port} [any-match/strict-match] Telephony Configuration mode The IP address of the Cisco CME router for authenticate the IP Phone. The default port number is 2000 Router(config-telephony-service)# create cnf-files Telephony Configuration mode Make the XML configuration files for the Clients 56 Created by XMLmind XSL-FO Converter. Router(config-telephony-service)# keepalive {seconds} Telephony Configuration mode The interveal between 2 keepalive messages send by the router to the IP phone. The default time ris : 30sec. The range value is : 10 – 65535. Router(config-telephony-service)# user-locale {language-code} Telephony Configuration mode Configure the language on the IP Phone (US for English, FR for French…) Router(config-telephony-service)# network-locale {language-code} Telephony Configuration mode Configure the tone of IP Phone (US for English, FR for French…) Router(config-telephony-service)# reset {all [time-interval] | [cancel] | [mac-address] | [sequence-all] Telephony Configuration mode between each IP phone || cancel, stop the command || mac-address define the IP phone to make a reboot || sequence-all, and Each IP Phone start the reboot when the previous IP phone is restarted). Automated phone installation: You can execute a command to start a setup mode of Telephony. It’s same Principe that the Setup mode on the first router boots. The command is: Router(config)# telephony-service setup Global configuration mode After this command, the router asked you, for example: Do you want to setup DHCP service for your IP phones? [yes/no] Do you want to start telephony-service setup? [yes/no] Enter the IP source address for Cisco CallManager Express services : Enter the Skinny Port for Cisco CallManager Express services [2000]: How many IP phones do you want to configure [0]: Do you want dual-line extensions assigned to phones? [yes/no]: What language do you want on IP phones? 0 English 1 French 2 [...] Which call progress tone set do you want on IP phones : 0 United States 1 France 2 Germany 57 Created by XMLmind XSL-FO Converter. 3 [...] What is the first extension number you want to configure [0] : Do you have Direct-Inward-Dial service for all your phones? [yes/no] : Do you want to forward calls to a voice message service? [yes/no] : Call forward No Answer Timeout : [18] Do you wish to change any of the above information? [yes/no] : Installation partially automated of IP Phone: This configuration mode is a simplification of the manual mode; go into configuration mode telephone services to enter this command: Router (config-telephony-service)# auto assign [dn-tag] to [dn-tag] type [phone-type] cfw [extn-number] timeout [seconds] Telephony service configuration mode 1.3.5.6. GUI Configuration In 1st, on the CME router, you must download some files for the GUI. The package is named: cme-gui3.1.1.zip. “3.1.1” represents the CME version, and you can download this package on the Cisco Website. This archive contains: XML Template: xml.template GUI files: admin_user.html admin_user.js CiscoLogo.gif Delete.gif dom.js downarrow.gif ephone_admin.html logohome.gif normal_user.html 58 Created by XMLmind XSL-FO Converter. normal_user.js Plus.gif sxiconad.gif Tab.gif telephony_service.html uparrow.gif xml-test.html After, we can configure the GUI: On the GUI, you can configure three users’ classes: as the authorization to change parameters on the IP Phone. The System administrator account must create by this command: Router(config-telephony-service)# web admin system name {username} password {password} Telephony service configuration mode Make a username and password for System Administrator. The option “secret 0 or secret 5” can be used for to crypt the password. After, the system Administrator can log to the GUI interface with Internet Explorer or other. The Customer Administrator and the Phone user can be create on the CLI, but it’s preferable to create on the GUI. The command to create the Customer Admin is: Router(config-telephony-service)# web admin customer name {username} password {password} Telephony service configuration mode The functionality of GUI for “Customer Administrator and Phone user” can be modifying on the XML files (files with .css extension). The creation of Ephone user doesn’t use on the same mode: 59 Created by XMLmind XSL-FO Converter. Router(config)# ephone {phone tag} Global configuration Mode Permit to enter on the IP telephone configuration mode. Router(config-ephone)# username {username} password {password} IP telephone configuration mode. Creation of the User Phone account. GUI configuration : Router(config)# ip http server Global configuration Mode Active the http server on the router Router(config)# ip http path {flash :} Global configuration Mode Specify the location of the HTTP files. Router(config)# ip http authentication {aaa | enable | local | tacacs} Global configuration mode Determines the authentication method on the http server. After you can access on the GUI interface with this address: http://10.0.0.1/ccme.html (10.0.0.1 Represent the IP address of the router). On the GUI you can configure some operations: On the System Administrator : 60 Created by XMLmind XSL-FO Converter. Configure: ephone, ephone-dn, system parameters. Voice Mail: Voice mail parameters. Administrator: Make backup and restore, restart the CME router. Reports: Shown some information’s or error messages. Help: Link to the Help files. If you want to create Customer and User account, you must go on the configure menu and choice system parameters. The rights of “customer administrator” are configured on the xml.template: 61 Created by XMLmind XSL-FO Converter. After you have made modifications and download on the CME router. You must apply this with this command: Router(config-telephony-services)# web customize load {filename} Example of result of this Customer interface: Figure 5.7. In the left, the classical interface, and on the right, the interface with modifications For the Phone user account, it the same process, on the configuration page: Phone user Interface : 62 Created by XMLmind XSL-FO Converter. Configure: limited configuration of the phone user. Search: Make a search on the Cisco CME Directory. Help: Link to the Help files. You can configure the call forwarding: The Cisco CME Directory: The System Administrator can configure the Directory presentation: (firstname, NAME or NAME, firstname) 63 Created by XMLmind XSL-FO Converter. 64 Created by XMLmind XSL-FO Converter.