microsoftgraph / microsoftgraph/microsoft-graph-comms-samples

teams-recording-bot joins only on 2nd attempt (2nd MSTeams call)

Open
#568 2 comments 1 reaction 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

The first time I create a call with the teams-recording-bot solution, the bot will not join (it joins only on a 2nd MSTeams call).

For the first call ,for some reason, CallsOnUpdated is called twice.

First time, args.AddedResources.Count is 1, but then on the second time it is called, args.RemovedResources.Count is 1, and the CallHandler is disposed.

After that, If I create a new call in MSTeams, the bot will join and not dispose CallHandler (CallsOnUpdated will be called only once).

Also, I am getting Callee could not be reached message from e.NewResource.ResultInfo?.Message in CallOnUpdated.

Does anyone know perhaps what could be wrong? I'm attaching the log file:

2022-06-26 15:07:15,011 RecordingBot.Console.exe INFO teams-recording-bot: RecordingBot: booting
2022-06-26 15:07:20,627 RecordingBot.Console.exe INFO teams-recording-bot: Listening on: https://+:9441/
2022-06-26 15:07:20,627 RecordingBot.Console.exe INFO teams-recording-bot: Listening on: https://+:9441/0/
2022-06-26 15:07:20,627 RecordingBot.Console.exe INFO teams-recording-bot: Listening on: http://+:9442/
2022-06-26 15:07:22,449 RecordingBot.Console.exe INFO teams-recording-bot: RecordingBot: running
2022-06-26 15:10:31,890 RecordingBot.Console.exe INFO teams-recording-bot: Init PlatformCallController
2022-06-26 15:10:31,958 RecordingBot.Console.exe INFO teams-recording-bot: OnIncomingRequestAsync
2022-06-26 15:10:31,958 RecordingBot.Console.exe INFO teams-recording-bot: Received HTTP POST, https://localhost:9441/api/calling
2022-06-26 15:10:32,027 RecordingBot.Console.exe INFO teams-recording-bot: Skipped publishing IncomingHTTPPOST events to Event Grid topic recordingbotevents - No topic key specified
2022-06-26 15:10:32,036 RecordingBot.Console.exe INFO teams-recording-bot: ProcessNotificationAsync
2022-06-26 15:10:34,957 RecordingBot.Console.exe INFO teams-recording-bot: EvaluateAndHandleIncomingCallPoliciesAsync
2022-06-26 15:10:34,959 RecordingBot.Console.exe INFO teams-recording-bot: GetRedirectLocationOfParticipantAsync
2022-06-26 15:10:34,959 RecordingBot.Console.exe ERROR teams-recording-bot: No region/redirect for participant!
2022-06-26 15:10:35,049 RecordingBot.Console.exe INFO teams-recording-bot: mediaSessionId: 5f1f5f00-016b-4d78-ba75-6190ae2a9847
2022-06-26 15:10:35,186 RecordingBot.Console.exe INFO teams-recording-bot: Response: Accepted
2022-06-26 15:10:35,933 RecordingBot.Console.exe INFO teams-recording-bot: Num of calls: 1
2022-06-26 15:10:35,935 RecordingBot.Console.exe INFO teams-recording-bot: Creating handler for call. ID: 5f1f5f00-016b-4d78-ba75-6190ae2a9847
2022-06-26 15:10:35,943 RecordingBot.Console.exe INFO teams-recording-bot: Adding videoSocket to availableSocketIds. ID: 0
2022-06-26 15:10:35,944 RecordingBot.Console.exe INFO teams-recording-bot: Adding videoSocket to availableSocketIds. ID: 1
2022-06-26 15:10:35,944 RecordingBot.Console.exe INFO teams-recording-bot: Adding videoSocket to availableSocketIds. ID: 2
2022-06-26 15:10:35,945 RecordingBot.Console.exe INFO teams-recording-bot: Init BotMediaStream
2022-06-26 15:10:36,702 RecordingBot.Console.exe INFO teams-recording-bot: Init PlatformCallController
2022-06-26 15:10:36,703 RecordingBot.Console.exe INFO teams-recording-bot: OnIncomingRequestAsync
2022-06-26 15:10:36,703 RecordingBot.Console.exe INFO teams-recording-bot: Received HTTP POST, https://localhost:9441/api/calling
2022-06-26 15:10:36,703 RecordingBot.Console.exe INFO teams-recording-bot: Skipped publishing IncomingHTTPPOST events to Event Grid topic recordingbotevents - No topic key specified
2022-06-26 15:10:36,703 RecordingBot.Console.exe INFO teams-recording-bot: ProcessNotificationAsync
2022-06-26 15:10:36,749 RecordingBot.Console.exe INFO teams-recording-bot: EvaluateAndHandleIncomingCallPoliciesAsync
2022-06-26 15:10:36,750 RecordingBot.Console.exe INFO teams-recording-bot: GetRedirectLocationOfParticipantAsync
2022-06-26 15:10:36,750 RecordingBot.Console.exe ERROR teams-recording-bot: No region/redirect for participant!
2022-06-26 15:10:36,757 RecordingBot.Console.exe INFO teams-recording-bot: Response: Accepted
2022-06-26 15:10:36,839 RecordingBot.Console.exe INFO teams-recording-bot: Skipped publishing CallTerminated events to Event Grid topic recordingbotevents - No topic key specified
2022-06-26 15:10:36,849 RecordingBot.Console.exe INFO teams-recording-bot: Num of calls: 0
2022-06-26 15:10:36,849 RecordingBot.Console.exe INFO teams-recording-bot: Trying to remove handler for call. ID: 5f1f5f00-016b-4d78-ba75-6190ae2a9847
2022-06-26 15:10:36,850 RecordingBot.Console.exe INFO teams-recording-bot: CallHandler Dispose
2022-06-26 15:10:36,858 RecordingBot.Console.exe INFO teams-recording-bot: Skipped publishing MediaStreamDispose events to Event Grid topic recordingbotevents - No topic key specified
2022-06-26 15:10:36,860 RecordingBot.Console.exe INFO teams-recording-bot: Skipped publishing CallDisposedOK events to Event Grid topic recordingbotevents - No topic key specified

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 in the Samples/V1.0Samples/AksSamples/teams-recording-bot solution and trace the CallsOnUpdated entry point, especially the AddedResources and RemovedResources paths. Compare the first-call log with the later successful call and follow when CallHandler is disposed. Done means identifying why the first call reports a removal and ensuring the bot can join that first call without premature disposal.

Written by the indexing model from the issue text.

Assessment

Domain
backend
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.