A template file is a set of instructions telling the system how to extract the necessary information from the data sent from your telephone system. A sample template is shown here to demonstrate its use.
'IPBX Demo Template 'Created 13 May 2001 'at 20:14 by JOHNSMITH Type = TEXT [Options] HeaderLike = " DATE ##-???-##*" HeaderTake = " xxxxxxxxx" [CallTypes] 'Outgoing Direct ##-???-## ##:##:## ???#:## ### aa bbb cc dd ee ff hhhh ii jjj 1 |
The file consists of a [Type] and [Options] section required to pre-process the data before it is usable, and a [CallTypes] section which holds the information necessary to extract the call record components from the raw data.
This describes how the information is presented to the software. Possible options are described below:
Type | Description |
---|---|
TEXT | Denotes that the data consists of plain text subscribing to the ASCII standard. |
BCD2.4 | Binary-coded decimal values, such as the proprietary format used in the Siemens Realitis PBX. |
EXTERNAL | Informs the system that the data needs to be passed to another separate application before the processing is possible. This setting also requires the path to the external application to be supplied in the [Options] section under the key name ExtPPFilename. |
This section contains the settings necessary to determine what data pre-processing is required - if any- before the individual call record elements can be extracted. Possible options are described below:
Option | Description | Default value |
---|---|---|
EndTime | Informs the call processor that the call time specified is actually the time that the call ended. This ensures that the duration of the call is subtracted from the given call time to achieve the effect of the start time. All call data stored in the database assumes that the call time is the time that the call started, not ended. | true or false |
SubtractAnswerTime | Notifies the call processor to subtract the answer (response) time from the call duration. Use this option if the duration of a call includes the response time. | true or false |
AddAnswerTime | Notifies the call processor to add the answer (or response) time to the call duration, if the PBX doesn't include it already. | true or false |
StartEndDuration | This option is used when a PBX outputs the call's start and end time separately, but no duration time is being outputted. Because the system requires a call duration, the end time appears as though it were the duration, in which case this option will instruct the system to subtract the value specified for call time (elements d, e and f) from the value specified for duration (elements g, h and i), in order to achieve the correct duration. | true or false |
Lines | Informs the system how many lines make up a call record. Requires the Line1 option in order to know how to recognise the first line of a call record. The pre-processor will then amalgamate all lines of a call record into a single line. | |
Line1 | Shows the system how to identify the first line of a call record. The system then knows how many further lines are necessary before the amalgamation occurs (see Lines option, above). |
This section contains information about how the system identifies each line of call logging data, in terms of its call type, e.g. outgoing, incoming, etc, and how to extract the call record elements from the each line. Each call type is being assigned a code, which is then used to identify each line of data with a particular type of call.
Each type of call consists of three lines of data, as shown below:
'Outgoing Direct Dial ##-???-## ##:##:## ???#:## ### ### ####?????????????????????????????????##* aa bbb cc dd ee ff hhhh ii jjj mmm kllllllllllllllll 1 |
Symbol | Description |
---|---|
##-???-## ##:##:## | The match line, which informs the system how to match this particular call type |
# | Indicates any digit between 0 and 9 |
? | Indicates any character including letters and numbers |
* | Indicates that any character or number of characters further on that line are ignored |
Symbol | Description |
---|---|
aa bbb cc dd ee ff | Informs the system how to extract each call record element from the line of data |
aa | Spans the first two characters of the data line meaning that the call date's day should be taken from here; |
bbb | Spans three characters starting at column 4 showing where the month is taken from, and so on. |
The third line contains the code associated with the type of call. These call type numbers are internally used to identify the call type, as follows:
Call Type # | Type of Call |
---|---|
1 | Outgoing direct dialled |
2 | Outgoing failed to connect |
7 | Mobile call |
8 | Mobile SMS |
50 | Outgoing transferred |
100 | Answered direct dialled |
101 | Answered transferred |
150 | Abandoned direct dialled |
151 | Abandoned transferred |
200 | Internal call |
300 | Feature call (dialled number should contain the feature number) |
400 | Tandem Call |
500 | Event types sent to CTI server |