Show / Hide Table of Contents

    Interface ICall

    The stateful call interface.

    Inherited Members
    IDisposable.Dispose()
    Namespace: Microsoft.Graph.Communications.Calls
    Assembly: Microsoft.Graph.Communications.Calls.dll
    Syntax
    public interface ICall : IResource<ICall, Call>, IResource, IResourceBase, IDisposable

    Properties

    CorrelationId

    Gets the correlation identifier.

    Declaration
    [Obsolete("Please use ScenarioId instead.")]
    Guid CorrelationId { get; }
    Property Value
    Type Description
    Guid

    MediaSession

    Gets the media session, if any. This is used only for Local Media Scenarios.

    Declaration
    IMediaSession MediaSession { get; }
    Property Value
    Type Description
    IMediaSession

    Participants

    Gets the Participants collection for this call.

    Declaration
    IParticipantCollection Participants { get; }
    Property Value
    Type Description
    IParticipantCollection

    Resource

    Gets the call resource.

    Declaration
    Call Resource { get; }
    Property Value
    Type Description
    Call

    ScenarioId

    Gets the scenario identifier.

    Declaration
    Guid ScenarioId { get; }
    Property Value
    Type Description
    Guid

    TenantId

    Gets the tenant identifier.

    Declaration
    string TenantId { get; }
    Property Value
    Type Description
    String

    Methods

    AnswerAsync(MediaConfig, IEnumerable<Modality>, String, Guid, CancellationToken)

    Answer an incoming call asynchronously.

    Declaration
    Task AnswerAsync(MediaConfig mediaConfig, IEnumerable<Modality> acceptedModalities = null, string callbackUri = null, Guid scenarioId = default(Guid), CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    MediaConfig mediaConfig

    The MediaConfig.

    IEnumerable<Modality> acceptedModalities

    The accepted list of Modality.

    String callbackUri

    The optional callback uri. Specifying this will override the default callback uri set when creating the ICommunicationsClient

    Guid scenarioId

    The scenario identitifer. This parameter should be used for tracking scenarios across multiple calls. Automatically generated by the SDK if not provided.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    The Task that completes after the request has been sent. This does not guarantee that the call has been answered. Any updates on call will be delivered via notification and can be observed using ICall.OnUpdated

    ChangeScreenSharingRoleAsync(ScreenSharingRole, CancellationToken)

    Changes own sharing role in a vbss session.

    Declaration
    Task ChangeScreenSharingRoleAsync(ScreenSharingRole role, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    ScreenSharingRole role

    The role to change to.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    The Task that completes after the request has been sent.

    DeleteAsync(Boolean, CancellationToken)

    Deletes this call asynchronously.

    Declaration
    Task DeleteAsync(bool handleHttpNotFoundInternally = false, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Boolean handleHttpNotFoundInternally

    If the ICall is already gone, whether to handle the exception gracefully or not.

    CancellationToken cancellationToken

    The CancellationToken for the request.

    Returns
    Type Description
    Task

    The Task that completes after the request has been sent. The completion of this task does not guarantee deletion. Confirmation of deletion comes as a notification and can be subscribed by ICall.OnUpdated and ICallCollection.OnUpdated

    KeepAliveAsync(CancellationToken)

    Send heartbeat to keep call alive.

    Declaration
    Task KeepAliveAsync(CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    The Task that completes after the request has been sent.

    MuteAsync(CancellationToken)

    Mutes the self participant asynchronously.

    Declaration
    Task MuteAsync(CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    The Task that completes after the request has been sent. The mute notification will come in on IParticipant.OnUpdated

    PlayPromptAsync(IEnumerable<MediaPrompt>, Action, CancellationToken)

    Plays the specified media prompts.

    Declaration
    Task<PlayOperationResult> PlayPromptAsync(IEnumerable<MediaPrompt> prompts, Action promptsQueued = null, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    IEnumerable<MediaPrompt> prompts

    The list of MediaPrompt to play

    Action promptsQueued

    A callback indicating when the prompts have been queued, but have not yet completed playing.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task<PlayOperationResult>

    The PlayOperationResult with information on how the play operation completed.

    Exceptions
    Type Condition
    ServiceException

    An error has occurred when playing the prompt.

    RedirectAsync(IEnumerable<InvitationParticipantInfo>, Nullable<Int32>, String, Guid, CancellationToken)

    Redirects the incoming call asynchronously.

    Declaration
    Task RedirectAsync(IEnumerable<InvitationParticipantInfo> targets, int? timeout = default(int? ), string callbackUri = null, Guid scenarioId = default(Guid), CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    IEnumerable<InvitationParticipantInfo> targets

    The targets to whom the call should be redirected to.

    Nullable<Int32> timeout

    The timeout after which the redirect is canceled.

    String callbackUri

    The optional callback uri. Specifying this will override the default callback uri set when creating the ICommunicationsClient

    Guid scenarioId

    The scenario identitifer. This parameter should be used for tracking scenarios across multiple calls. Automatically generated by the SDK if not provided.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    The Task that completes after the request has been sent.

    RejectAsync(Nullable<RejectReason>, String, Guid, CancellationToken)

    Rejects the incoming call asynchronously.

    Declaration
    Task RejectAsync(RejectReason? rejectReason = default(RejectReason? ), string callbackUri = null, Guid scenarioId = default(Guid), CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    Nullable<RejectReason> rejectReason

    The reason for call rejection.

    String callbackUri

    The optional callback uri. Specifying this will override the default callback uri set when creating the ICommunicationsClient

    Guid scenarioId

    The scenario identitifer. This parameter should be used for tracking scenarios across multiple calls. Automatically generated by the SDK if not provided.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    The Task that completes after the request has been sent.

    SubscribeToToneAsync(CancellationToken)

    Subscribe to DTMF (dual-tone multi-frequency signaling). This allows you to be notified when the user presses keys on a "touchtone" phone.

    Declaration
    Task SubscribeToToneAsync(CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    The Task that completes after the request has been sent.
    The DTMF notifications will come on ICall.OnUpdated

    TransferAsync(InvitationParticipantInfo, CancellationToken)

    Transfer a call to a given target.

    Declaration
    Task TransferAsync(InvitationParticipantInfo target, CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    InvitationParticipantInfo target

    The target to transfer the call to.

    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    The Task that completes after the request has been sent. This does not guarantee that the call has been answered. Any updates on call will be delivered via notification and can be observed using ICall.OnUpdated

    UnmuteAsync(CancellationToken)

    Unmutes the self participant asynchronously.

    Declaration
    Task UnmuteAsync(CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    Task

    The Task that completes after the request has been sent. The unmute notification will come in on IParticipant.OnUpdated

    Extension Methods

    CallExtensions.AnswerAsync(ICall, IMediaSession, String, Guid, CancellationToken)
    CallExtensions.AnswerAsync(ICall, IEnumerable<MediaInfo>, IEnumerable<Modality>, String, Guid, CancellationToken)
    CallExtensions.AnswerAsync(ICall, IEnumerable<Modality>, String, Guid, CancellationToken)
    Back to top Copyright (c) Microsoft Corporation. All rights reserved.