CallTimer

Initial Setup Properties

Common (Voice and Data)

AutoRepeat

AutoCancel

IMaxCallTime

Runtime Properties

Common (Voice and Data)

Active

Duration

DurationSecs

GotoNode

MaxCallTime

Paused

StartTime

 

 

Methods

Common (Voice and Data)

Disable

Extend

ForceTimeout

Pause

Reset

Resume

StopCall

TakeCall

 

Events

Common (Voice and Data)

Enter, EnterB

Exit

 

Overview

This control performs two functions:

  1. It maintains a call duration timer which is started when the call enters the control through the main input

  2. It allows a maximum call time to be set on all or part of a call

When the time expires, current activity on the call is stopped, and the call is reset to the Stopped output of the CallTimer control. If the call enters the control through the Cancel input, any timing activity is terminated and the call exits through the Cancelled output.

Initial Setup Properties

AutoCancel

(Integer)

If set to 1, the timer will be stopped when the call leaves the page which contains the control. If set to 2, the timer will be stopped when the call leaves the VBVFrame control containing the CallTimer control. The timer can be restarted either by having the call enter the control again, or by using the Extend method. If set to 0, the call will continue until the timer expires, or the call is terminated

AutoRepeat

(Boolean)

If set to True, the timer will not be reset when the timer expires. The timer can be restarted either by having the call enter the control again or by using the Extend method. If set to False, the timer will be restarted automatically upon expiry.

IMaxCallTime

(Integer)

This is the initial value of the timer, as set in the property page. This value is used as the initial value for each timer. The time for each call can be changed in the Enter event EnterEvent using the MaxCallTime property.

Runtime Properties

Active

(Channel as integer) Boolean

Indicates whether the timer is active. It is read only.

Duration

(Channel as Integer) Date

This property returns the time since the last call on the specified channel entered this CallTimer control. The duration property continues incrementing until another call enters the control on that channel.

DurationSecs

(Channel as Integer) Long

This property returns the number of seconds since the last call on the specified channel entered this CallTimer control. The duration continues incrementing until another call enters the control on that channel.

GotoNode

(Integer)

This property will transfer a call to another control. See GotoNode.

This property is used by code in the Enter EnterEvent, Exit, and Disconnect events (as well as other events where specified).

Use it to override control routing defined at design time. Set this property to a valid node number in the control where the event occurs and it routes the call to the control connected to that node. Node numbers start at 0, numbered from the top.

If GotoNode is set to 0, the call is passed to the control connected to the first (top) node. The transfer takes place as soon as the event code is completed.

GotoNode can also be set to one of the ExitNodeConstants (see vbvExitNodeConstants) to invoke the default invalid digit, no digits, help digit, or caller hang-up handlers.

An error is generated if the node number is invalid. If the node is not connected, processing continues, but a VoiceError event is generated when VBVoice attempts to transfer the call, and default error handling ensues.

MaxCallTime

(Channel as Integer)Long

This property sets and returns the maximum duration of the call in seconds after the call enters this control. This value is set when the call enters the control to the value of IMaxCallTime, and can be set to a new value in the Enter eventEnterEvent. When the time expires, the call is returned to the Stopped output of this CallTimer control, unless the timer is cancelled.

Paused

(Channel as integer) Boolean

Indicates whether the timer is paused. It is read only

StartTime

(Channel as Integer) Date

This property contains the time at which the last call entered this control.

Methods

Disable

Disable (Channel as Integer)

Disables the timer. Call-flow is not changed.

Extend

Extend (Channel as Integer, Seconds as Integer)

This method extends the number of seconds allowed for this call. For example, if the initial IMaxCallTime for a call is 10 seconds and the call has been active for 7 seconds since entering this control, then there are 3 seconds left. An Extend method with the value 10 will allow the call to continue for another 13 seconds without interruption.

ForceTimeout

ForceTimeout (Channel as Integer)

Same as StopCall. Forces a timeout and causes the call-flow to exit out of Timeout node.

Pause

Pause (Channel as Integer)

Pauses the timer if it is not paused already. The call-flow is not changed.

Reset

Reset (Channel as Integer)

Resets the timer which will start counting again from MaxCallTime seconds.

Resume

Resume (Channel as Integer)

Resumes the timer if it is not paused already. The call-flow is not changed.

StopCall

StopCall (Channel as Integer)

Stops the call and returns it to the control connected to the Stopped output. If the timer in this control is active, it is deactivated.

TakeCall

This method allows the programmer to override graphical connections and transfer a call to any other control. See TakeCall.

Events

Enter

Enter (Channel As Integer, Greeting As Object)

The Enter event is executed by the control upon call entry. If the GotoNode property is set or the TakeCall method is used, the call exits this control and is handled by the new control after the Exit Sub or End Sub statement. Read more about Enter, EnterB Events.

Exit

Exit (Channel As Integer, Node As Integer)

This event fires when a call leaves a control, but before the Enter event occurs in the destination control. Read more about Exit Event.

CallTimer Setup Page

Max Time for Call

(IMaxCallTime property)

The initial value of the timer for each call. This can be changed for each channel using the MaxCallTime property.

AutoCancel

Choose one of:

Never

(AutoCancel property = 0)

This option determines that the timer will only terminate if the call is terminated.

When call leaves this page

(AutoCancel property = 1)

This option determines that the timer will be stopped when the call leaves the page that contains the CallTimer control.

When call leaves this frame

(AutoCancel property = 2)

This option determines that the timer will be stopped when the call leaves the VBVFrame control that contains the CallTimer control.

Auto Repeat

(AutoRepeat property)

If this option is chosen, the timer will not be reset when it expires. The timer can be restarted either by having the call enter the control again, or by using the Extend method. If not chosen, the timer will be restarted automatically upon expiry.