9
Applicati0n Note Call Logging in an IP Environment Recording Calls Using Dialogic ® HMP Software and Open Source Components

Call Logging in an IP Environment Call logging is an important

Embed Size (px)

Citation preview

Page 1: Call Logging in an IP Environment Call logging is an important

Applicati0n Note

Call Logging in an IPEnvironmentRecording Calls Using Dialogic® HMP Software

and Open Source Components

Page 2: Call Logging in an IP Environment Call logging is an important

Application Note Call Logging in an IP Environment

2

Executive Summary

Call logging is an important function in the contact center. As contactcenters move to an IP environment, methods of performing call loggingstand to change. This application note describes a “proxied RTP” systemfor call logging, where IP calls are redirected through the call loggingsystem. It discusses the potential advantages and disadvantages of aproxied RTP system approach, as well as the system’s architecture andmessage flow.

Page 3: Call Logging in an IP Environment Call logging is an important

Call Logging in an IP Environment Application Note

1

Table of ContentsIntroduction........................................................................................................... 2

High-Level Architecture ........................................................................................ 3

SER ............................................................................................................... 3

RTP Proxy Session Manager.......................................................................... 3

Message Flow........................................................................................................ 4

Acronyms ............................................................................................................. 6

For More Information............................................................................................. 6

Page 4: Call Logging in an IP Environment Call logging is an important

Introduction

Contact centers use call logging to record calls for avariety of purposes, such as agent training or legalrequirements. As contact centers move from a TDM to anIP environment, call logging will continue to be a usefulfunction; however, the method for performing calllogging will change.

This application note covers a methodology for calllogging in an IP environment. The described approachuses the SIP Express Router (SER), a high-performance,configurable, open source SIP (RFC3261) server, as wellas a combination RTP proxy/logger, which is alsomaintained as one of the adjunct projects related to SER.

The RTP proxy is mainly used for NAT firewall traversal.In call logging, its SER interface and session managementcapabilities are used, and its RTP packet relay is adaptedfor use with the IP Media Library (IPML) API andDialogic® Host Media Processing Software Release3.1LIN. The result is that a full-duplex audio stream canbe placed on the “virtual SCbus,” which is created byDialogic HMP Software, and recorded to disk.

Using Dialogic HMP Software as a media manager in theproxied RTP system described here has a number ofadvantages:

• Easier application programming using a familiar API

• Increased channel density

• Enables use of low-bit-rate voice encoders, resulting inless disk space needed for recording

• Provides full control of the recording process,including termination

• Easier access to voice streams for operations, such asstreaming to an ASR server for word spotting

Two disadvantages to this type of system are as follows:

• The system alters the architecture of a call centerwhen it is implemented

• A point of failure is created when a call is routedthrough the logging system (if it were to fail, callcenter operation would be impacted)

The SER is available for use in a UNIX or Linux environ-ment. Since it is a relatively lightweight application, it canreside on the same Linux system as the Dialogic HMPSoftware 3.1. For this reason, this application notedescribes a single-chassis approach. However, a largerapplication that includes additional functionality, or animplementation that requires greater channel density,could follow the basic single-chassis model described here,but distribute the components among multiple boxes.

Note: The methodology described in this applicationnote is not intended to be used as a complete call centersolution, which likely would require one or more othercomponents. However, for the sake of clarity, only calllogging is discussed.

Application Note Call Logging in an IP Environment

2

Page 5: Call Logging in an IP Environment Call logging is an important

High-Level Architecture

Figure 1 is an illustration of the high-level architecture of

the call logging system discussed in this application note.

The following sections discuss the two main components,

SER and RTP Proxy Session Manager, and how they

are used.

SER

The SER functions as a SIP proxy and a control process

for the recording component. From the point of view of

the SIP endpoints (User Agents or UAs) in the network,

SER plays a fairly standard role as a SIP proxy. Outbound

calls from the endpoints are directed to the proxy, where a

database lookup is used to decide the final destination of

