Forum Discussion

bibin's avatar
bibin
Copper Contributor
Nov 03, 2024

Teams application hosted media bot not calling webhook

I have setup a media bot as per the instructions mentioned in PsiBot. The TCP address has been added in the firewall. Necessary API permissions in App Registration has been provided. Currently, testing on local computer using ngrok and followed the instructions mentioned in the link above.

Issues:

  1. In an online teams meeting an App is added to the meeting and a call to JoinCallAsync api for bot to join the call occurs, which is successful. But after that nothing happens. The bot is not added in the meeting.
  2. The call to webhook (api/calling) should be called which is not happening.

Please guide what should be done to add the bot to the meeting to fetch the audio of participants.

1. Ngrok points TCP to: Forwarding tcp://0.tcp.in.ngrok.io:12345 -> localhost:8445

In domain added the below record: CNAME 0.local.bot mapped to 0.tcp.in.ngrok.io

Created certificate using openssl for *.local.bot.example.com and added in the Microsoft Management Control under Personal Certificates. The program has accepted this certificate i.e. no exception occurred.

2. Added all the ports, domains, endpoints, application id in the appsettings of the project.

3. Set supportsCalling to true in manifest file

How can the issue be traced? Please guide.

    • bibin's avatar
      bibin
      Copper Contributor

       

       

      could you please let me know where the issue is? is it an issue with the certificate or the CNAME mapping?

    • bibin's avatar
      bibin
      Copper Contributor

      after some modifications now I get the error "Call source identity invalid", "code": "7507" in the create call method of graph api. Below is the payload:

      {

                      "@odata.type": "#microsoft.graph.call",

                      "callbackUri": "https://kkgncsql-5020.asse.devtunnels.ms/api/calls/notification",

                      "source": {

                          "identity": {

                              "user": {

                                  "id": "9fe055a8-bc5767-44c7-7563f-ccd8e257fd42" // User who initiated the online meeting

                              }

                          }

                      },

                      "targets": [

                          {

                              "identity": {

                                  "application": {

                                      "id": "6j8opj-c8bc-4948-b116-bb127b5137ac" // BOT ID / ApplicationID

                                  }

                              }

                          }

                      ],

                      "requestedModalities": [

                          "audio"

                      ],

      "tenantId": "pass tenant id"

                  }

  • bibin's avatar
    bibin
    Copper Contributor

    Getting Server Internal Error. DiagCode: 500#7117.@ error. Bot is trying to establish i.e. CallState.Establishing; however, after some time it gets terminated.

     

    Could you provide some insight regarding this error?

  • bibin's avatar
    bibin
    Copper Contributor

    The bot is receiving audio on OnAudioMediaReceived event. However, IsSilence is always true. I believe the bot has not been established, even though it is showing in the teams meeting as unverified participant, that's why it is happening.

    Please guide. In addition, how to transcribe the incoming audio?

  • bibin's avatar
    bibin
    Copper Contributor

    I've resolved these issues. Now, the bot is receiving audio and able to transcribe.

    • Nivedipa-MSFT's avatar
      Nivedipa-MSFT
      Icon for Microsoft rankMicrosoft

      bibin - Glad to hear that your issue is resolved. Could you please add your solution in the answer section explaining how you resolved your issue? It will help others to resolve similar issues

Resources