Share via


Media Control

An application can request the execution of a limited set of media-control operations on the call's media stream triggered by telephony events. Although an application is encouraged to use the media API specifically defined for the media type or TAPI 3 media controls, TAPI 2.2 media control can yield a significant performance improvement for client/server implementations. The lineSetMediaControl function is used to set up a call's media stream for media control by allowing an application to specify a list of tuples specifying a telephony event and the associated media-control action. The following are telephony events that can trigger media-control activities:

  • Detection of a digit: The application provides a list of specific digits and the media-control action that each of them triggers.
  • Detection of a media type: The application provides a list of media types and the media-control actions that a transition into the media type triggers.
  • Detection of a specified tone: The application specifies a list of tones and the media-control action that each tone detection triggers.
  • Detection of a call state: The application specifies a list of call states and the media-control action that each transition to the call state triggers.

The media-control actions listed below are defined generically for the different media types. Not all media streams can provide meaningful interpretations of the media-control actions. The operations should map well to audio streams:

  • Start starts the media stream.
  • Reset resets the media stream.
  • Pause stops or pauses the media stream.
  • Resume starts or resumes the media stream.
  • Rate up increases the rate (speed) of the media stream by an implementation-defined amount.
  • Rate down decreases the rate of the media stream by an implementation-defined amount.
  • Rate normal returns the rate to normal.
  • Volume up increases the volume (amplitude) of the media stream.
  • Volume down decreases the volume of the media stream.
  • Volume normal returns the volume to normal.

The scope of media control is bound by the lifetime of the call. Media control on a call ends as soon the call disconnects or goes idle. Only a single media-control request can be outstanding on a call across all applications.