the call. The router delivers the SIP message to thedestination endpoint, but before doing so, modifies theRTP connection information in the Session DescriptorProtocol (SDP) portion of the SIP message. The RTPstreams do not flow directly between the two endpoints,but are rerouted so that they pass through the call loggingsystem. This does not have to happen when a call isinitiated (during the INVITE), but can happen when thecall is already in progress (through a re-INVITE message).An advantage of using a re-INVITE is that ports in thesystem can be left free until they are needed for recording.

RTP Proxy Session Manager

When recording begins, the second component comesinto play. The SER interfaces with the RTP proxy session

Call Logging in an IP Environment Application Note

3

SIP Endpoint 1(Agent)

SIP Endpoint 2(PSTN Gateway)

SIP Express Router

RTP Proxy Session Manager

IPML (RTP Streaming)

Media (Transaction Record)

RTP SIP SIP RTP

Unix Domain Socket

HMP-BasedLogging

Application

LinuxSystem

VoiceFile Store

Figure 1. High-Level Architecture

Page 6: Call Logging in an IP Environment Call logging is an important

4

manager, and when the session manager is notified that anew call has arrived, it opens a session for the call andsupplies a unique port number to the SER. The SER thenreplaces the original address/port of the calling endpointwith the port number and the IP address of the loggingsystem.

Two RTP streams can now be set up between the loggingsystem and the two SIP endpoints instead of a singlestream that directly connects the two endpoints. Theapplication uses the IPML API to establish the streams,which appear on the virtual SCbus and can be routedtogether, forming a cross-connection. The streams arethen available for recording to disk, using the full featureset of the Dialogic® R4 Media API. Some media featuresthat can be used for call logging include:

• Use of a transaction record, which takes both half-duplex RTP streams and performs the necessaryprocessing usually performed by a DSP to mix thestreams before writing a single stream to disk. Thiseliminates the need for post-processing the twoseparate stream files to combine them into a singlesynchronized recording.

• Ability to set recording parameters on a per-recordingbasis, such as file format, data encoding, samplingrate, and bits per sample

• Ability to easily stream recording data into a BinaryLarge Object (BLOB) in a database or through asocket to a centralized recording serve

• Ability to stop recording with a single API call

• Ability to easily limit recording file size and recordingtime

A UNIX domain socket (First In, First Out [FIFO] inter-process message queue) connects the SER and theRTP proxy session manager. Communication betweenthese components is through a simple, application-defined message set that is part of the RTP proxy.

Message Flow

Figure 2 illustrates the message flow for a typical recordedcall in the Proxied RTP call logging system. The diagramcontains numbers that correspond to the numberedparagraphs below.

1. The SER is configured to operate as a stateful proxythat relays the SIP messages generated during a call.When the SER receives an INVITE request from thesource UA, it extracts its SIP call ID from the request

and communicates it to the RTP proxy sessionmanager via an inter-process socket connection.Using the ID, the session manager looks for anexisting session, and if the session exists, it returnsthe User Datagram Protocol (UDP) port for thatsession. If no session is found, it creates a newsession, binds it to the first empty UDP port from arange specified during configuration/startup, andreturns the number of that port to the SER. Afterreceiving a reply from the logging application, theSER replaces the original address/port of the callingendpoint with the port number and the IP address ofthe logging system and forwards the request as usual.

2. The SER receives a positive SIP reply (OK) from thedestination UA. From the SDP portion of the mes-sage, the SER again extracts its call ID and sends it tothe logging application. In this case it does notallocate a new session if none exists, but performs alookup among existing sessions and returns either aport number if the session is found or an error indi-cating that there is no session with that ID. When apositive reply is received from the logging applica-tion, the SER replaces the original address/port of thecalling endpoint with the port number and the IPaddress of the logging system and forwards the replyas usual.

3. After the session has been created, the loggingapplication establishes two separate RTP connectionsbetween itself and the outside UAs using the IPMLAPI. The logging application then bridges theresulting SCbus timeslots together, creating a full-duplex connection. Call recording can then beinitiated using multi-timeslot transaction logging.

4. When a BYE is received from one of the UAs, theSER relays it to the other UA. On receiving an OK,the SER extracts the call ID from the second UA andcommunicates it to the logging application. The IDis matched with an existing recording session.Recording is terminated and the streaming in bothdirections is stopped. An OK is relayed to theoriginator of the BYE message to complete the SIPsignaling.

