# Genesys Quality Management Suite 8.1.520 : Modifying configuration files

## Semi-Automatic configuration

Basic configuration could be done through post-installation script `callrec-setup`, which is run after Call Recording installation. This script asks for main configuration options and ensures basic functionality of Instreamer support in Call Recording. But your installation script may not contains Instreamer configuration part, you may want to install Instreamer support into existing Call Recording installation or simply you demand more control over Instreamer support function – then is better way to use manual configuration procedure.

## Manual configuration

For manual and more detailed or specific configuration edit Instreamer configuration file (for example with `vim`) located here:

    /etc/callrec/instreamer.xml

Default configuration file looks like on next figure and contains placeholders (for example `@SOMETHING@`) at certain lines.

    <?xml version="1.0" encoding="UTF-8"?>
    <Configuration applicationName="InstreamerAdapter" version="1"
    bindName="//@IPADDRESS@:30400/CallrecConfiguration"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Language lng="en"/>
    <Logger fileName="/etc/callrec/instreamer.log4j.properties"
    loggerType="log4j"/>
    <Database>
    <Driver name="org.postgresql.Driver"/>
    <Pool name="Callrec" poolType="ibatis"
    url="jdbc:postgresql://@DBADDRESS@:5432/Callrec"
    connValidator="cz.zoom.util.dbpool.validator.PsqlValidator">
    <Login username="Callrec" password="Callrec"/>
    <Connections init="0" max="5" timeOut="5"/>
    <ConfigFile fileName="/etc/callrec/sqlMap-config.xml"/>
    </Pool>
    </Database>
    <SpecifiedConfigurations>
    <SpecifiedConfiguration name="global">
    <ItemString name="appCommBindName"
    value="//@IPADDRESS@:30400/remoteInstreamer" description="points to
    Application Communicator on Callrec Core server"/>
    <ItemString name="dbPool" value="Callrec"/>
    </SpecifiedConfiguration>
    <SpecifiedConfiguration name="default">
    <ItemString name="directory" value="/home/calls/$year$month$day"/>
    <ItemString name="file"
    value="instreamer_$callingN_$calledN_$counter_$timestamp.mp3"/>
    <ItemLong name="maxLength" value="@INSMAXTIME@" description="maximum
    length of recording in seconds"/>
    <ItemLong name="maxSilence" value="@INSMAXSILENCE@"
    description="maximum duration of silence before stopping recording"/>
    </SpecifiedConfiguration>
    <SpecifiedConfiguration name="instreamers">
    <EqualGroup name="instreamer">
    <ItemString name="name" value="@INSNAME@" description="name of
    instreamer - only numbers and characters allowed"/>
    <ItemString name="callingNumber" value="@INSCALLSFROM@"
    description="calling number - any number"/>
    <ItemString name="calledNumber" value="@INSCALLTO@"
    description="called number - any number"/>
    <ItemString name="streamUrl" value="@INSTREAMERURL@"
    description="URL of Instreamer stream"/>
    </EqualGroup>
    </SpecifiedConfiguration>
    </SpecifiedConfigurations>
    </Configuration>

The configuration file is divided into four parts: Database connection, Application communicator connection, Default settings for storing records and Instreamers connection options.

### Database connection

Database connection section contains standard connection information for connection to Call Recording database server. The first line determines the type of database and driver used, in most cases there is no need to change the default value (PostgreSQL):

    <Database>
    <Driver name="org.postgresql.Driver"/>

Next line contains main connection parameters for Call Recording database. On this line replace `@DBADDRESS@` with IP address of your database server and change port number according to your configuration (default value is set to 5432 and may stay unchanged in most cases):

    <Pool name="callrec" poolType="ibatis"
    url="jdbc:postgresql://@DBADDRESS@:5432/callrec"
    connValidator="cz.zoom.util.dbpool.validator.PsqlValidator">

For connection is also needful to specify user name and password for access into database. By default are both strings set to `callrec` – change them if needed.

    <Login username="callrec" password="callrec"/>

Rest two lines contain limits of connection number and timeout (in seconds) and path to file with database schema. You may not change them in single server installation, in multiserver environment the last line has to point to corresponding location (see subchapter 4.3).

    <Connections init="0" max="5" timeOut="5"/>
    <ConfigFile fileName="/etc/callrec/sqlMap-config.xml"/>
    </Pool>
    </Database>

### Application communicator connection

