Generating Statistics and Reports in netWorks

The statistics package provides a wide range of voice system statistics. The data provided can be customized easily to the needs of your system through the use of user-assigned call groups and user-assigned fields.

The data can be displayed in a web browser, in the NT Performance Monitor utility perfmon.exe, or from an ADO-aware control. Perfmon can also log the data to a file, and provide alerts to an administrator station when critical service levels are reached. Read/write access to the data is provided by a hierarchy of COM objects, and read access is provided by an ADO object, and by the web browser integration component.

Statistics

Seven types of statistics measurement are provided. Minimum, Average, Maximum, and Last values are provided for each measurement and each is reported by channel, group, and system total. Up to four user-defined measurement fields are also available.

The Statistics for all channels are available to all applications, including channels not allocated to your application.

Measurements

Call Spacing/Calls per Hour

Calls per Hour is measured using the time between calls, in seconds. To calculate calls per hour from this value, it must be divided into 3600 (the number of seconds in an hour). For the Total Calls per hour statistic, this value should be multiplied by the number of channels in the system.

Average Call Duration

Average Call Duration is measured in seconds.

This value can be useful for detecting faulty lines when measured by channel or for monitoring system use, especially when used in conjunction with the Group capability.

See Averaging.

User-Defined Measurements

These values are set during a call by VB code using the Object Model. See accessing statistics data from VB.

VBVoice Statistics averages these values, maintains minimum and maximum values, and makes them available from all the data access methods described below.

Total Call Count

The total number of calls for each channel, for each group, and for the total system.

Averaging

Each measurement consists of four values: minimum, maximum, average, and last value. The average value is calculated as a running average. The maximum number of samples over which the average is calculated (which affects how much the average is affected by each new value) can be set on a per channel or per group basis.

The default value is 50. When the threshold of 50 calls has been reached, the calculation for the new average will be:

new average = ((old average * 50) + new value) / 51)

The property maxAverageCount controls the number of samples used for averaging. Setting a maxAverageCount of 0 will mean the average will follow exactly the last value.

Categories

Each measurement can be monitored by:

Call Groups

There can be as many call groups as you wish, configurable by an INI setting. There are two types of call group: a channel can be a member of any of the first 32 call groups and can also be a member of one (and only one) of the remaining groups.

Groups are allocated to each call by your code using the AddCallToGroup and SetGroup methods in the VBVStatistics object. For example, you may wish to assign one call group to failed transfers and another group to callers that request the operator extension, or you may wish to assign a call to a group based on a mailbox number entered by the caller, to allow statistics based on user ID.

A call does not need to be exclusively in one group or another - although you can use them this way if you wish. There is no limit on the number of call groups. Each call group will use 82 bytes of memory.

Setting the number of groups

By default there are 64 groups, the 32 groups in the first category and 32 groups in the second category. This is changed by an INI setting in vbvoice.ini:

[Logs]
maxcallgroups = 64
Storage

VBVoice Statistics are stored in a memory-mapped file, as is the LineStatus information. This file continues to exist as long as at least one process has an open handle to this file. VBVRLog.exe opens a handle to this file on startup, as does VBVoice when the StartSystem method is used. The data will be reset when all applications with a handle to the file are closed.

Data Access Methods

COM Object Model

A hierarchy of COM objects allows direct access to the measurement data, making full use of the syntax checking and IntelliSense technology in Visual Basic.

Read-write access to all performance data is provided by a hierarchy of COM objects making full use of VB syntax checking. The user-assigned measurements can be directly assigned from VB code.

EXAMPLES

  1. channel5avg = VBVStats.ChannelStatistic(5).CallDuration.avg

  2. VBVStats.GroupStatistic(2).UserStat.last = 324

Integration with NT Performance Monitor

VBVoice statistics can be collected by Performance Monitor either locally or remotely across an NT network using perfmon.exe. In addition, perfmon.exe provides log-to-file and alerting capabilities - for example, your network administrator can be notified by perfmon if call durations or call volume on a particular channel drops to a low level, indicating a problem on that channel. Notification can also be made if one of the user-assigned measurements is set to an abnormal value.

Web Browser Integration

Call Statistics data can be sent a web page upon request and can be updated dynamically by JScript. See Web Browser Integration. The page layout is defined in DHTML and the fields can reflect the description of your call groups.

ADO Objects

Read more about the ADO Data Object.

Examples of VBVoice Statistics

Tracking Call Transfers

In an auto-attendant system, you may want to keep track of what percentage of calls are successfully transferred, what percentage are routed to an operator, and what percentage are routed to voice mail.

This can be done by assigning each category to a group. For example, group 2 is successful transfers, group 3 is failed transfer and took message, and group 4 is failed transfer with no message.

Once the call result is known, use the AddToGroup method to add that channel to the correct group. In your web page, compare the total call counts for groups 2, 3 and 4 against the total call count to get the required statistics.

Tracking System Feature Use

You may also want to keep track of how many callers use the directory list feature.

