microsoftgraph / microsoft-graph-comms-samples

Microsoft Graph Communications Samples
MIT License
211 stars 236 forks source link

Recording call stops. Server Internal Error. 500 subcode 1999 #742

Closed vidilab closed 1 month ago

vidilab commented 4 months ago

When using PolicyRecordingBot, a call to the bot is established and recording starts correctly, but halfway the call, we receive an event that the call is deleted, and recording stops. The event also reports Server Internal Error. DiagCode: 500#1999. Since the actual call continues, I would expect the event to not occur, and the recording to continue. The error seems to occur occasionally (for some calls).

Using Microsoft.Skype.Bots.Media: 1.27.0.2-alpha

Call ID b3003a80-a430-4663-93f2-22042469c49f, and a8003880-1276-45a9-982b-9c51486e3ef3 created 2024-07-15T13:59:37 , and :40 deleted 2024-07-15T14:05:16

Received message

2024-07-15 15:05:16,299 [15] $>2024-07-15T14:05:16.2996314Z Info: CommunicationsClientExtensions.cs:156 LogAndCreateResponse
ScenarioId: 2819dbbf-d2d2-4485-a04b-9083c026235e
AppId: accf85fa-a167-4f14-b301-c929782eeaac
AppName: Sample.PolicyRecordingBot.FrontEnd
....
{
  "@odata.type": "#microsoft.graph.commsNotifications",
  "value": [
    {
      "@odata.type": "#microsoft.graph.commsNotification",
      "changeType": "Deleted",
      "resourceUrl": "/communications/calls/b3003a80-a430-4663-93f2-22042469c49f",
      "resource": "/app/calls/b3003a80-a430-4663-93f2-22042469c49f",
      "resourceData": {
        "@odata.type": "#microsoft.graph.call",
        "callChainId": "2819dbbf-d2d2-4485-a04b-9083c026235e",
                ...
        "resultInfo": {
          "@odata.type": "#microsoft.graph.resultInfo",
          "code": 500,
          "message": "Server Internal Error. DiagCode: 500#1999.@",
          "subcode": 1999
        },
        "state": "Terminated",

What does this error mean, and how to avoid it?

InDieTasten commented 4 months ago

Couple questions that could help to narrow down the issue:

What kind of policy did you create? Did you enable the "RequiredDuringCall" option? How long does it take before the bot receives this message and is being kicked out of the call?

vidilab commented 4 months ago

We typically use without "RequiredDuringCall", because otherwise calling is impossible if the bot is down. In this case, it took about 5 minutes, and then it was kicked out.

InDieTasten commented 3 months ago

Hmmm, perhaps you are not properly sending heart beats and the platform kicks you off for not being "alive"?

vidilab commented 3 months ago

Heartbeat in sample has interval of 10 minutes (CallHandler.cs), while our error occured after 5 minutes.

Is there a list of what the 500 error subcodes mean? (subcode 1999 in this case)

ssulzer commented 3 months ago

@vidilab We are going to take a look. Our bot control plane appears to lose its connection to your bot during call setup.

ssulzer commented 3 months ago

@vidilab Is this still a problem for you? We haven't seen occurrences of the failure for your bot since July. Thanks.

vidilab commented 1 month ago

@vidilab Is this still a problem for you? We haven't seen occurrences of the failure for your bot since July. Thanks.

It seems that this problem does not occur anymore currently, but we now see a different error. I have created a separate issue for that.