Call Recording communicates with Instreamer through its own Application communicator sub-module (created as part of Call Recording Core module). In section with `global` specified configuration you will need to set connection parameters for this Application Communicator. On fist line replace placeholder `@IPADDRESS@` with IP address of your Call Recording server (in multiserver environment with IP address of server running Call Recording Core module):

    <SpecifiedConfiguration name="global">
    <ItemString name="appCommBindName"
    value="//@IPADDRESS@:30400/remoteInstreamer">

The next line points to corresponding db pool and may not be changed (unless your database name differs from “`callrec`”):

    <ItemString name="dbPool" value="callrec"/>
    </SpecifiedConfiguration>

### Default settings for storing records

Because Instreamer sends audio data as stream instead of files, is needful to define filenames for newly created recording before storing corresponding records in database. Call Recording uses by default directory `calls` in `/home` for storing calls. There are also created subfolders for every day – in format YYYYMMDD (for example 20071224 for 24.12.2007). First line in this section (`default` specified configuration) points to directory for storing calls and uses standard variables for specifying subfolder name ($year will be there replaced with 2007 etc.). You may not need to change this line.

    <SpecifiedConfiguration name="default">
    <ItemString name="directory" value="/home/calls/$year$month$day"/>

Next line defines filename of created record and uses variables referring to last part of this configuration file – see subchapter 4.2.4 for explanation. Also this line should not be modified.

    <ItemString name="file"
    value="instreamer_$callingN_$calledN_$counter_$timestamp.mp3"/>

Because Instreamer can be set to continuous streaming, is very important to set maximum length of every record stored by Call Recording (after this period the recording of streamed audio will be saved and new file created). Replace placeholder `@INSMAXTIME@` with appropriate value. The maxLength parameter is in seconds.

    <ItemLong name="maxLength" value="@INSMAXTIME@">

For same purpose is there `maxSilence` parameter – this value determines the maximum of silence recorded before stopping recording. In other words – after defined pause will be recording of stream stopped and record stored as file on Call Recording server. Also this parameter is in seconds.

    <ItemLong name="maxSilence" value="@INSMAXSILENCE@"/>
    </SpecifiedConfiguration>

### Instreamer(s) connection options

Last part of configuration file contains parameters for all Instreamers in your network. By default is there only one Instreamer but you may add as many others as you want. To add new Instreamer just copy EqualGroup instreamer after previously configured one (before tag /SpecifiedConfiguration) and fill in parameters. The EqualGroup consist of these lines:

First line defines name of Instreamer device – this name (as well as all other parameters) is displayed in Call Recording web-based interface and helps you to identify records from Instreamer units. You may fill in anything you want (replace placeholder @INSNAME@) – but allowed are only letters and numbers (no special characters and spaces):

    <EqualGroup name="instreamer">
    <ItemString name="name" value="@INSNAME@"/>

Because Call Recording needs at least two numbers – calling and called – for storing record in database and Instreamer sends only audio data, is needful to specify these two parameters manually. Replace placeholder `@INSCALLSFROM@` with any number (will be displayed in Call Recording as Calling number) and as well `@INSCALLTO@` with other one (called number in Call Recording). There should be any numbers, this parameters is used only for better recognizing calls recorded from Instreamers in Call Recording.

    <ItemString name="callingNumber" value="@INSCALLSFROM@"/>
    <ItemString name="calledNumber" value="@INSCALLTO@"/>

And finally last line points to Instreamer URL. Replace value @INSTREAMERURL@ with value according to your configuration (the format of this URL should be like this one: `http://192.168.55.47/xstream` - see chapter 3 for explanation).

    <ItemString name="streamUrl" value="@INSTREAMERURL@"/>
    </EqualGroup>

Now save whole configuration file and you are done with modifications.

## Multiserver environment differences

In multiserver Call Recording installation are there two differences from settings described in previous chapters. Firstly – you have to install Instreamer module on primary Call Recording Storage server (where all other recorded calls are stored) not on Core server (if you have independent Core and Storage). And secondly – is needful to copy one configuration file from Core server to chosen Storage server (only if the configuration file isn’t on target server (in case of independent Storage server)):

1. Locate file sqlMap-config.xml on Call Recording Core server, this file is placed here:

       /etc/callrec/sqlMap-config.xml

2. Copy this file anywhere on Storage server with Instreamer module.

3. Change last line in default settings for database connection. Replace default value `/etc/callrec/sqlMap-config.xml` with location of copied file here:

       <ConfigFile fileName="/etc/callrec/sqlMap-config.xml"/>