2.4.1.7 Calls

Unlike line devices and addresses, calls are dynamic. A call or call appearance represents a connection between two (or more) addresses. One address is the originating address (the caller), which is the address from which the call originated; the other is the destination address (the called), which identifies the remote end point or station with which the originator wishes to communicate. At any given time, zero, one, or more calls can exist on a single address. A familiar example where multiple calls exist on single address is call waiting: while having a conversation with one party, a subscriber with call waiting is alerted when another party tries to call. The subscriber can flash his phone to answer the second caller, which automatically places the first party on hold. The user can toggle between the two parties by flashing. In this example, the subscriber has two calls existing on one address on his line. Since the human user at the telephone handset can only be talking to one remote party at a time, in this example, only one call is active per line at any point in time; the telephone switch keeps the other calls on hold. With a line able to model pools of channels, multiple active calls may exist on a call at any one time, depending on the configuration

The Telephony SPI identifies a specific call by means of a call handle. The TAPI DLL and the Service Provider both assign call handles as required. Since each needs to allocate a data structure to maintain the state information it associates with a call, each has its own handle. At the start of the lifetime of a call, the TAPI DLL and Service Provider exchange handles with one another. Then when the TAPI DLL calls a function to operate on a call, it passes the Service Provider's handle. Typically the Service Provider designer will implement its handles as pointers or array indexes. This allows simple and efficient access to the associated data structure given the handle. The TAPI DLL uses similar techniques to find its associated data structure when the Service Provider sends it a message that includes a call handle.

The TAPI DLL tells the Service Provider to dispose of a call handle by calling TSPI_lineCloseCall.