Call Scenario Using A TSP/MSP Pair
The following diagram illustrates the progress of an incoming call that involves both a TSP and an MSP.
Incoming Call Setup
- The TSP sends a LINE_NEWCALL message to TAPISRV. The call state is LINECALLSTATE_OFFERING.
- TAPISRV notifies clients of the call.
- TAPI3 creates the TAPI Call object, then calls ITMSPAddress::CreateMSPCall, which is implemented by the MSP.
- The MSP creates an MSP Call object and default streams based on the media types required for the call. It returns an IUnknown pointer to the MSP call object.
- TAPI3 aggregates the MSP Call object into the TAPI Call object, making interfaces such as ITStreamControl available to the application. It then notifies the application of the new call.
The application may then use methods such as ITStream::SelectTerminal to complete preparations for call completion.
Incoming Call Completion
- The application calls ITBasicCallControl::Answer.
- TAPI3 calls lineAnswer.
- TAPISERV calls TSPI_lineAnswer.
- The TSP initiates call streaming. Usually, the TSP sends a message to the corresponding MSP, and the MSP starts the streams. In some TSP/MSP implementations, the TSP starts the streams.
TSP/MSP Communication During Call Progress
Once the call is in progress, the TSP and the MSP communicate by passing opaque buffers through TAPISRV and TAPI3.
- The TSP sends information to the MSP by sending the LINE_SENDMSPDATA message to TAPISRV.
- The MSP receives information from the TSP through the ITMSPAddress:: ReceiveTSPData method. If the data is related to a MSP call object, an interface pointer to the MSP call object is provided as a parameter of that method.
- The MSP sends information to the TSP by sending a MSP_TSP_DATA event to TAPI 3.0.
- The TSP receives information from the MSP through the TSPI_lineReceiveMSPData function.
The exact process and content of communication between service providers is specific to a given TSP/MSP set.
Note For outgoing calls, the MSP typically knows about the call before the TSP. If the MSP tries to communicate with the TSP before the TSP is informed about a call, the communication will fail. When the MSP and the TSP need to exchange information concerning a specific call, the TSP should initiate communication.