microsoftgraph / microsoft-graph-comms-samples

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

EchoVoiceBot: bot never connects to call, with no error #776

Open GlebIsrailevich opened 1 month ago

GlebIsrailevich commented 1 month ago

We trying to run (locally) the EchoBot example (GitHub: microsoftgraph/microsoft-graph-comms-samples/Samples/PublicSamples/EchoBot/). Our prerequisites:

  1. When we run them bot from Visual Studio (as administrator) it sucessfully initialazing a bot and than runs it. There is only one fail:
    fail: EchoBot.Services.Http.BotMediaLogger[0]
      [SkypeBotsMediaPlatform][AppId:xxxxxxxxxxxxxxxxxxx] MediaPerf is not registered: no key found at SYSTEM\CurrentControlSet\Services\MediaPerf\Performance

    But as i saw in issues its a kind of warning and it will be depreciated soon.

  2. After setting up a bot we create a Post call to join call in Microsoft Teams in Postman.
    localhost:9442/JoinCall
  3. Than we receiving these logs
    info: EchoBot.Services.ServiceSetup.AppHost[0]
      Listening on: http://+:9442/
    info: EchoBot.Services.ServiceSetup.AppHost[0]
      EchoBot: running
    info: EchoBot.Services.Http.Controllers.JoinCallController[0]
      JOIN CALL
    info: EchoBot.Services.Bot.BotService[0]
      AuthenticationProvider: Generating OAuth token.
    info: EchoBot.Services.Bot.BotService[0]
      AuthenticationProvider: Generated OAuth token. Expires in 59,9828372716667 minutes.
    info: EchoBot.Services.Bot.BotService[0]
      Call creation complete: xxxxxxxxxxxxxxxxxxxxxxx

    Finally program reaches this Task:

    
    private async Task StartAudioVideoFramePlayerAsync() 
(line 162 in BotMediaStream.cs)
where gets method finally {} and stops, without any logs which can point on any issue
4. Important Note:  I've checked whether tcp works. And according to my tests in wireshark all tcp calls work correctly. But despite that fact im not receiving notitfication calls and any logs from microsoft graph.
5. Ports that im using:
- "BotCallingInternalPort": "9442"
- "BotInternalPort": "9441"
- "MediaInternalPort": "8445"
-  "MediaInstanceExternalPort" choosen automatically by ngrok
6. My configuration of ngrok (MediaInstanceExternalPort) differs from given in tutorial.I don't use remote_host property in ngrok, as it is a paid feature, i set up a redirect on a remote host with my domain, using following configuration of nginx:

server { listen 12152; proxy_pass 0.tcp.ngrok.io:12152; }


Where 12152 is my mediaInstanceExternalPort from ngrok tcp.
This setup successfully redirects tcp requests back to service, which can be checked from Wireshark.

*And thats it, what can possibly be wrong and who have faced similar problems?*
InDieTasten commented 1 month ago

Please make sure you are also funneling logs from the SDKs GraphLogger into your log stream. The logs you shared don't contain any info about media platform initialization

GlebIsrailevich commented 1 month ago

Please make sure you are also funneling logs from the SDKs GraphLogger into your log stream. The logs you shared don't contain any info about media platform initialization

Some logs from Graph logger are showing after redirecting it to console, but no logs related to media initialization

arantar commented 2 weeks ago

@GlebIsrailevich Hi Were you able to identify the source of the problem and resolve it?