microsoftgraph / microsoftgraph/microsoft-graph-comms-samples

Bot unable to add participants to meeting.

Open
#662 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
253
Forks
275
Avg merge
1d 5h
Merged PRs (30d)
1

Description

Describe the issue
When the bot adds participants to a meeting participants are not able to answer the call, they get put on hold and they see multiple windows and cannot resume the call eventually get kicked out.

Video Recording Here
https://www.dropbox.com/scl/fi/awixd6zuvvy77ookohygc/Mremoteng-Confcons.Xml-203-Optus-2023-07-24-18-20-48.m4v?rlkey=qjemgyfy6yxw8gapg4g7bonng&dl=0

Code Snippet
///


/// Raise an incident.
///

/// The incident data.
/// The task for await.
public async Task RaiseIncidentAsync(IncidentRequestData incidentRequestData)
{
// A tracking id for logging purposes. Helps identify this call in logs.
var scenarioId = string.IsNullOrEmpty(incidentRequestData.ScenarioId) ? Guid.NewGuid() : new Guid(incidentRequestData.ScenarioId);

        string incidentId = Guid.NewGuid().ToString();

        var incidentStatusData = new IncidentStatusData(incidentId, incidentRequestData);

        var incident = this.IncidentStatusManager.AddIncident(incidentId, incidentStatusData);

        var botMeetingCall = await this.JoinCallAsync(incidentRequestData, incidentId).ConfigureAwait(false);

        // Rehydrates and validates the group call.
        botMeetingCall = await this.RehydrateAndValidateGroupCallAsync(this.Client, botMeetingCall).ConfigureAwait(false);

        foreach (var objectId in incidentRequestData.ObjectIds)
        {
            var makeCallRequestData =
                new MakeCallRequestData(
                    incidentRequestData.TenantId,
                    objectId,
                    "Application".Equals(incidentRequestData.ResponderType, StringComparison.OrdinalIgnoreCase));
            var responderCall = await this.MakeCallAsync(makeCallRequestData, scenarioId).ConfigureAwait(false);
            this.AddCallToHandlers(responderCall, new IncidentCallContext(IncidentCallType.ResponderNotification, incidentId));
        }

        return botMeetingCall;
    }

    /// <summary>
    /// Joins the call asynchronously.
    /// </summary>
    /// <param name="joinCallBody">The join call body.</param>
    /// <param name="incidentId">Incident Id.</param>
    /// <returns>The <see cref="ICall"/> that was requested to join.</returns>
    public async Task<ICall> JoinCallAsync(JoinCallRequestData joinCallBody, string incidentId = "")
    {
        // A tracking id for logging purposes. Helps identify this call in logs.
        var scenarioId = string.IsNullOrEmpty(joinCallBody.ScenarioId) ? Guid.NewGuid() : new Guid(joinCallBody.ScenarioId);

        Microsoft.Graph.MeetingInfo meetingInfo;
        ChatInfo chatInfo;
        if (!string.IsNullOrWhiteSpace(joinCallBody.VideoTeleconferenceId))
        {
            // Meeting id is a cloud-video-interop numeric meeting id.
            var onlineMeeting = await this.OnlineMeetings
                .GetOnlineMeetingAsync(joinCallBody.TenantId, joinCallBody.VideoTeleconferenceId, scenarioId)
                .ConfigureAwait(false);

            meetingInfo = new OrganizerMeetingInfo { Organizer = onlineMeeting.Participants.Organizer.Identity, };
            chatInfo = onlineMeeting.ChatInfo;
        }
        else
        {
            (chatInfo, meetingInfo) = JoinInfo.ParseJoinURL(joinCallBody.JoinURL);
        }

        var tenantId =
            joinCallBody.TenantId ??
            (meetingInfo as OrganizerMeetingInfo)?.Organizer.GetPrimaryIdentity()?.GetTenantId();
        var mediaToPrefetch = new List<MediaInfo>();
        foreach (var m in this.MediaMap)
        {
            mediaToPrefetch.Add(m.Value.MediaInfo);
        }

        var joinParams = new JoinMeetingParameters(chatInfo, meetingInfo, new[] { Modality.Audio }, mediaToPrefetch)
        {
            TenantId = tenantId,
        };

        var statefulCall = await this.Client.Calls().AddAsync(joinParams, scenarioId).ConfigureAwait(false);

        this.AddCallToHandlers(statefulCall, new IncidentCallContext(IncidentCallType.BotMeeting, incidentId));

        this.graphLogger.Info($"Join Call complete: {statefulCall.Id}");

        return statefulCall;
    }

Expected behavior
When bot adds participant the participant shoudl be successfully able to answer callsand join the meeting.

Graph SDK (please complete the following information):

  • Microsoft.Graph.Communications.Common 1.2.0.3742

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing RaiseIncidentAsync and JoinCallAsync, especially the bot meeting setup and the loop that calls MakeCallAsync for each object ID. Use the provided recording and the call-flow behavior to identify why added participants are put on hold or receive duplicate windows; done means participants can answer and join the meeting successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.