PhoneRecord - Record And Monitor VoIP Solution

Transcription

Departamento deUniversidade de Aveiro Electrónica, Telecomunicações e Informática,2008PedroAlbuquerque albuquerque@ua.pt PhoneRecordSolução de Gravação e Monitorização VoIPPhoneRecordRecord and Monitor VoIP Solution

Departamento deUniversidade de Aveiro Electrónica, Telecomunicações e Informática,2008PedroAlbuquerque albuquerque@ua.pt PhoneRecordSolução de Gravação e Monitorização VoIPPhoneRecordRecord and Monitor VoIP SolutionFinal report presented to the University of Aveiro in partial fulfillment of the requirements for the degree of Master of Science in Engineering of Electronics andTelecommunications, developed under cientific orientation of António Nogueira andPaulo Salvador, professors of the Department of Electronics, Telecommunicationsand Informatics in the University of Aveiro.

o júri / the jurypresidente / presidentDoutor Armando José Formoso de PinhoProfessor Associado da Universidade de Aveiro (por delegação da Reitora da Universidade de Aveiro)vogais / examiners committeeDoutor Joel José Puga Coelho RodriguesProfessor Auxiliar do Departamento de Informática da Faculdade de Ciências daEngenharia da Universidade da Beira InteriorDoutor António Manuel Duarte NogueiraProfessor Auxiliar da Universidade de Aveiro (Orientador)Doutor Paulo Jorge Salvador Serra FerreiraProfessor Auxiliar da Universidade de Aveiro (Co-Orientador)

People envolvedSupervisorProf. Antonio Manuel Duarte NogueiraAuxiliar Professor of the University of AveiroCo-SupervisorProf. Paulo Jorge Salvador Serra FerreiraInvited Auxiliar Professor of the University of AveiroCollaboratorsDr. Pedro J. Conceição BeloCEO of Millennium bcpbankDr. Manuel Moura GuedesSenior Vice-President of Millennium bcpbank IT departmentEng. Sergio AlonsoSenior Vice-President of Millennium bcpbank IT departmentEng. Pedro Rafael de Jesus SoaresConsultor in Millennium bcpbank IT departmentEng. Pedro dos Reis MendesAssistant Vice-President of Millennium bcpbank IT department

“All successful people are big dreamers.They imagine what their future could be, ideal in every respect, and then they work every day toward their distantvision, that goal or purpose.”— Brian Tracy

acknowledgementsIn first place, I’d like to thank my supervisors for accepting this project andfor all the support given during its development.A special thank to Pedro Belo, for giving me the opportunity to work atMillennium bcp bank and for all the back up given while stayed abroad.To Manuel Moura Guedes, Sergio Alonso, Pedro Mendes and Pedro Soares,a sincerest thanks for the day-by-day scientific support and for their friendship.To my friends who always helped me in good and not so good times. Also, Idedicate this project to my grandparents, specially to my dear grandmotherAvo Olga.Finally, I devote this project to the most important persons in my life, myfamily. To my parents and my brother, thank you. Without you, I wouldn’tbe what I am today - you are what matter most. I’m really thankful. Toall, my sincerest thanks.

Palavras-chaveVoIP, Gravação, Java, JTAPI, JMF, .NET, CallManager, Cisco, ConferênciaResumoEsta dissertação apresenta o estudo para a gravação e monitorização dechamadas VoIP. A solução PhoneRecord funciona junto com o CallManagerda Cisco e faz uso de Java Telephony Application Programming Interface(JTAPI) na gestão de chamadas e da framework Java Media Framework(JMF) para o processamento de áudio. O acesso às configurações do sistemae à lista das chamadas gravadas é conseguido através de um browser web.

KeywordsVoIP, Record, Java, JTAPI, JMF, .NET, CallManager, Cisco, ConferenceAbstractThis dissertation presents the study to record and monitor VoIP calls. ThePhoneRecord solution works along with Cisco CallManager and makes useof JTAPI to manage calls and JMF to process audio. The access to systemconfiguration and recorded calls list is achieved through a web browser.

