Forwarding affects the treatment by the switch or network of incoming calls destined for a given address. The tapi32.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, unconditional), 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. Because the switch performs the forwarding action, tapi32.dll typically does not know when a call is 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 tapi32.dll. The consultation call can be used as any other call. After the connection is established, forwarding confirmation is received from the switch, the call is dropped (using TSPI_lineDrop), and forwarding is in effect. A LINE_ADDRESSSTATE message with a forwarding indication informs tapi32.dll about changes in the forwarding status of an address.
It may be impossible for a service provider to know at all times what forwarding is in effect for an address. Forwarding can be canceled or changed in ways that make it impossible for a service provider to be informed of it.