Common Call Routing Properties

Every VBVoice control has unique properties. The unique properties can be accessed via the Toolbox Reference. However, in most controls there are some common properties that can be used to control call routing at runtime and to override the graphical connections established at design time.

These common properties include GotoNode and TakeCall.

Property GotoNode

VB
GotoNode(channel as Integer) As Integer

C#
short GotoNode[int channel]

This property is used by code in the Enter , 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, a VB error is raised, which can be caught using On Error.

EXAMPLE:

VB

GetDigits1.GotoNode(channel) = 4 ' Transfer to 5th output (node 4)

C#

GetDigits1.GotoNode[e.channel] = 4; // Transfer to 5th output (node 4)

TakeCall Method

VB
TakeCall (Channel as Integer)

C#
TakeCall(short channel)

Use this method to move a call to a new control, following the syntax below.

EXAMPLE

VB

Private Sub Dial1_Enter(ByVal channel As Integer, ByVal Greeting As Object)
   User1.TakeCall(channel) ' Transfer from Dial1 to User1
End Sub

C#

private void dial1_EnterEvent(object sender, _DDialEvents_EnterEvent e)
{
   user1.TakeCall(e.channel); // Transfer from dial1 to user1
}

The destination control (User1) does not need to be connected to the current control and does not need to be on the same form.

If this method is called in a VBVoice control event related to the same channel, then the call is transferred as soon as the event procedure exits.

If this method is called at another time, or from another type of event, then a stop function is called which will terminate the current activity. Once the driver has stopped, the call will be moved to the control requested.

While the method is waiting for the channel to stop, other calls to this method or to other asynchronous methods such as StopCall and IdleChannel will generate a trappable error, typevbvErrCmdInProgress.

Note: The LineGroup control does not support the TakeCall method.