Application Note Call Logging in an IP Environment

Page 7: Call Logging in an IP Environment Call logging is an important

Source SIPUser Agent

SIP ExpressRouter

HMPLogging

ApplicationDestination SIP

User Agent

INVITE/SDP

Open New Session

1

INVITE/SDPWith New IP: Port

Call ID

New IP: Port

OK/SDP

Call ID

Match Existing SessionNew IP: Port

OK/SDPWith New IP: Port

2

ACKACK

RTP Streams Start

Transaction RecordBegins

3BYE

BYE

OK

4

Call ID

Match Existing SessionTransaction Record Stops

RTP Streams StopOK

SIP MessageProprietary Socket Message

RTP Stream

Figure 2. Message Flow for a Typical Recorded Call

Call Logging in an IP Environment Application Note

5

Page 8: Call Logging in an IP Environment Call logging is an important

6

Application Note Call Logging in an IP Environment

Acronyms

API Application Programming InterfaceASR Automatic Speech RecognitionBLOB Binary Large ObjectDSP Digital Signal ProcessorFIFO First In, First OutHMP Host Media ProcessingIP Internet ProtocolIPML IP Media LibraryNAT Network Address TranslationRTP Real-time Transport ProtocolSDP Session Descriptor ProtocolSER SIP Express RouterSIP Session Initiation ProtocolTDM Time Division MultiplexingUA User AgentUDP User Datagram Protocol

For More Information

Dialogic Host Media Processing Software Release 3.1LIN—http://www.dialogic.com/products/ip_enabled/HMP31Linux.htm

Downloads for the Dialogic Host Media ProcessingSoftware Release 3.1LIN are available at http://www.dialogic.com/support/helpweb/dxall/hmplinux/hmp31/default.htm

SIP Express Router (SER) and SIP RTP Proxy —http://www.iptel.org/ser/

The SER and SIP RTP Proxy can be downloaded athttp://www.iptel.org/download#ser_stable

Page 9: Call Logging in an IP Environment Call logging is an important

www.dialogic.com

To learn more, visit our site on the World Wide Web at http://www.dialogic.com.

Dialogic Corporation9800 Cavendish Blvd., 5th floorMontreal, QuebecCANADA H4M 2V9

INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH PRODUCTS OF DIALOGIC CORPORATION OR ITS SUBSIDIARIES (“DIALOGIC”). NOLICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT ASPROVIDED IN A SIGNED AGREEMENT BETWEEN YOU AND DIALOGIC, DIALOGIC ASSUMES NO LIABILITY WHATSOEVER, AND DIALOGIC DISCLAIMS ANYEXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF DIALOGIC® PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHT OF A THIRD PARTY.

Dialogic products are not intended for use in medical, life saving, life sustaining, critical control or safety systems, or in nuclear facility applications.

Dialogic may make changes to specifications, product descriptions, and plans at any time, without notice.

Dialogic is a registered trademark of Dialogic Corporation. Dialogic’s trademarks may be used publicly only with permission from Dialogic. Such permission may onlybe granted by Dialogic’s legal department at 9800 Cavendish Blvd., 5th Floor, Montreal, Quebec, Canada H4M 2V9. Any authorized use of Dialogic’s trademarks willbe subject to full respect of the trademark guidelines published by Dialogic from time to time and any use of Dialogic’s trademarks requires proper acknowledgement.

The names of actual companies and products mentioned herein are the trademarks of their respective owners. Dialogic encourages all users of its products to procure all necessary intellectual property licenses required to implement their concepts or applications, which licenses may vary from country to country.

This document discusses one or more open source products, systems and/or releases. Dialogic is not responsible for your decision to use open source in connectionwith Dialogic products (including without limitation those referred to herein), nor is Dialogic responsible for any present or future effects such usage might have,including without limitation effects on your products, your business, or your intellectual property rights.

Copyright © 2007 Dialogic Corporation All rights reserved. 11/07 9543-02