VBVoice netWorks

Accessing Statistics Data from VB

All statistics data is accessible from VB using a series of COM objects.

VBVStatistics Object

The VBVStatistics object is the root object that provides access to all VBVoice Statistics data. Only one VBVStatistics object needs to be created in an application. It provides access to three VBVStatBlock objects. It also provides methods to change ownership of calls within groups.

Properties

ActiveLines

((integer)

This property provides the number of lines currently in use - either on an active call or in a delay between calls

AvailableLines

(integer)

This property provides the number of lines in the wait for ring state. If this number is reduced to zero, any calls arriving at the system will get a busy signal.

ChannelStatistics

(VBVStatBlock)

This property returns the VBVStatBlock object for the specified channel.

GroupStatistic

(VBVStatBlock)

This property returns the VBVStatBlock object for the specified group.

TotalStatistic

(VBVStatBlock)

This property returns the VBVStatBlock object containing the total counts.

Version

The version number of VBVoiceStatistics. The current version is 5.

Methods

AddCallToGroup

AddCallToGroup(Channel as Integer, Group as Integer)

This method is used to permanently add a channel to a group.

EXAMPLE

vbvstats.AddCallToGroup 5, 24

In the example above, the method will add the call on channel 5 to group 24. The call duration, calls per hour, and user statistics for this call will be added to the statistics for group 24 at the end of each call, and the totalCalls count is incremented. Subsequent calls will not affect the group unless this function is called again. This assignment can be cancelled using the SetGroup method.

By default, calls do not belong to any group. The group allocation is cleared when the call on that channel ends.

SetGroup

SetGroup(Channel as Integer, Group as Integer)ResetCounts()

SetGroup is similar to AddChannelToGroup, except that any previous channel allocations are first reset. A channel value of 0 will clear the group of any channel allocations.

Reset

Reset

This method clears all statistics.

ResetCounts

ResetCounts

This method clears all call counts.

VBVStatBlock Object

The VBVStatBlock object provides access to a series of VBVStat objects. Each VBVStatBlock contains the VBVStat objects detailed below.

Properties

CallDuration

VBVStat object

This property contains the VBVStat object containing the call duration statistics.

CallsPerHour

VBVStat object

This property contains the VBVStat object containing the call-per-hour statistics.

User(1 to 4)

Array of VBVStat objects

This property contains an array of VBVStat objects containing the user-defined statistics.

MaxAveragingCount

Integer

MaxAveragingCount is used to average the counts for the measurement contained by this block. A small value will mean that the average value follows the last measurement closely, whereas a large value will mean that a long history will be retained and the most recent measurement will only have a small effect on the average value.

See Averaging.

TotalCalls

Long

TotalCalls is the total number of calls for this channel (for a ChannelStatistics object), the total number of calls allocated to a group (for a GroupStatistics object), or the total number of calls taken by the system (for a TotalStatistics object). The total is counted from the last call to the ResetCount method or from the initial loading of a VBVoice application.

Methods

Reset

Reset

This method clears all statistics in this block.

VBVStat Object

Each VBVStat object provides access to a statistics measurement. For example, to access the data for the average call durations on Channel 2, use this syntax:

Dim vbvstat as new VBVStatistics
debug.print vbvstat.ChannelStatistic(2).CallDuration.avg

Properties

avg

Integer

The running average of the item being measured. For example, average duration of a call.

last

Integer

Set this value during a call to record a user-statistic. The value is reset at the end of the call, after the value is added to the running average. For example, if the average above is to represent an average call duration, set this value to the duration of the call just ended.

min

Integer

Similar to the average value above, this integer represents the lowest valued of the measured parameter, for example the shortest call recorded.

max

Integer

Similar to the average value above, this integer represents the highest valued of the measured parameter, for example the longest call recorded.