TapiLineSetupForwarding Method |
Sets up forwarding of calls destined for the specified address on the line, according to the specified forwarding instructions.
Namespace: Traysoft.AddTapiAssembly: Traysoft.AddTapi (in Traysoft.AddTapi.dll) Version: 6.0.0.1110
Syntax public TapiCall SetupForwarding(
IEnumerable<TapiForwardEntry> forwardingInstructions,
int numRingsNoAnswer,
TapiAddress address
)
Public Function SetupForwarding (
forwardingInstructions As IEnumerable(Of TapiForwardEntry),
numRingsNoAnswer As Integer,
address As TapiAddress
) As TapiCall
public:
TapiCall^ SetupForwarding(
IEnumerable<TapiForwardEntry^>^ forwardingInstructions,
int numRingsNoAnswer,
TapiAddress^ address
)
Parameters
- forwardingInstructions
- Type: System.Collections.GenericIEnumerableTapiForwardEntry
An array of TapiForwardEntry objects that describes the specific forwarding instructions. - numRingsNoAnswer
- Type: SystemInt32
Number of rings before a call is considered a "no answer." - address
- Type: Traysoft.AddTapiTapiAddress
Address on the specified line whose incoming calls are to be forwarded.
To configure call forwarding for all originating addresses on the line, set this parameter to null (Nothing in Visual Basic).
Return Value
Type:
TapiCallA
TapiCall object representing a consultation call to the forwarding destination.
Most switches do not create a consultation call when setting up call forwarding.
SetupForwarding returns
null
(
Nothing in Visual Basic) if consultation call was not created.
Remarks
When an originating address (address parameter) or all addresses on the line are forwarded, the specified incoming calls
are deflected to the other number by the switch. This method provides a combination of forward and
do-not-disturb features. This method can also cancel forwarding currently in effect.
Forwarding of the address(es) remains in effect until SetupForwarding is called again. The most recent forwarding list
replaces the old one. Forwarding can be canceled by specifying null (Nothing in Visual Basic)
as the forwardingInstructions parameter. If a null destination address is specified for an entry in the forwarding
list, the operation acts as a do-not-disturb.
Forwarding status of an address can also be affected externally; for example, by administrative actions at the switch or by a user
from another station. It may not be possible for the TSP to be aware of this state change, and it may not be able to keep in
synchronization with the forwarding state known to the switch.
Examples The following code shows how to set up call forwarding. Error handling has been omitted for clarity.
TapiForwardEntry[] forward = new TapiForwardEntry[2];
forward[0] = new TapiForwardEntry(TapiForwardMode.Busy, "5551234567", null);
forward[1] = new TapiForwardEntry(TapiForwardMode.NoAnswer, "101", null);
TapiCall consultationCall = line.SetupForwarding(forward, 5, null);
if (consultationCall != null) consultationCall.Disconnect();
Dim forward As TapiForwardEntry() = New TapiForwardEntry(2) {}
forward(0) = New TapiForwardEntry(TapiForwardMode.Busy, "5551234567", Nothing)
forward(1) = New TapiForwardEntry(TapiForwardMode.NoAnswer, "101", Nothing)
Dim consultationCall As TapiCall
consultationCall = line.SetupForwarding(forward, 5, Nothing)
If consultationCall Is Not Nothing Then
consultationCall.Disconnect()
End If
No code example is currently available or this language may not be supported.
See Also