[PsiBot Example] Bot call getting deleted automatically after getting established.
We are trying to solve for a business problem, where we need to generate real-time captions/transcript for an ongoing teams meeting. For this I am using PsiBot example. I am trying to set this up first on my local following steps described here https://github.com/microsoftgraph/microsoft-graph-comms-samples/tree/master/Samples/PublicSamples/PsiBot.
When I try to join the meeting, as soon as call is established it is deleted with error message "Server Internal Error. DiagCode: 500#1203002.@".
I found a thread with similar issues here "https://github.com/microsoftgraph/microsoft-graph-comms-samples/issues/828" and have followed suggestions provided by ssulzer but no luck.
Sharing below notification message that I got as part of "Deleted" call. Please let me know if more details are needed I will be happy to help:
Accept: application/json Accept-Encoding: (redacted) Authorization: (redacted) Host: 6d6b2eb931f6.ngrok-free.app User-Agent: Microsoft-Skype/3.0,(Calling/1.0) Scenario-Id: 9bc666c4-6902-49fb-be32-5a2cb202e9da Traceparent: (redacted) X-Forwarded-For: (redacted) X-Forwarded-Host: 6d6b2eb931f6.ngrok-free.app X-Forwarded-Proto: https X-Microsoft-Skype-Chain-Id: fcecd617-77b5-4e5b-81d1-15f3f15f49a6 X-Microsoft-Skype-Message-Id: 9872d750-4b1b-4d9f-aee8-66501bc0f7ed Content-Type: application/json Content-Length: 979 { "value": [ { "changeType": "Deleted", "resourceUrl": "/communications/calls/06004580-2a58-4f6e-a599-e7361515ee21", "resource": "/app/calls/06004580-2a58-4f6e-a599-e7361515ee21", "resourceData": { "@odata.type": "#microsoft.graph.call", "callChainId": "fcecd617-77b5-4e5b-81d1-15f3f15f49a6", "chatInfo": { "@odata.type": "#microsoft.graph.chatInfo", "messageId": "0", "threadId": "19:meeting_OTc1YmY3NzgtZTE2ZS00OGIzLTkwMDYtYzNhODZlNjNjMWU1@thread.v2" }, "meetingInfo": { "@odata.type": "#microsoft.graph.organizerMeetingInfo", "organizer": { "@odata.type": "#microsoft.graph.identitySet", "user": { "@odata.type": "#microsoft.graph.identity", "tenantId": "599254d5-5f95-4f88-9bda-70ccd1dfe125", "id": "5f9a1b6c-2dc7-4875-a5df-d6c3fb15399f" } } }, "resultInfo": { "@odata.type": "#microsoft.graph.resultInfo", "code": 500, "message": "Server Internal Error. DiagCode: 500#1203002.@", "subcode": 1203002 }, "state": 8 } } ] }
Most of the samples in this repo have build/doc rot issues (they used to work but don't any more) and hence difficult to get running. I guess you've seen the vid for running PsiBot locally https://www.youtube.com/watch?v=jxPltGlZKE4&t=1377s It's an hour long but worth watching so you can compare what you've done to someone who has got it working (shame its 2 years old)
I've been struggling with setup too (I'm at a similar position to you but with a different sample) a couple of words of advice:
- don't cut corners about certificates/ngrok/custom domain. The media port binds to the cert you provide and it needs to match the domain that teams communicates on media leg - this means teams can't use ngrok tcp domain directly (if you are using ngrok)
- spend a bit of effort with logging - e.g. add app insights key / config so that info level messages from inside the skype api get pushed to the cloud as app insight traces
@pranavd From our backend logging I can see that an attempt to establish an HTTPS/TLS connection to your bot's server endpoint is failing with an abrupt closure of the TCP connection, but without much indication as to why.
First thing to check: is the bot using a self-signed server SSL certificate? We do not support self-signed certs; the certificate must be issued by a well-known CA.
A second thing to check (and possibly you already did this): try updating the bot to ensure it is referencing version 3.0.1 of the Microsoft.IO.RecyclableMemoryStream library. https://www.nuget.org/packages/microsoft.io.recyclablememorystream/
Also, did you following the revised Setup Instructions that were given in the readme.txt for the 1.28 SDK release? Please follow those and also note this advisory (mentioned in the 1.31 SDK), which applies to bots running on the .NET Framework:
-
Please note the following important addendum to the Setup Instructions given in the release notes from SDK 1.28. The "netsh http add sslcert" command should also specify a "clientcertnegotiation=enable" parameter, otherwise a call setup failure may occur; e.g.,
Bind ssl cert to the IP/Port and enable client certificate negotiation
netsh http add sslcert ipport=%InstanceIpAddress%:%InstanceMediaControlPort% "appid={00000000-0000-0000-0000-000000000001}" cert=%ServerCertificate% clientcertnegotiation=enable
Another thing to try: if the bot is running behind ngrok, try deploying to Azure (without ngrok).
If still no luck, try running the bot under the debugger and have the debugger break on any .net exceptions. Note the exception call stack and then continue execution. One of the exceptions might indicate a problem, such as a dependency conflict.