Contents1 Introduction1.1 Motivation . . . .1.2 Objectives . . . . .1.3 Law terms . . . . .1.4 Document Outline.112232 State-of-Art2.1 Introduction . . . . . . . . . . .2.2 CallRex . . . . . . . . . . . . .2.3 PowerCall CRM . . . . . . . .2.4 Confiance Recorder . . . . . . .2.5 THAT-2 . . . . . . . . . . . . .2.6 Witness Compliance Recording2.7 Voxida . . . . . . . . . . . . . .2.8 Conclusions . . . . . . . . . . .5556677783 VoIP3.1 Introduction .3.2 Concepts . .3.3 Protocols . .3.4 Audio Codecs3.5 QoS . . . . .1111111213144 Network Environment4.1 Introduction . . . . . . . . . . .4.2 Call Manager Server . . . . . .4.2.1 CallManager Services .4.3 Media Termination Extensions4.3.1 CTI Port . . . . . . . .4.3.2 CTI Route Point . . . .4.4 IP Phone . . . . . . . . . . . .4.5 Conference Bridge . . . . . . .1717171920202121215 Development Tools5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5.2 Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5.2.1 Eclispe IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23232323pedro.albuquerque.i

5.2.25.35.4JTAPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5.2.2.1 Introduction . . . . . . . . . . . . . . . . . . . . .5.2.2.2 Specification . . . . . . . . . . . . . . . . . . . . .5.2.2.3 JTAPI Security . . . . . . . . . . . . . . . . . . .5.2.2.4 Architecture . . . . . . . . . . . . . . . . . . . . .5.2.3 JMF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5.2.3.1 Streaming Media . . . . . . . . . . . . . . . . . . .5.2.3.2 Receiving Media Streams from the Network . . . .5.2.3.3 Transmitting Media Streams through the Network5.2.4 JDBC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .NET Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5.3.1 Microsoft Visual Studio 2005 . . . . . . . . . . . . . . . . .5.3.2 C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .5.4.1 Microsoft SQL Server 2005 . . . . . . . . . . . . . . . . . .5.4.2 Microsoft SQL Server Management Studio . . . . . . . . . .6 PhoneRecord - Project Development6.1 Introduction . . . . . . . . . . . . . . . . . . . .6.2 Architecture Overview: different approaches . .6.2.1 Passive Mode . . . . . . . . . . . . . . .6.2.1.1 Packet Sniffing . . . . . . . . .6.2.2 Active Mode . . . . . . . . . . . . . . .6.2.2.1 Cisco Unity integration . . . .6.2.2.2 Program-based implementation6.3 Architecture Overview: final solution . . . . . .6.3.1 JTAPI component . . . . . . . . . . . .6.3.2 JMF component . . . . . . . . . . . . .6.4 Data Base . . . . . . . . . . . . . . . . . . . . .6.5 WEB Page . . . . . . . . . . . . . . . . . . . .6.6 Results and Conclusions . . . . . . . . . . . . 3536394246497 Conclusions and Future Applications53Bibliography55A Application Profile57B Installation Manual61C Administration Web Page72ii

List of Figures2.12.22.32.42.5CallRex scability [8] . . . .Confiance user interface [6]THAT-2 Telephone HandsetVoxida server [7] . . . . . .Solutions comparison chart.667893.13.2VoIP concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .VoIP protocol stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12144.14.24.34.4Production Network EnvironmentTreasury Department EnvironmentCisco IP Phone . . . . . . . . . .Route Point functionality . . . . .181922225.15.25.35.45.55.65.75.85.9JTAPI and CallManager communication . . . .JTAPI - Call model for two-party call . . . . .JTAPI - Call model for two simultaneous callsJTAPI - Call model for two alerting terminals .JTAPI - Call model for conference call . . . . .JMF - RTP reception . . . . . . . . . . . . . .JMF - RTP transmission . . . . . . . . . . . . .JDBC Architecture . . . . . . . . . . . . . . . .NET Architecture . . . . . . . . . . . . . . . 6.116.126.136.14Test Network Environment . . . . . . . . . . . . .JTAPI and JMF components . . . . . . . . . . . .JTAPI - registerProvider() . . . . . . . . . . . . . .JTAPI - processMessage() . . . . . . . . . . . . . .JTAPI - Create structure and updatePortsStatus()JTAPI - registerRouteTerminal() . . . . . . . . . .JTAPI - Thread List run() . . . . . . . . . . . . .JTAPI - recordCall() . . . . . . . . . . . . . . . . .JTAPI - CiscoMediaOpenLogicalChannelEv . . . .JTAPI - CiscoRTPInputStartedEv . . . . . . . . .JTAPI - CiscoRTPOutputStartedEv . . . . . . . .Codec File Size Comparison . . . . . . . . . . . . .µ-law and a-law Comparison [16] . . . . . . . . . .JMF - startSaving() . . . . . . . . . . . . . . . . .3636373737383838393939404041pedro.albuquerque. . . . . . . . . . . . .Audio TAP. . . . . . . . . . . . . . . . .[15]. . . . .iii

