CallControl CallControl CallControl CallControl CallControl Class


Represents the properties, commands and events for handling calls on a telephony related device.

public : sealed class CallControl
struct winrt::Windows::Media::Devices::CallControl
public sealed class CallControl
Public NotInheritable Class CallControl
// This class does not provide a public constructor.

Windows 10 requirements

Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Media.Devices.CallControlContract (introduced v1)


This class provides access to events that can be monitored and used for modifying the behavior of your telephony-aware app. The following JavaScript code snippet shows how to add event listeners to the CallControl class, and then to respond to one of the events, AnswerRequested.

// Define the user-defined valriables
var callControls = null;
var audioTag;

// Add code to initialize your user-defined variables as needed
<code goes here>

// Initialize the telephony device
    function initDevice() {
        if (!callControls) {
            try {
                callControls = Windows.Media.Devices.CallControl.getDefault();

                if (callControls) {
                    // Add the event listener to listen for the various button presses
                    callControls.addEventListener("answerrequested", answerButton, false);
                    callControls.addEventListener("hanguprequested", hangupButton, false);
                    callControls.addEventListener("audiotransferrequested", audiotransferButton, false);
                    callControls.addEventListener("redialrequested", redialButton, false);
                    callControls.addEventListener("dialrequested", dialButton, false);

                    sdkSample.displayStatus("Call Controls Initialized");
                    id("scenario1Ring").disabled = false;
                } else {
                    sdkSample.displayError("No Bluetooth device detected.");
            catch (e) {                
                sdkSample.displayError("No Bluetooth device detected.");

// Event handler code to respond to the AnswerRequested event
    function answerButton() {
        // When the answer button is pressed indicate to the device that the call was answered
        // and start a song on the headset (this is done by streaming music to the bluetooth
        // device in this sample)
        sdkSample.displayStatus("Answer requested: " + callToken);
        audiotag = document.getElementById("audiotag");;

For the complete listing of this sample see How to manage calls on the default Bluetooth communications device.


HasRinger HasRinger HasRinger HasRinger HasRinger

Indicates whether the telephony device has a built-in ringer.


EndCall(UInt64) EndCall(UInt64) EndCall(UInt64) EndCall(UInt64) EndCall(UInt64)

Ends the specified call.

FromId(String) FromId(String) FromId(String) FromId(String) FromId(String)

Returns a CallControl class that represents the audio communications device specified by the DeviceInformation ID being passed.

GetDefault() GetDefault() GetDefault() GetDefault() GetDefault()

Returns a CallControl class that represents the default audio communications device.

IndicateActiveCall(UInt64) IndicateActiveCall(UInt64) IndicateActiveCall(UInt64) IndicateActiveCall(UInt64) IndicateActiveCall(UInt64)

Indicates that the specified call is now active.

IndicateNewIncomingCall(Boolean, String) IndicateNewIncomingCall(Boolean, String) IndicateNewIncomingCall(Boolean, String) IndicateNewIncomingCall(Boolean, String) IndicateNewIncomingCall(Boolean, String)

Informs the device that there is an incoming call.

IndicateNewOutgoingCall() IndicateNewOutgoingCall() IndicateNewOutgoingCall() IndicateNewOutgoingCall() IndicateNewOutgoingCall()

Updates device indicators to indicate an outgoing call.


AnswerRequested AnswerRequested AnswerRequested AnswerRequested AnswerRequested

Occurs when the device receives a request to answer a call.

AudioTransferRequested AudioTransferRequested AudioTransferRequested AudioTransferRequested AudioTransferRequested

Occurs when the device receives a request for an audio transfer.

DialRequested DialRequested DialRequested DialRequested DialRequested

Occurs when a number is dialed from the device.

HangUpRequested HangUpRequested HangUpRequested HangUpRequested HangUpRequested

Occurs when the device receives a request to hang up a call.

KeypadPressed KeypadPressed KeypadPressed KeypadPressed KeypadPressed

Occurs when a keypad button on the device has been pressed.

RedialRequested RedialRequested RedialRequested RedialRequested RedialRequested

Occurs when the device receives a request to redial.

See also