LineGroup Methods

Some of the methods described below alter the line state. In order to do this, the LineGroup stops current activity on the line and then sets the line into the required state. This process takes a finite amount of time, during which an attempt to change the state of the line using another method will cause this runtime error: ErrCommandInProgress.

AddChannel

AddChannel(Channel as Integer)

Adds another channel to the channels already allocated to this control. The channel is put into the state defined by the Mode property, for example if the mode is WaitForRing, the channel will start waiting for a ring. If the channel is already allocated to this control, the command is ignored. Generates a trappable error if the channel has a call active.

If using TAPI, you must have run the TAPI Line Mapper utility at least once in order to select the TAPI lines to be used by VBVoice.

Read about adding channels dynamically at runtime.

BridgeChannelToChannel

BridgeChannelToChannel(Channel1 as Integer, Channel2 as Integer) as Integer

Makes a bi-directional connection between channel1 and channel2. Any resources that channel1 or 2 were listening to before issuing this call will no longer be listened to. Any resources listening to either channel1 or 2 will still be listening. Returns 0 if successful. DisconnectChannelFromChannel should be called when either call is terminated.

BridgeChannelToResource

BridgeChannelToResource(Channel1 as Integer, ResourceID as Integer) as Integer

(Not supported by DM3 and HMP cards; use of this method is not recommended as it will be deprecated)

Like BridgeChannelToChannel(), it makes a bi-directional connection between a channel and a resource. The Resource, identified by a ResourceID, could be any voice or fax DSP resource available on the on a Dialogic card. The resoureceID is an integer , equal to VBVoice channel number minus 1. DisconnectChannelFromResource should be called when the call is terminated.

DisableGlobalTone, EnableGlobalTone

(Channel as Integer, ToneID as Short)

(Not supported by HMP)

These two methods are used to selectively enable/disable global tones on a given channel. Please note that these methods have effect only on the channel on which they have been called.

The global tones are defined by the user in the VBVOICE.INI file. Each tone is identified by an integer number (starting at 1) called a Tone ID. The tone definitions are loaded into the Dialogic cards at system start and then automatically detected by the card at run time.

For more information, please refer to Global Tones Handling.

DisconnectChannelFromChannel

DisconnectChannelFromChannel(Channel1 as Integer, Channel2 as Integer) as Integer

Reverses the effects of BridgeChannelToChannel() and re-establishes the normal connection of line to voice resource.

DisconnectChannelFromResource

DisconnectChannelFromResource(Channel1 as Integer, Resource as Integer) as Integer

(Not supported by DM3 and HMP cards including; use of this method is not recommended as it will be deprecated)

Reverses BridgeChannelToResource.

DivertCall

DivertCall(Channel as Integer, Address as String)

(TAPI and Dialogic (DPNSS and QSIG) only)

Diverts a call to another line without answering. The address must be the name of a line.

This method may only be used before the call is answered, typically in the Ring event. Once a call is diverted, not further processing makes sense, so the call flow should be passed to an OnHook control.

GrabChannel

(strParam as String)

This method is used by a slave application to do outdial or bridging. GrabChannel sends a request to the master to start a channel. The master must have a SlaveStart control connected to the Start exit of the LineGroup. The SlaveStart control has the Will Do Outbound check box enabled on its property page.

If a channel is available in the master's LineGroup, it is started and the outbound SlaveStart will send the channel to the slave that requested it. The channel will then exit the Start exit node of the slave's LineGroup. The channel is still on-hook.

The GrabChannel does not have a channel number parameter because a slave does not know which channels are available on the master. The strParam string is used to pass a data string to the started channel. When the outbound channel starts, it can use the OutDialParam property to extract the data string.

HoldCall

HoldCall (Channel as Integer)

(Dialogic ISDN (DPNSS, QSIG) only)

Puts a call on hold.

IdleChannel

This method sets a channel idle, if it is currently waiting for rings or in a pre-call delay. This method generates a trappable error if the channel has a call active. If the channel is not allocated to this control, an error is also returned. To idle an active channel, stop it first using the StopCall method.

ListenToChannel

ListenToChannel(listen_channel as Integer, broadcast_channel as Integer) as Integer

Makes a one way connection from one channel to another. Use StopListeningToChannel to put the channel back to the normal state.

ListenToResource

ListenToResource(listen_channel as Integer, Resource as Integer) as Integer

Makes a one way connection from one channel to a resource. Use StopListeningToResource to put the channel back to the normal state.

MapStationDNToChan�nel

MapStationDNToChannel(ByVal StationDN as String) As Integer

(Not supported by HMP)

Map a station dialling number to its corresponding channel. Return the channel number if the channel exists. Otherwise, a trappable error occurs. For more information, see description for the Ring Control.

MapChannelToStationDN

(Not supported by HMP)

MapChannelToStationDN(ByVal Channel as String) As String

Map the channel number to an dialling Number. Return the correspond�ing dialling number if the channel is an station set channel and it has been assigned a dialling number. Otherwise, an error occurs. For more information, see description for the Ring Control.

RemoveChannel

RemoveChannel(Channel as Integer)

Removes a channel from the list of channels allocated to this control. It generates a trappable error if the channel is not allocated to this channel or if the channel is currently active.

RetrieveCall

RetrieveCall(Channel as Integer)

(Dialogic ISDN (DPNSS, QSIG) only)

Retrieves the call that was previously put on hold.

StartCall

StartCall(Channel as Integer)

If the channel is idle or waiting for rings, a call is started by transferring the call to the control connected to the Start output. Normally, a Dial control is then used to take the line offhook and start dialling. If a call is active on the specified channel when this method is called, the system will wait until the call has completed and the line is on hook, then the control will wait for the pre-call delay (DelayTime property), and then exit out of the Start node.

Generates a trappable error if the channel is not allocated to this control.

StopCall

StopCall(Channel as Integer)

When this method is called, the channel behaves in the same way as described in the MaxCallTime property. Invoke this method at any time during a call. See IMaxCallTime for a description of system behavior when a call is stopped.

StopListeningToChannel

StopListeningToChannel(listen_channel as Integer, broadcast_channel as Integer) as Integer

Reverses a previous call to ListenToChannel and puts the channels back to the normal state.

StopListeningToResource

StopListeningToResource(listen_channel as Integer, Resource as Integer) as Integer

(Not supported by DM3 and HMP cards; use of this method is not recommended as it will be deprecated )

Reverses a previous call to ListenToResource and puts the channels back to the normal state.

The help digit handler provided here can be overridden using the Connections property page in individual controls and the Disable Help Digit field in the GetDigits and VoiceRec controls.

WaitForRing

(Channel as Integer)

For analog lines, causes the channel to wait for the number of rings as defined by RingsToAnswer. When the requested number of rings occurs, the Ring event fires, the line is taken off hook and call started with the control connected to the Ring output.

For digital lines, causes the channel to wait until a call is detected by the drivers. When a call is detected, the ring event fires, the line is taken off the hook, and call started with the control connected to the Ring output.

See also the Ring event.

Generates a trappable error if the channel is not allocated to this channel or if the channel is currently active.

Read more about LineGroup control.