6.156.166.176.186.196.206.216.226.236.24JMF - startTransmitting() . . . . . . . . . . . . . .JMF - stopTransmitting() . . . . . . . . . . . . . .JMF - stopSaving() . . . . . . . . . . . . . . . . . .Servers and DataBase schema . . . . . . . . . . . .Web Page - Check Login in Page Load . . . . . . .Iframe JavaScript Management . . . . . . . . . . .Update voice&media server . . . . . . . . . . . . .Executing usp searchCall . . . . . . . . . . . . . .Codec G.711 - Practical and Theorical ComparisonFinal Solution Schema . . . . . . . . . . . . . . . ftware’s Architecture . . . . . . . . . . . . . . . . . . .CallManager - Change codec in R-CTI Region . . . . . .CallManager - Configure a location . . . . . . . . . . . . .CallManager - Configure a partition . . . . . . . . . . . .CallManager - Configure a device pool . . . . . . . . . . .CallManager - Configure a DP in phone settings . . . . .CallManager - Configure a Route Point . . . . . . . . . .CallManager - Configure an extension to Route Point (1)CallManager - Configure an extension to Route Point (2).616566666768697071C.1C.2C.3C.4C.5Login Page . . . . . . .Main Page . . . . . . . .Device List Page . . . .Initial Parameters PageSearch Call Page . . . .7273737474.iv.

List of Tables3.13.2Codecs Information [22] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Bandwidth Calculations [18] . . . . . . . . . . . . . . . . . . . . . . . . . . . .14156.1Codec G.711 Practical and Theoretical values . . . . . . . . . . . . . . . . . .49A.1 PhoneRecord - components description . . . . . . . . . . . . . . . . . . . . . .A.2 PhoneRecord - functional specifications . . . . . . . . . . . . . . . . . . . . .A.3 RecordPhone components . . . . . . . . . . . . . . . . . . . . . . . . . . . . .575859pedro.albuquerquev

AcronymsACDACELPADPCMAPIautomatic call distributor.Algebraic Code Excited Linear Prediction.Adaptative Differential Pulse-Code Modulation.application programming interface.BATBulk Administration Tool.CDRCTICTIQBECall Detail Record.computer telephony integration.Computer Telephone Interface Quick Buffer Encoding.FTPFile Transfer Protocol.HTTPHypertext Transfer Protocol.IDEIISIPIVRIntegrated Development Environment.Internet Information Services.Internet Protocol.interactive voice NLD-CELPlocal area network.Low Delay Code Excited Linear Prediction.MACMOSMP-MLQMPEG-1medium access control layer.Mean Opinion Score.Multi-Pulse Maximum Likelihood Quantization.Moving Picture Experts Group Phase 1.pedro.albuquerqueDatabase Connectivity.Media Framework.Server Second Edition.Telephony Application Programming Interface.Virtual Machine.vii

NPSnon presential sales.OSOperating System.PBXPCPCMPPSPSTNPrivate Branch eXchange.Personal Computer.Pulse-Code Modulation.Packets per Second.Public Switched Telephone Network.QoSquality of service.RADRMIRTCPRTMTRTPrapid allocation development.remote method interface.Real-Time Transport Control Protocol.Real-Time Monitoring Tool.Real-Time Transport Protocol.SCCPSDKSIPSQLSkinny Client Control Protocol.Software Developer’s Kit.Session Initiation Protocol.Structured Query Language.T-SQLTAPITAPSTCPTransact Structured Query Language.Telephony API.Tool for Auto-Registered Phone Support.Tansmission Control Protocol.UDPUser Datagram Protocol.VLRVoIPVoice Logging Recorders.Voice over Internet Protocol.WAVEWaveform audio format.XMLeXtensible markup language.viii

