0

I am creating the Microsoft Teams recording bot. and its successfully receiving the incoming call request but while answering the call it is throwing the exception i.e.

Exception thrown: 'Microsoft.Graph.Communications.Core.Exceptions.ServiceException' in mscorlib.dll

When and the following message is being written in my log file.

ERROR Caught an Exception running the task: Answering call 861f3e00-1d20-4334-848a-3786b081586c with scenario 5a356e88-bfea-4250-ad06-d2ababed3128.

could anyone help me in solving this problem.

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
  • Did you try to debug your code? Is there any inner exception with more details? – user2250152 Dec 01 '20 at 09:56
  • yes I tried to debug but not able to find any details about it. – Murtaza Multan Dec 01 '20 at 09:58
  • @user2250152 the only error description I am getting is the .dll name and the Error caught message inside the log file as mentioned above. – Murtaza Multan Dec 01 '20 at 10:45
  • If its a Graph error then you might be getting the requestid, timestamp along in the response; share it. – Dev Dec 01 '20 at 18:56
  • @Dev I am getting this inside my log file 2020-12-01 23:33:45.5007 ERROR Caught an Exception running the task: Status Code: NotFound Microsoft.Graph.Communications.Core.Exceptions.ServiceException: Code: 8522 Message: Call not found. Scenario Id: cf9ffc0e-4d48-45f9-a8b6-cdf6ea7e40f9 Inner error: AdditionalData: date: 2020-12-01T18:33:44 request-id: e3a0ffbb-456e-4aec-9a65-15e7e96700c9 client-request-id: a73bfdc5-1a11-4759-8b2e-ab356a1822b6 – Murtaza Multan Dec 02 '20 at 04:49
  • (1) Have you created a call first? (2) Does the your/service reach the bot? (3) Have you added the certs, CNAME entries etc? – Dev Dec 02 '20 at 05:30
  • I remember a related one logged at https://github.com/microsoftgraph/microsoft-graph-comms-samples/issues/81. Have a look at it – Dev Dec 02 '20 at 05:38
  • @Dev yes i am getting the incoming call request, I have also registers the domain name on ngrok. plus i also have a wildcard ssl certificate mapping on the tcp link. When answering the incoming call request it throws this exception – Murtaza Multan Dec 02 '20 at 06:20
  • @Dev one more thing, the application i am creating is a .net console application – Murtaza Multan Dec 02 '20 at 06:22
  • Issue is now resolved. Thanks @Dev for your response. – Murtaza Multan Dec 02 '20 at 10:41
  • Glad to hear that @MurtazaMultan. Yes ngrok is a better way to find out whats happening inside it. Just curious how the issue got resolved? – Dev Dec 02 '20 at 11:45
  • @Dev actually the problem was of the permissions. As being in the organization I was given a separate subscription and I was trying to communicate with the Microsoft teams of an organization which was out of my scope and permission. That was i figured out and after getting the required permissions, I was able to join the call. – Murtaza Multan Dec 03 '20 at 05:04
  • @Dev sorry to disturb you again, just want a little favor. my next target is to record the meeting. Could you please guide me how can I do that with the help of media streams. Actually I searched and found that there is OnAudioReceived and OnVideoReceived methods to listen audio and video changes. Is there any way to get both together not separately. Also will it record the screen sharing of different participants? – Murtaza Multan Dec 03 '20 at 05:09
  • Thanks for the confirmation @MurtazaMultan. I will move this to answer. Consider upvoting it. So it can be useful to others as well. Also if you dont mind post the above query in new stackoverflowthread and update it here, i will answer there... – Dev Dec 03 '20 at 08:34
  • Sure @Dev. here is the link to the new query https://stackoverflow.com/questions/65123158/recording-microsoft-teams-session-audio-video-screen-sharing-using-a-bot – Murtaza Multan Dec 03 '20 at 09:29

1 Answers1

0

The problem was with permissions. As being in the organization you're given a separate subscription. When you are trying to communicate with the Microsoft teams of an organization which was out of your scope and permission. After you figured it out and setting/getting the required permissions, you're able to join the call.

Dev
  • 2,428
  • 2
  • 14
  • 15
  • In my case, for some reason the bot user account in the AD on Azure was Disabled. I enabled it and the error went away. – Enxhi Leba Oct 05 '22 at 16:02