Assign a new group for this category, for example group 5, and use the AddChannelToGroup method to create a count of callers that use this feature by adding this code to the Enter event

myLog.AddCallToGroup(Channel, 5)

Monitoring Time Spent

You could also measure how long each caller spends in certain parts of the system, by using one of the UserStat fields. In the example, we measure how long a caller spends listening to messages in the messages form.

Performance Monitor

VBVoice statistics can be used by NT Performance Monitor to display statistical information in real-time, to log the activity to a log file, and to provide administrator alerts when critical thresholds are exceeded. NT Performance Monitor can be used to monitor any machine on the network.

The following measurements are provided to the Performance Monitor. In each case a measurement type is provided, coupled with a range of instances:

EXAMPLE

Selecting Avg Call Duration By Channel with an instance of 3 will select monitoring of call durations on channel 3.

Selecting Avg User Stat 4 By Group with an instance of 5, will select monitoring of user statistic 4 on all calls allocated to group 5.

Performance Categories

General

  • Active Lines: measures lines in use

  • Available Incoming Lines: measures lines in the wait for ring state

  • Total Calls By Channel

  • Total Calls By Group

  • Avg Call Duration By Channel

  • AvgCall Traffic By Channel

  • Avg Call Duration By Group

  • Avg Call Traffic By Group

  • Last Call Duration By Channel

  • Last Call Duration By Group

User Data By Group

  • Avg User Stat 1 By Group

  • Avg User Stat 2 By Group

  • Avg User Stat 3 By Group

  • Avg User Stat 4 By Group

  • Last User Stat 1 By Group

  • Last User Stat 2 By Group

  • Last User Stat 3 By Group

  • Last User Stat 4 By Group

User Data by Channel

  • Avg User Stat 1 By Channel

  • Avg User Stat 2 By Channel

  • Avg User Stat 3 By Channel

  • Avg User Stat 4 By Channel

  • Last User Stat 1 By Channel

  • Last User Stat 2 By Channel

  • Last User Stat 3 By Channel

  • Last User Stat 4 By Channel

A sample performance monitor profile, SamplePerfChart.PMC, is provided in the netWorks examples directory. This sample monitors average call durations for the system, the number of calls in group 1, and the call traffic in the system.

The Active Lines and Available Incoming Lines performance categories are only valid when used with the instance All.

Using Performance Monitor

Run Performance Monitor through perfmon.exe from the Run command or from Start Menu / Administrative Tools / Performance Monitor.

To monitor a statistic in real-time:

  1. Select View/Chart

  2. Select Edit / Add to Chart

  3. Select the computer to monitor

  4. Select VBVoice from the Object drop-down list

  5. Select the required counter from the Counters list

  6. Select the instance (for example, channel or group) from the Instance list

  7. Select the colour, scale, and so on (the defaults are normally adequate)

  8. Click Add

  9. If desired, add more statistics before closing this window

To alert when a statistic exceeds or goes below a critical value:

  1. Select View/Alert

  2. Select Edit / Add to Alert

  3. Select the computer to monitor

  4. Follow steps 1 to 3 above for real-time statistics

  5. Specify alert settings in the Alert if... and run program. Dialog boxes as required.

  6. Click Add

  7. If desired, add more alerts before closing this window

To start a log of VBVoice statistics data:

  1. Select View/Log

  2. Select Edit / Add to Log

  3. Select the computer to monitor

  4. Select VBVoice

  5. Click Add

WARNING: This may require a large amount of disk space, depending on the frequency at which the information is stored and the number of data types requested.

Examples

Tracking Call Transfers

In an auto-attendant system, you may want to keep track of the percentage of calls successfully transferred, the percentage routed to an operator, and the percentage routed to voice mail.

To do this, assign each category to a group. For example, group 2 is successful transfers, group 3 is failed transfer but took a message, and group 4 is failed transfer with no message.

Once the call result is known, use the AddToGroup method to add that channel to the correct group. In your web page, compare the total call counts for groups 2, 3 and 4 against the total call count to get the required statistics.

In the exit event of the Dial control, the code would be:

Select Case dialTransfer.CallResult(Channel)
If dialTransfer.CallResult(Channel) = vbvConnected Then
   myLog.AddCallToGroup(Channel, 2)
Endif

In the exit event of the rcdTakeMessage control, the code would be:

If rcdTakeMessage.FileSize(Channel) = 0 Then
   myLog.AddCallToGroup(Channel, 3)
Else
   myLog.AddCallToGroup(Channel, 4)
Endif

Tracking System Feature Use

You may want to keep track of how many callers use the directory list feature.

Use a similar process, tracking call transfers, to achieve this. Simply assign a new group to this category and use the AddChannelToGroup method to create a count of callers that use this feature.

Group 5 is used for this. In the Enter event of the PlayList control, use this code:

myLog.AddCallToGroup(Channel, 5)

The call count for this feature is displayed in the statistics.htm page.

Monitoring Time Spent

You can measure how long parts of each call are spent in different parts of the system. Use the UserStat fields to accomplish this.