Show / Hide Table of Contents

    Class CallExtensions

    Extensions for calls.

    Inheritance
    Object
    CallExtensions
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.Graph.Communications.Calls
    Assembly: Microsoft.Graph.Communications.Calls.dll
    Syntax
    public static class CallExtensions

    Methods

    AnswerAsync(ICall, IMediaSession, String, Guid, CancellationToken)

    Answers a call with locally hosted media configuration.

    Declaration
    public static Task AnswerAsync(this ICall call, IMediaSession mediaSession, string callbackUri = null, Guid scenarioId = default(Guid), CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    ICall call

    The call to be answered.

    IMediaSession mediaSession

    The media session object which defines the media configuration.

    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

    Exceptions
    Type Condition
    ArgumentNullException

    When mediaSession is not specified.

    AnswerAsync(ICall, IEnumerable<MediaInfo>, IEnumerable<Modality>, String, Guid, CancellationToken)

    Answers a call with service hosted media configuration.

    Declaration
    public static Task AnswerAsync(this ICall call, IEnumerable<MediaInfo> preFetchMedia, IEnumerable<Modality> acceptedModalities, string callbackUri = null, Guid scenarioId = default(Guid), CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    ICall call

    The call to be answered.

    IEnumerable<MediaInfo> preFetchMedia

    List of media files that service will cache, so that when playing these media files; the latency is lower.

    IEnumerable<Modality> acceptedModalities

    The modalities to accept.

    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

    Exceptions
    Type Condition
    ArgumentNullException

    When pre-fetch media is null.

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

    Answers a call with service hosted media configuration.

    Declaration
    public static Task AnswerAsync(this ICall call, IEnumerable<Modality> acceptedModalities, string callbackUri = null, Guid scenarioId = default(Guid), CancellationToken cancellationToken = default(CancellationToken))
    Parameters
    Type Name Description
    ICall call

    The call to be answered.

    IEnumerable<Modality> acceptedModalities

    The modalities to accept.

    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

    SetOutgoingCallOptions(Call, Nullable<Boolean>)

    Set outgoing call options for the call.

    Declaration
    public static void SetOutgoingCallOptions(this Call call, bool? allowGuestToBypassLobby)
    Parameters
    Type Name Description
    Call call

    The call.

    Nullable<Boolean> allowGuestToBypassLobby

    Enable bypass lobby when joining a group call as guest.

    Back to top Copyright (c) Microsoft Corporation. All rights reserved.