3.1.5 Call States
Most functions on calls only make sense while the call is in one of certain call states. This call state is checked, and the function returns an error if the call is not in one these states. The effect of the successful execution of a request may be some typical call state transitions. The Service Provider notifies the TAPI DLL about call state changes via call state messages. These messages report to the TAPI DLL and applications what state the call has just entered. Since unsolicited events may occur to calls (e.g., the other party disconnects), the TAPI DLL cannot assume that requests it issues will always result in certain fixed call state transitions except that if a request results in a error, there is no call state change as a result of the error.
This model gives the Service Provider designer maximum flexibility across different telephony environments. For example, it allows designs in which requests propagate through a network to a telelphony server such as a PBX while call state change reports propagate back to the local client at some later time. Such a design does not need to try to maintain a lock-step "view" of the current state of the call in both client and server that is always identical between the two sites.