Chapter 1Introduction1.1MotivationThe global wide spread growth of telecommunications networks, Internet Industry andestablished telecommunications industry has increased the interest and demand on differentapplications. Voice over Internet Protocol (VoIP) reveals itself as an important revolutionarytechnology which has become a potential alternative to the traditional telephony systems overthe Public Switched Telephone Network (PSTN), providing a versatile and flexible solutionto speech communications.In a VoIP call, voice is transformed into digital bits and segmented into packets of datato be routed through the Internet Protocol (IP) network, being reassembled upon arrival atthe other end. Actually, there is no actual sound passing through the network at any timebecause the Personal Computer (PC) or other device which places the VoIP call digitizesvoice sound. PSTN traffic is also segmented into digital packets at some point, but such callsare digitized and then converted into sound waves far deeper into the telephone system [24].The first computer to computer voice connection was made in 1995, developed into a newInternet Phone Software software package. The hardware needed to talk to another computerwas a modem, sound card, microphone and speakers.This technology is being developed since then and, by year 1998, gateways had beenestablished to allow PC-to-phone connections and phone-to-phone connections that used theInternet for voice transmission. These last connections still required a computer to initiatethe call, but once the connection was established, the callers could use a regular phone set [5].Nowadays, moving from analog lines to VoIP seems inevitable and so telephone applications too. Call recording, still currently used in analog call centers, needs to migrate also toVoIP in order to be integrated into digital systems.Recordings calls are very important when a telephone conversation involves agreements ofhigh amounts of money, buy or selling orders, evaluation and verification, dispute resolutionor even provision information with customers.Both business and its customers are increasing the use of phone calls to a wide rangeof agreements. But when one party breaks the agreement, the calls may have a key role inresolving disputes, even in courts. When this happens, it is obviously far easier to resolvematters if the company has recorded calls, or followed them up with a clear and agreed writtenstatement of what was discussed.pedro.albuquerque1

1.2ObjectivesThis dissertation is about developing and implementing a system that is capable of recordand monitor calls in VoIP phones within Millennium bcpbank Treasury Department network.The project, called “PhoneRecord”, was born as a solution to meet the proposal requirementsof Millennium bcpbank to control the deals made by the Treasury Department and to bepossible to make non presential sales (NPS) with costumers. If needed, the Call Center canalso use this solution. The developed system is capable of recording a call automatically(without pressing any button), permits the pre-selection of extensions to be recorded andalso restricts the access to system boot configuration and database where the files and theprofiles of the recorded calls are located. This solution doesn’t want to rival with existingsniffing packets and high-processing conference-based systems, but to create a solution wherethere is no need to record a high number of phone calls. Another objective, as importantas the first one, is to obtain the academic Master degree of Engineering of Electronic andTelecommunications.1.3Law termsThere are important law issues that must be addressed. Both federal and state statutesgovern the use of electronic recording equipment. The unlawful use of such equipment cangive rise not only to a civil suit by the ”injured” party, but also to criminal prosecution. TheU.S. federal law allows recording of phone calls with the consent of at least one party. Thismeans that if the call is being initiated, the other party does not need to be notified that thecall is being recorded.Twelve states require the consent of all parties to a conversation. Those jurisdictionsare California, Connecticut, Florida, Illinois, Maryland, Massachusetts, Michigan, Montana,Nevada, New Hampshire, Pennsylvania and Washington. Since Treasury should not be restricted to deal in specific states because of call recording, it was looked for a solution thatcan accommodate the bank’s needs as well as legal requirements [2].Prior to recording, it is needed to notify that a call is going to be recorded. This is generallyaccomplished with a verbal notification by the recording party or an automatic, periodic beeptone, indicating that the call is about to be recorded and, while recording, indicating thatrecording is taking place. There are specific requirements for this tone. According to VoiceLogging Recorders (VLR) Communications, the beep tone needs to be a 1260 to 1540Hztone, lasting 170 to 250 milliseconds, and broadcast for both sides to hear every twelve tofifteen seconds when the call is taking place.2

1.4Document OutlineThis report is divided into six chapters. The following will be a small exhibition of whatwill be mentioned throughout each chapter:Chapter 1 This chapter presents an introduction to the project, as well as the lawrequirements to validate the way calls are being recorded. It also includesthe document structure to turn its search easier.Chapter 2 State of the Art: This chapter shows the study of the State of the Artrelated to the Record and Monitor VoIP application.Chapter 3 VoIP: This ch

the call, but once the connection was established, the callers could use a regular phone set [5]. Nowadays, moving from analog lines to VoIP seems inevitable and so telephone applica-tions too. Call recording, still currently used in analo