2.4.2.13 Call Forwarding
Forwarding affects the treatment by the switch or network of incoming calls destined for a given address. The TAPI DLL can specify call forwarding conditions based on origin of call (internal, external, selective based on caller ID), status of the address (busy, no answer, unconditionally), and destination address where calls are to be forwarded. When the specified conditions are met for an incoming call, the switch deflects the incoming call to the specified destination number. Note that because the switch performs the forwarding action, the TAPI DLL will typically not know when a call has been forwarded.
The TSPI_lineForward function provides a combination of call forwarding and do-not-disturb features. TSPI_lineForward also cancels any or all of the forwarding requests currently in effect. Some switches require that a call be established to the forwarding address in order for call forwarding to be initiated. On such systems, TSPI_lineForward allocates a consultation call and returns the handle for it to the TAPI DLL. The consultation call can be used as any other call. After the connection is established, forwarding confirmation is received from the switch, and the call is dropped (using TSPI_lineDrop), forwarding is in effect. A LINE_ADDRESSSTATE message with a forwarding indication informs the TAPI DLL about changes in an address' forwarding status.
TSPI_lineForward
Set or cancel call forwarding requests.
Note that it may be impossible for a service provider to know at all times what forwarding is in effect for an address. Forwarding may be canceled or changed in ways that make it impossible for a service provider to be informed of this fact.